-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
106 lines (106 loc) · 3.34 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
module.exports = {
env: {
browser: true,
node: true,
es6: true,
jest: true,
},
extends: [
'eslint-config-airbnb',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'prettier',
],
globals: {},
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json', './packages/**/tsconfig.json'],
},
plugins: ['prettier', 'react', 'react-hooks', '@typescript-eslint'],
rules: {
'no-use-before-define': 'off',
'arrow-body-style': 'off',
'prettier/prettier': 'error',
indent: 'off',
'global-require': 'off',
semi: ['error', 'always'],
quotes: ['error', 'single'],
'guard-for-in': 'off',
'no-unused-expressions': [
'error',
{
allowTernary: true,
allowShortCircuit: true,
allowTaggedTemplates: true,
},
],
'spaced-comment': ['error', 'always', { markers: ['/'] }],
'import/extensions': 'off',
'import/no-unresolved': 'off',
'import/no-dynamic-require': 'off',
'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': 'off',
'func-names': 'off',
'no-shadow': 'off',
'no-console': 'off',
'no-nested-ternary': 'off',
'no-underscore-dangle': 'off',
'no-restricted-syntax': 'off',
'no-param-reassign': 'off',
'no-continue': 'off',
'no-restricted-globals': 'off',
'no-plusplus': 'off',
'class-methods-use-this': 'off',
'dot-notation': 'off',
'default-param-last': 'off',
'linebreak-style': ['error', 'unix'],
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
'react/function-component-definition': 'off',
'react/prop-types': 'off',
'react/no-unused-prop-types': 'off',
'react/require-default-props': 'off',
'react/jsx-wrap-multilines': 'off',
'react/jsx-filename-extension': 'off',
'react/jsx-props-no-spreading': 'off',
'react/destructuring-assignment': 'off',
'react/react-in-jsx-scope': 'off',
'react/no-deprecated': 'off',
'react/static-property-placement': 'off',
'react/jsx-one-expression-per-line': 'off',
'react/jsx-boolean-value': ['error', 'always'],
'react/state-in-constructor': 'off',
'react/sort-comp': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/no-triple-slash-reference': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/no-use-before-define': [
'error',
{
variables: false,
functions: false,
},
],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'warn', // or "error"
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
},
};