11module . 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- ] ,
102 parser : '@typescript-eslint/parser' , // Specifies the ESLint parser
113 parserOptions : {
124 ecmaVersion : 2020 , // Allows for the parsing of modern ECMAScript features
@@ -15,6 +7,20 @@ module.exports = {
157 jsx : true , // Allows for the parsing of JSX
168 } ,
179 } ,
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+ ] ,
1824 settings : {
1925 react : {
2026 version : 'detect' , // Tells eslint-plugin-react to automatically detect the version of React to use
@@ -27,14 +33,24 @@ module.exports = {
2733 'plugin:prettier/recommended' ,
2834 'prettier' , // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
2935 ] ,
30- plugins : [ 'prettier' ] ,
31- root : true ,
36+ plugins : [ 'prettier' , 'unused-imports' ] ,
3237 rules : {
3338 '@typescript-eslint/no-unused-expressions' : 'off' ,
3439 '@typescript-eslint/no-namespace' : 'off' ,
3540 '@typescript-eslint/no-var-requires' : 'off' ,
3641 '@typescript-eslint/no-empty-function' : 'warn' ,
3742 '@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+ ] ,
3854 'react/display-name' : 'warn' ,
3955 eqeqeq : [ 'error' , 'smart' ] ,
4056 'guard-for-in' : 'off' ,
0 commit comments