-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
54 lines (53 loc) · 1.61 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
44
45
46
47
48
49
50
51
52
53
54
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'airbnb',
// 'plugin:react/recommended',
// 'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
overrides: [],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.json',
extraFileExtensions: ['.json'],
tsconfigRootDir: __dirname,
},
plugins: ['react-hooks', 'prettier'],
rules: {
'prettier/prettier': 'error',
'no-console': 'error',
'react/react-in-jsx-scope': 0,
// '@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'react/jsx-props-no-spreading': ['warn', { custom: 'ignore' }],
// 'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'react/forbid-prop-types': 'off',
'react/prop-types': 'off',
'no-unsafe-optional-chaining': 'warn',
'import/no-import-module-exports': 'off',
'react/function-component-definition': 'off',
'react/jsx-filename-extension': 'off',
'import/prefer-default-export': 'warn',
'react/require-default-props': 'off',
'object-curly-newline': 'off',
'no-undef': 0,
'import/no-unresolved': 0,
'prefer-template': 1,
'react/jsx-no-useless-fragment': 0,
'import/extensions': 0,
'no-plusplus': 0,
'no-unused-vars': 'error',
'class-methods-use-this': 'warn',
'react/state-in-constructor': 0,
'react/destructuring-assignment': 0,
'no-param-reassign': 'warn',
'no-nested-ternary': 'warn',
'jsx-a11y/click-events-have-key-events': 'off',
},
};