-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy path.eslintrc.js
65 lines (65 loc) · 1.62 KB
/
.eslintrc.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
module.exports = {
env: {
browser: true,
es6: true,
node: true,
},
extends: [
'airbnb-typescript',
'plugin:security/recommended',
'plugin:react/jsx-runtime',
'plugin:import/recommended'
],
parserOptions: {
ecmaVersion: 2020,
project: './tsconfig.json'
},
parser: '@typescript-eslint/parser',
rules: {
'license-header': 'error',
'arrow-parens': ['error', 'always'],
'no-tabs': [
'error',
{
allowIndentationTabs: true,
},
],
'no-plusplus': 'off',
'object-curly-newline': 'off',
'max-len': [
'error',
{
code: 160,
ignoreComments: true,
ignoreTemplateLiterals: true,
ignoreStrings: true,
ignorePattern: "<(\S*?)[^>]>.?</\1>|<.*?/>",
},
],
'no-throw-literal': 'off',
'no-restricted-syntax': 'off',
'no-underscore-dangle': [
'error',
{
allow: ['_id'],
},
],
'no-console': ['error', { allow: ['warn', 'error', 'debug'] }],
'security/detect-non-literal-fs-filename': 'off',
'security/detect-object-injection': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'indent': 'off',
'import/prefer-default-export': 'off',
'@typescript-eslint/indent': ['error', 'tab', { SwitchCase: 1 }],
'react/jsx-indent': ['error', 'tab'],
'react/jsx-props-no-spreading': 'off',
'react/prop-types': 'off',
'react/require-default-props': 'off',
'react/jsx-indent-props': ['error', 'tab'],
'react/jsx-one-expression-per-line': 'off',
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'react/jsx-filename-extension': ['warn', { 'extensions': ['.ts', '.tsx'] }],
}
};