|
1 | | -// module.exports = { |
2 | | -// env: { |
3 | | -// browser: true, |
4 | | -// commonjs: true, |
5 | | -// es2021: true, |
6 | | -// node: true, |
7 | | -// }, |
8 | | -// plugins: ['react', '@typescript-eslint'], |
9 | | -// extends: [ |
10 | | -// 'eslint:recommended', |
11 | | -// 'plugin:react/recommended', |
12 | | -// 'plugin:@typescript-eslint/recommended', |
13 | | -// ], |
14 | | -// ignorePatterns: ['.eslintrc.js', '*.config.js', 'dist/*', '__tests__/*'], |
15 | | -// overrides: [], |
16 | | -// parserOptions: { |
17 | | -// ecmaVersion: 12, |
18 | | -// sourceType: 'module', |
19 | | -// }, |
20 | | -// settings: { |
21 | | -// react: { |
22 | | -// version: 'detect', |
23 | | -// }, |
24 | | -// }, |
25 | | -// rules: { |
26 | | -// indent: ['warn', 2], |
27 | | -// 'no-unused-vars': ['off', { vars: 'local' }], |
28 | | -// 'prefer-const': 'warn', |
29 | | -// quotes: ['warn', 'single'], |
30 | | -// semi: ['warn', 'always'], |
31 | | -// 'space-infix-ops': 'warn', |
32 | | -// 'no-console': 'off', |
33 | | -// 'no-restricted-syntax': [ |
34 | | -// 'error', |
35 | | -// { |
36 | | -// selector: |
37 | | -// "CallExpression[callee.object.name='console'][callee.property.name!=/^(log|warn|error|info|trace)$/]", |
38 | | -// message: 'Unexpected property on console object was called', |
39 | | -// }, |
40 | | -// ], |
41 | | -// 'spaced-comment': [ |
42 | | -// 'error', |
43 | | -// 'always', |
44 | | -// { |
45 | | -// line: { |
46 | | -// markers: ['/'], |
47 | | -// exceptions: ['-', '+'], |
48 | | -// }, |
49 | | -// block: { |
50 | | -// markers: ['!'], |
51 | | -// exceptions: ['*'], |
52 | | -// balanced: true, |
53 | | -// }, |
54 | | -// }, |
55 | | -// ], |
56 | | -// |
57 | | -// // ---- TYPESCRIPT ---- // |
58 | | -// '@typescript-eslint/explicit-function-return-type': 'off', |
59 | | -// '@typescript-eslint/no-unused-vars': 'error', |
60 | | -// '@typescript-eslint/semi': ['warn', 'always'], |
61 | | -// }, |
62 | | -// }; |
| 1 | +module.exports = { |
| 2 | + env: { |
| 3 | + browser: true, |
| 4 | + commonjs: true, |
| 5 | + es2021: true, |
| 6 | + node: true, |
| 7 | + }, |
| 8 | + plugins: ['react', '@typescript-eslint'], |
| 9 | + extends: [ |
| 10 | + 'eslint:recommended', |
| 11 | + 'plugin:react/recommended', |
| 12 | + 'plugin:@typescript-eslint/recommended', |
| 13 | + 'plugin:react-hooks/recommended', |
| 14 | + ], |
| 15 | + ignorePatterns: ['.eslintrc.js', '*.config.js', 'dist/*', '__tests__/*'], |
| 16 | + overrides: [], |
| 17 | + parserOptions: { |
| 18 | + ecmaVersion: 12, |
| 19 | + sourceType: 'module', |
| 20 | + }, |
| 21 | + settings: { |
| 22 | + react: { |
| 23 | + version: 'detect', |
| 24 | + }, |
| 25 | + }, |
| 26 | + rules: { |
| 27 | + indent: ['warn', 2], |
| 28 | + 'no-unused-vars': ['off', { vars: 'local' }], |
| 29 | + 'prefer-const': 'warn', |
| 30 | + quotes: ['warn', 'single'], |
| 31 | + semi: ['warn', 'always'], |
| 32 | + 'space-infix-ops': 'warn', |
| 33 | + 'no-console': 'off', |
| 34 | + 'no-restricted-syntax': [ |
| 35 | + 'error', |
| 36 | + { |
| 37 | + selector: |
| 38 | + "CallExpression[callee.object.name='console'][callee.property.name!=/^(log|warn|error|info|trace)$/]", |
| 39 | + message: 'Unexpected property on console object was called', |
| 40 | + }, |
| 41 | + ], |
| 42 | + 'spaced-comment': [ |
| 43 | + 'error', |
| 44 | + 'always', |
| 45 | + { |
| 46 | + line: { |
| 47 | + markers: ['/'], |
| 48 | + exceptions: ['-', '+'], |
| 49 | + }, |
| 50 | + block: { |
| 51 | + markers: ['!'], |
| 52 | + exceptions: ['*'], |
| 53 | + balanced: true, |
| 54 | + }, |
| 55 | + }, |
| 56 | + ], |
| 57 | + |
| 58 | + // ---- TYPESCRIPT ---- // |
| 59 | + // '@typescript-eslint/no-explicit-any': ['error'], |
| 60 | + '@typescript-eslint/explicit-function-return-type': 'off', |
| 61 | + '@typescript-eslint/no-unused-vars': 'error', |
| 62 | + '@typescript-eslint/semi': ['warn', 'always'], |
| 63 | + }, |
| 64 | +}; |
0 commit comments