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,20 @@ 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
+ '.node_modules/*' ,
14
+ '.github/*' ,
15
+ '.browser_modules/*' ,
16
+ 'docs/*' ,
17
+ 'scripts/*' ,
18
+ 'electron/*' ,
19
+ 'electron-app/*' ,
20
+ 'browser-app/*' ,
21
+ 'plugins/*' ,
22
+ 'arduino-ide-extension/src/node/cli-protocol' ,
23
+ ] ,
18
24
settings : {
19
25
react : {
20
26
version : 'detect' , // Tells eslint-plugin-react to automatically detect the version of React to use
@@ -27,14 +33,24 @@ module.exports = {
27
33
'plugin:prettier/recommended' ,
28
34
'prettier' , // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
29
35
] ,
30
- plugins : [ 'prettier' ] ,
31
- root : true ,
36
+ plugins : [ 'prettier' , 'unused-imports' ] ,
32
37
rules : {
33
38
'@typescript-eslint/no-unused-expressions' : 'off' ,
34
39
'@typescript-eslint/no-namespace' : 'off' ,
35
40
'@typescript-eslint/no-var-requires' : 'off' ,
36
41
'@typescript-eslint/no-empty-function' : 'warn' ,
37
42
'@typescript-eslint/no-empty-interface' : 'warn' ,
43
+ 'no-unused-vars' : 'off' ,
44
+ 'unused-imports/no-unused-imports' : 'error' ,
45
+ 'unused-imports/no-unused-vars' : [
46
+ 'warn' ,
47
+ {
48
+ vars : 'all' ,
49
+ varsIgnorePattern : '^_' ,
50
+ args : 'after-used' ,
51
+ argsIgnorePattern : '^_' ,
52
+ } ,
53
+ ] ,
38
54
'react/display-name' : 'warn' ,
39
55
eqeqeq : [ 'error' , 'smart' ] ,
40
56
'guard-for-in' : 'off' ,
0 commit comments