-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy path.eslintrc.cjs
51 lines (51 loc) · 1.71 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
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: ['plugin:react/recommended', 'react-app'],
ignorePatterns: ['build', '.*.js', '*.config.js', 'node_modules'],
overrides: [],
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['react', '@typescript-eslint', 'import', 'react-hooks', 'react-security'],
rules: {
'@typescript-eslint/brace-style': ['off'],
'@typescript-eslint/space-before-function-paren': [
'error',
{ anonymous: 'always', named: 'never', asyncArrow: 'always' },
],
'@typescript-eslint/semi': ['error', 'always'],
'@typescript-eslint/triple-slash-reference': ['error', { types: 'prefer-import' }],
'@typescript-eslint/indent': ['off'],
'@typescript-eslint/comma-dangle': ['error', 'always-multiline'],
'@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/member-delimiter-style': [
'error',
{
multiline: {
delimiter: 'semi',
requireLast: true,
},
singleline: {
delimiter: 'semi',
requireLast: false,
},
},
],
'@typescript-eslint/explicit-function-return-type': 'off',
'react/jsx-props-no-spreading': 'warn',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'react/react-in-jsx-scope': 'off',
},
settings: {
react: {
version: 'detect',
},
},
};