1
1
module . exports = {
2
- ignorePatterns : [
3
- 'node_modules/*' ,
4
- '/*' ,
5
- '!arduino-ide-extension' ,
6
- 'arduino-ide-extension/*' ,
7
- '!arduino-ide-extension/src' ,
8
- 'arduino-ide-extension/src/node/cli-protocol' ,
9
- ] ,
10
2
parser : '@typescript-eslint/parser' , // Specifies the ESLint parser
11
3
parserOptions : {
12
4
ecmaVersion : 2020 , // Allows for the parsing of modern ECMAScript features
@@ -15,6 +7,16 @@ module.exports = {
15
7
jsx : true , // Allows for the parsing of JSX
16
8
} ,
17
9
} ,
10
+ ignorePatterns : [
11
+ 'node_modules/*' ,
12
+ '.node_modules/*' ,
13
+ '.browser_modules/*' ,
14
+ 'electron/*' ,
15
+ 'electron-app/*' ,
16
+ 'browser-app/*' ,
17
+ 'plugins-app/*' ,
18
+ 'arduino-ide-extension/src/node/cli-protocol' ,
19
+ ] ,
18
20
settings : {
19
21
react : {
20
22
version : 'detect' , // Tells eslint-plugin-react to automatically detect the version of React to use
@@ -27,14 +29,24 @@ module.exports = {
27
29
'plugin:prettier/recommended' ,
28
30
'prettier' , // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
29
31
] ,
30
- plugins : [ 'prettier' ] ,
31
- root : true ,
32
+ plugins : [ 'prettier' , 'unused-imports' ] ,
32
33
rules : {
33
34
'@typescript-eslint/no-unused-expressions' : 'off' ,
34
35
'@typescript-eslint/no-namespace' : 'off' ,
35
36
'@typescript-eslint/no-var-requires' : 'off' ,
36
37
'@typescript-eslint/no-empty-function' : 'warn' ,
37
38
'@typescript-eslint/no-empty-interface' : 'warn' ,
39
+ 'no-unused-vars' : 'off' ,
40
+ 'unused-imports/no-unused-imports' : 'error' ,
41
+ 'unused-imports/no-unused-vars' : [
42
+ 'warn' ,
43
+ {
44
+ vars : 'all' ,
45
+ varsIgnorePattern : '^_' ,
46
+ args : 'after-used' ,
47
+ argsIgnorePattern : '^_' ,
48
+ } ,
49
+ ] ,
38
50
'react/display-name' : 'warn' ,
39
51
eqeqeq : [ 'error' , 'smart' ] ,
40
52
'guard-for-in' : 'off' ,
0 commit comments