-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
40 lines (40 loc) · 1.45 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
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'airbnb',
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
plugins: ['@typescript-eslint'],
rules: {
'react/jsx-filename-extension': [2, { extensions: ['.js', '.jsx', '.ts', '.tsx'] }],
// note you must disable the base rule as it can report incorrect errors
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error'],
'react/jsx-indent': ['error', 3],
'react/jsx-indent-props': ['error', 3],
indent: ['error', 3, { SwitchCase: 1 }],
'linebreak-style': ['error', 'windows'],
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error'],
'@typescript-eslint/explicit-module-boundary-types': 'off',
'import/extensions': ['error', 'never'],
'react/jsx-fragments': ['error', 'element'],
'react/jsx-one-expression-per-line': 0,
'max-len': 0,
'no-nested-ternary': 0,
'no-unused-expressions': 0,
'react/jsx-props-no-spreading': 0,
'no-param-reassign': ['error', { props: true, ignorePropertyModificationsForRegex: ['^state'] }],
'comma-dangle': 'off',
'@typescript-eslint/comma-dangle': ['error', 'always-multiline'],
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
};