-
Notifications
You must be signed in to change notification settings - Fork 11
/
.eslintrc.js
99 lines (99 loc) · 3.21 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
module.exports = {
env: { browser: true, node: true },
parser: '@typescript-eslint/parser',
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx']
},
'import/extensions': [
'.ts',
'.tsx'
]
},
overrides: [{
files: ['*.ts', '*.tsx'],
}],
ignorePatterns: ['dist'],
extends: ['airbnb', 'plugin:import/errors', 'plugin:import/typescript'],
plugins: ['react-hooks'],
rules: {
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'react-hooks/exhaustive-deps': 'warn',
'linebreak-style': 0,
'react/require-default-props': 'off',
'react/prop-types': 'off',
'react/jsx-filename-extension': 'off',
'react/jsx-props-no-spreading': 'off',
'import/no-extraneous-dependencies': 'off',
'import/prefer-default-export': 'off',
'prefer-destructuring': [
'error', {
VariableDeclarator: {
array: false,
object: true
},
AssignmentExpression: {
array: false,
object: false
}
}, {
enforceForRenamedProperties: false
}
],
'max-classes-per-file': 'off',
indent: [
'error', 2, {
SwitchCase: 1,
VariableDeclarator: { var: 2, let: 2, const: 3 },
ObjectExpression: 'first'
}
],
semi: ['error', 'always'],
'comma-dangle': ['error', 'only-multiline'],
'max-len': [
'error', 120, {
ignoreComments: true, ignoreStrings: true, ignoreTemplateLiterals: true
}
],
'no-multi-spaces': [
'error', {
exceptions: {
ExportNamedDeclaration: true,
VariableDeclarator: true,
AssignmentExpression: true,
AssignmentPattern: true
}
}
],
'global-require': 'warn',
'one-var': ['error', 'never'],
strict: 'off',
camelcase: 'off',
'no-console': 'off',
'func-names': 'off',
'no-param-reassign': 'off',
'arrow-body-style': ['error', 'as-needed', { requireReturnForObjectLiteral: true }],
'no-underscore-dangle': 'off',
'import/extensions': ['error',
{ json: 'always' }
],
'import/order': [
'error', {
alphabetize: {
order: 'asc',
caseInsensitive: true
},
'newlines-between': 'always',
groups: [
'builtin',
['external', 'internal'],
['sibling', 'parent', 'index'],
'object'
]
}
],
'arrow-parens': ['error', 'always'],
'key-spacing': ['warn', { align: 'value', mode: 'minimum' }],
'one-var-declaration-per-line': ['error', 'initializations']
},
};