-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.cjs
43 lines (43 loc) ยท 1.1 KB
/
.eslintrc.cjs
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
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'airbnb',
'airbnb-typescript',
'airbnb/hooks',
'plugin:react/recommended',
'plugin:jsx-a11y/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh', '@typescript-eslint', 'react-hooks', 'prettier'],
rules: {
'import/no-extraneous-dependencies': 'off',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'react/react-in-jsx-scope': 'off',
'react/function-component-definition': [
2,
{ namedComponents: 'arrow-function' },
],
'react/jsx-props-no-spreading': ['warn'],
'import/no-cycle': 'off',
'no-underscore-dangle': 'off',
},
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.json',
},
settings: {
'import/resolver': {
typescript: {},
},
},
};