-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
78 lines (75 loc) · 2.24 KB
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import js from '@eslint/js';
import eslintPluginReact from 'eslint-plugin-react';
import eslintPluginImport from 'eslint-plugin-import';
import eslintPluginJsxA11y from 'eslint-plugin-jsx-a11y';
import tsEslintPlugin from '@typescript-eslint/eslint-plugin';
import eslintConfigPrettier from 'eslint-config-prettier';
import globals from 'globals';
export default [
{
ignores: ['coverage/*', 'dist/*', '.prettierrc.js', 'env.d.ts', 'src/serviceWorker.js'],
},
js.configs.recommended,
eslintConfigPrettier,
{
plugins: {
eslintPluginReact,
eslintPluginImport,
eslintPluginJsxA11y,
tsEslintPlugin,
},
rules: {
'no-console': 1,
},
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
settings: {
react: {
// Tells eslint-plugin-react to automatically detect the version of React to use.
version: 'detect',
},
// Tells eslint how to resolve imports
'import/resolver': {
node: {
paths: ['src'],
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
},
];
// module.exports = {
// extends: [
// // By extending from a plugin config, we can get recommended rules without having to add them manually.
// 'eslint:recommended',
// 'plugin:react/recommended',
// 'plugin:import/recommended',
// 'plugin:jsx-a11y/recommended',
// 'plugin:@typescript-eslint/recommended',
// // This disables the formatting rules in ESLint that Prettier is going to be responsible for handling.
// // Make sure it's always the last config, so it gets the chance to override other configs.
// 'eslint-config-prettier',
// ],
// settings: {
// react: {
// // Tells eslint-plugin-react to automatically detect the version of React to use.
// version: 'detect',
// },
// // Tells eslint how to resolve imports
// 'import/resolver': {
// node: {
// paths: ['src'],
// extensions: ['.js', '.jsx', '.ts', '.tsx'],
// },
// },
// },
// env: {
// browser: true,
// node: true,
// },
// ignorePatterns: ['node_modules/', 'dist/', '.prettierrc.js', '.eslintrc.js', 'env.d.ts', 'src/serviceWorker.js'],
// };