-
Notifications
You must be signed in to change notification settings - Fork 11
/
.eslintrc.js
68 lines (68 loc) · 2 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
const intentSize = 2;
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
plugins: ['@typescript-eslint', 'react'],
root: true,
env: {
commonjs: true,
browser: true,
node: true,
es6: true,
jest: true,
},
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
ecmaFeatures: {
globalReturn: false,
impliedStrict: true,
jsx: true,
modules: true,
},
requireConfigFile: false,
allowImportExportEverywhere: false,
},
rules: {
camelcase: 'off',
'no-restricted-syntax': 'off',
'no-console': ['error', { allow: ['log'] }],
'import/prefer-default-export': 'off',
'no-await-in-loop': 'off',
'react/prop-types': 'off',
'react/jsx-uses-react': ['error'],
'react/jsx-uses-vars': ['error'],
'react/jsx-filename-extension': [
'error',
{ extensions: ['.js', '.jsx', '.ts', '.tsx'] },
],
'no-unused-vars': 'error',
'import/no-unresolved': 'off',
'import/no-extraneous-dependencies': 'off',
'react/prefer-stateless-function': 'error',
'react/no-array-index-key': 'error',
'react/jsx-indent-props': ['error', intentSize],
'react/jsx-indent': ['error', intentSize],
indent: ['error', intentSize, { SwitchCase: 1 }],
'require-atomic-updates': 'off',
'@typescript-eslint/indent': ['error', intentSize, { SwitchCase: 1 }],
'@typescript-eslint/prefer-interface': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/no-empty-function': 'error',
'@typescript-eslint/unified-signatures': 'error',
'prefer-destructuring': 'error',
'@typescript-eslint/no-explicit-any': 'error',
},
settings: {
react: {
version: 'detect',
},
},
};