'protocol' is defined but never used. Allowed unused vars must match /^_/u
7 Tray,
8 Menu,
9 MenuItem,
10 protocol, 11} from "electron";
12import { resolve, join } from "node:path";
13
'MenuItem' is defined but never used. Allowed unused vars must match /^_/u
6 screen,
7 Tray,
8 Menu,
9 MenuItem, 10 protocol,
11} from "electron";
12import { resolve, join } from "node:path";
'Menu' is defined but never used. Allowed unused vars must match /^_/u
5 dialog,
6 screen,
7 Tray,
8 Menu, 9 MenuItem,
10 protocol,
11} from "electron";
'Tray' is defined but never used. Allowed unused vars must match /^_/u
4 ipcMain,
5 dialog,
6 screen,
7 Tray, 8 Menu,
9 MenuItem,
10 protocol,
'dialog' is defined but never used. Allowed unused vars must match /^_/u
2 app,
3 BrowserWindow,
4 ipcMain,
5 dialog, 6 screen,
7 Tray,
8 Menu,
Description
Unused variables are generally considered a code smell and should be avoided.
Removing unused references - It prevents unused modules from being loaded at runtime, improving performance, and preventing the compiler from loading metadata that will never be used. - It prevents conflicts that may occur when trying to reference another variable.
NOTE: If you have intentionally left a variable unused, we suggest you to prefix the variable name with a _
to prevent them from being flagged by DeepSource.
Bad Practice
import fs from 'fs' // <- unused
import { readFileSync } from 'fs'
const text = readFileSync('declaration_of_independence.txt', 'utf-8')
console.log(text)
Recommended
import { readFileSync } from 'fs'
const text = readFileSync('declaration_of_independence.txt', 'utf-8')
console.log(text)