-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
68 lines (68 loc) · 2.32 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
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'airbnb-typescript',
],
rules: {
'react/jsx-props-no-spreading': 'off',
'react/state-in-constructor': ['error', 'never'],
'react/no-array-index-key': 'off',
'react/prop-types': 'off',
'react/no-danger': 'error',
'react/static-property-placement': 'off',
'react/destructuring-assignment': ['error', 'always', { ignoreClassFields: true }],
'react/sort-comp': ['error', {
order: [
'static-variables',
'static-methods',
'instance-variables',
'getters',
'setters',
'lifecycle',
'render',
'instance-methods',
'everything-else'
]
}],
'import/prefer-default-export': 'off',
'import/no-default-export': 'error',
'import/no-cycle': 'off',
'@typescript-eslint/indent': ['error', 2], // TODO: УДОЛИТЬ
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/type-annotation-spacing': ['error', {
'before': false,
'after': true,
'overrides': { arrow: { 'before': true, 'after': true }}
}],
'import/order': ['error', {
groups: [['builtin', 'external'], 'internal', ['parent', 'sibling'], 'index'],
'newlines-between': 'always',
}],
'import/no-extraneous-dependencies': 'off', // TODO: uncomment ['error', { devDependencies: ['**/test.tsx', '**/test.ts'] }],
'import/no-internal-modules': 'off', // TODO: ПОДУМОТЬ
'object-curly-newline': 'off', // TODO: УДОЛИТЬ
'implicit-arrow-linebreak': 'off', // TODO: УДОЛИТЬ
'no-restricted-imports': ['error', 'react-jss', '@material-ui/core', '@material-ui/icons', 'i18next', 'react-i18next'], // TODO: УДОЛИТЬ react-jss
'no-unused-expressions': ['error', { allowShortCircuit: true, allowTernary: true }],
'no-console': ['error', { allow: ['info', 'warn', 'error'] }],
'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }],
'arrow-parens': ['error', 'as-needed'], // TODO: УДОЛИТЬ
'no-undef': 'off',
'class-methods-use-this': 'off'
},
env: {
jest: true,
browser: true,
node: true,
},
globals: {
window: 'readonly',
},
settings: {
'import/resolver': {
node: {
paths: ['./src'],
},
},
},
};