This repository has been archived by the owner on Aug 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
80 lines (77 loc) · 1.99 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
/* eslint-disable max-len */
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
env: {
browser: true,
node: true,
},
extends: [
'airbnb',
'airbnb-typescript',
'airbnb/hooks',
],
plugins: [
'import',
],
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.json', '.ts', '.tsx', '.d.ts'],
},
webpack: {
config: './configs/webpack.config.base.ts',
},
},
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx', '.d.ts'],
},
},
rules: {
'linebreak-style': 0,
'max-len': [1, 100, 2, {
ignoreUrls: true,
ignoreComments: false,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
}],
'no-param-reassign': ['error', { props: true, ignorePropertyModificationsFor: ['state'] }],
'import/extensions': [2, 'always', {
js: 'never', ts: 'never', tsx: 'never',
}],
'import/no-cycle': 0,
'import/no-extraneous-dependencies': 0,
'import/order': [1, {
groups: [
[
'builtin',
'external',
'sibling',
'type',
],
],
'newlines-between': 'always',
}],
'import/prefer-default-export': 0,
'react/function-component-definition': [1, { namedComponents: 'arrow-function' }],
'react/jsx-fragments': [1, 'element'],
'react/jsx-max-props-per-line': [2, {
maximum: 1,
when: 'always',
}],
'react/prefer-stateless-function': 0,
'react/prop-types': 0,
'react/require-default-props': [1, { ignoreFunctionalComponents: true }],
'@typescript-eslint/no-unused-vars': [1, { vars: 'all', args: 'after-used', ignoreRestSiblings: true }],
'@typescript-eslint/consistent-type-imports': [1, {
prefer: 'no-type-imports',
disallowTypeAnnotations: true,
}],
},
};