|
1 | 1 | module.exports = {
|
2 |
| - parser: '@typescript-eslint/parser', // Specifies the ESLint parser |
3 |
| - parserOptions: { |
4 |
| - ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features |
5 |
| - sourceType: 'module', // Allows for the use of imports |
6 |
| - ecmaFeatures: { |
7 |
| - jsx: true, // Allows for the parsing of JSX |
8 |
| - }, |
| 2 | + parser: '@typescript-eslint/parser', // Specifies the ESLint parser |
| 3 | + parserOptions: { |
| 4 | + ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features |
| 5 | + sourceType: 'module', // Allows for the use of imports |
| 6 | + ecmaFeatures: { |
| 7 | + jsx: true, // Allows for the parsing of JSX |
9 | 8 | },
|
10 |
| - ignorePatterns: [ |
11 |
| - 'node_modules/*', |
12 |
| - '**/node_modules/*', |
13 |
| - '.node_modules/*', |
14 |
| - '.github/*', |
15 |
| - '.browser_modules/*', |
16 |
| - 'docs/*', |
17 |
| - 'scripts/*', |
18 |
| - 'electron-app/lib/*', |
19 |
| - 'electron-app/src-gen/*', |
20 |
| - 'electron-app/gen-webpack*.js', |
21 |
| - '!electron-app/webpack.config.js', |
22 |
| - 'plugins/*', |
23 |
| - 'arduino-ide-extension/src/node/cli-protocol', |
24 |
| - ], |
25 |
| - settings: { |
26 |
| - react: { |
27 |
| - version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use |
28 |
| - }, |
| 9 | + }, |
| 10 | + ignorePatterns: [ |
| 11 | + 'node_modules/*', |
| 12 | + '**/node_modules/*', |
| 13 | + '.node_modules/*', |
| 14 | + '.github/*', |
| 15 | + '.browser_modules/*', |
| 16 | + 'docs/*', |
| 17 | + 'scripts/*', |
| 18 | + 'electron-app/lib/*', |
| 19 | + 'electron-app/src-gen/*', |
| 20 | + 'electron-app/gen-webpack*.js', |
| 21 | + '!electron-app/webpack.config.js', |
| 22 | + 'plugins/*', |
| 23 | + 'arduino-ide-extension/src/node/cli-protocol', |
| 24 | + ], |
| 25 | + settings: { |
| 26 | + react: { |
| 27 | + version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use |
29 | 28 | },
|
30 |
| - extends: [ |
31 |
| - 'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin |
32 |
| - 'plugin:react/recommended', // Uses the recommended rules from @eslint-plugin-react |
33 |
| - 'plugin:react-hooks/recommended', // Uses recommended rules from react hooks |
34 |
| - 'plugin:prettier/recommended', |
35 |
| - 'prettier', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier |
| 29 | + }, |
| 30 | + extends: [ |
| 31 | + 'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin |
| 32 | + 'plugin:react/recommended', // Uses the recommended rules from @eslint-plugin-react |
| 33 | + 'plugin:react-hooks/recommended', // Uses recommended rules from react hooks |
| 34 | + 'plugin:prettier/recommended', |
| 35 | + 'prettier', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier |
| 36 | + ], |
| 37 | + plugins: ['prettier', 'unused-imports'], |
| 38 | + rules: { |
| 39 | + '@typescript-eslint/no-unused-expressions': 'off', |
| 40 | + '@typescript-eslint/no-namespace': 'off', |
| 41 | + '@typescript-eslint/no-var-requires': 'off', |
| 42 | + '@typescript-eslint/no-empty-function': 'warn', |
| 43 | + '@typescript-eslint/no-empty-interface': 'warn', |
| 44 | + 'no-unused-vars': 'off', |
| 45 | + 'unused-imports/no-unused-imports': 'error', |
| 46 | + 'unused-imports/no-unused-vars': [ |
| 47 | + 'warn', |
| 48 | + { |
| 49 | + vars: 'all', |
| 50 | + varsIgnorePattern: '^_', |
| 51 | + args: 'after-used', |
| 52 | + argsIgnorePattern: '^_', |
| 53 | + }, |
36 | 54 | ],
|
37 |
| - plugins: ['prettier', 'unused-imports'], |
38 |
| - rules: { |
39 |
| - '@typescript-eslint/no-unused-expressions': 'off', |
40 |
| - '@typescript-eslint/no-namespace': 'off', |
41 |
| - '@typescript-eslint/no-var-requires': 'off', |
42 |
| - '@typescript-eslint/no-empty-function': 'warn', |
43 |
| - '@typescript-eslint/no-empty-interface': 'warn', |
44 |
| - 'no-unused-vars': 'off', |
45 |
| - 'unused-imports/no-unused-imports': 'error', |
46 |
| - 'unused-imports/no-unused-vars': [ |
47 |
| - 'warn', |
48 |
| - { |
49 |
| - vars: 'all', |
50 |
| - varsIgnorePattern: '^_', |
51 |
| - args: 'after-used', |
52 |
| - argsIgnorePattern: '^_', |
53 |
| - }, |
54 |
| - ], |
55 |
| - 'react/display-name': 'warn', |
56 |
| - eqeqeq: ['error', 'smart'], |
57 |
| - 'guard-for-in': 'off', |
58 |
| - 'id-blacklist': 'off', |
59 |
| - 'id-match': 'off', |
60 |
| - 'no-underscore-dangle': 'off', |
61 |
| - 'no-unused-expressions': 'off', |
62 |
| - 'no-var': 'error', |
63 |
| - radix: 'error', |
64 |
| - 'prettier/prettier': 'warn', |
65 |
| - }, |
| 55 | + 'react/display-name': 'warn', |
| 56 | + eqeqeq: ['error', 'smart'], |
| 57 | + 'guard-for-in': 'off', |
| 58 | + 'id-blacklist': 'off', |
| 59 | + 'id-match': 'off', |
| 60 | + 'no-underscore-dangle': 'off', |
| 61 | + 'no-unused-expressions': 'off', |
| 62 | + 'no-var': 'error', |
| 63 | + radix: 'error', |
| 64 | + 'prettier/prettier': 'warn', |
| 65 | + }, |
66 | 66 | };
|
0 commit comments