-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
50 lines (50 loc) · 1.52 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
module.exports = {
env: {
browser: true,
es6: true,
es2017: true,
},
extends: 'airbnb',
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
'import',
'jsx-a11y',
'react',
'react-hooks',
],
rules: {
'@typescript-eslint/no-untyped-public-signature': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-use-before-define': ['error'],
'import/prefer-default-export': 'off',
'import/extensions': 'off',
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
'react/jsx-filename-extension': [2, { extensions: ['.js', '.ts', '.tsx'] }],
'react/require-default-props': 'off',
'react/prop-types': 'off',
'react/jsx-wrap-multilines': ['error', {
declaration: 'parens',
assignment: 'parens',
return: 'parens',
arrow: 'parens',
condition: 'parens',
logical: 'parens',
prop: 'ignore',
}],
'object-curly-spacing': ['error', 'always'],
'max-len': ['error', 120, 2, { ignoreComments: true }],
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-use-before-define.md#how-to-use
'no-use-before-define': 'off',
'no-unused-vars': ['error', { vars: 'all', args: 'after-used', ignoreRestSiblings: false }],
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.ts', '.tsx'],
paths: ['./'],
},
},
},
};