-
Notifications
You must be signed in to change notification settings - Fork 10
/
.eslintrc.js
108 lines (108 loc) · 3.5 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
100
101
102
103
104
105
106
107
108
module.exports = {
root: true,
env: {
browser: true,
node: true,
es2020: true,
},
plugins: ['simple-import-sort'],
overrides: [
{
files: ['**/*.js'],
extends: ['eslint:recommended', 'plugin:prettier/recommended'],
rules: {
'prettier/prettier': [0, { endOfLine: 'auto', printWidth: 110 }, { usePrettierrc: true }],
semi: [2, 'always'],
'no-unused-expressions': 0,
'no-bitwise': [0],
'prefer-spread': 2,
'class-methods-use-this': 0,
'no-restricted-syntax': [0],
'no-duplicate-imports': 1,
'require-await': 2,
'prefer-const': 2,
'spaced-comment': 2,
'no-underscore-dangle': [0],
'react/no-unescaped-entities': [0],
'consistent-return': 0,
'no-return-assign': 0,
'no-console': 0,
'no-multi-assign': 0,
'no-case-declarations': 0,
'no-multi-spaces': 2,
'space-before-blocks': 2,
'no-empty-function': 2,
'rest-spread-spacing': 2,
'template-curly-spacing': 2,
'prefer-template': 2,
'arrow-spacing': 2,
'object-curly-spacing': [2, 'always'],
'keyword-spacing': [
'error',
{
overrides: {
if: { after: true },
for: { after: true },
while: { after: true },
catch: { after: true },
switch: { after: true },
},
},
],
},
},
{
extends: ['airbnb-typescript', 'plugin:prettier/recommended'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: [require('path').join(__dirname, 'tsconfig.json')],
ecmaFeatures: { jsx: true },
},
files: ['**/*.ts', '**/*.tsx'],
rules: {
'prettier/prettier': [0, { endOfLine: 'auto', printWidth: 110 }, { usePrettierrc: true }],
'no-nested-ternary': 0,
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/lines-between-class-members': [0],
'no-restricted-globals': 0,
'no-unused-expressions': 0,
'jsx-a11y/no-static-element-interactions': [0],
'jsx-a11y/click-events-have-key-events': 0,
'no-bitwise': [0],
'class-methods-use-this': 0,
'no-restricted-syntax': [0],
'no-underscore-dangle': [0],
'@typescript-eslint/no-unused-expressions': [0],
'react/no-unescaped-entities': [0],
'@typescript-eslint/no-unused-vars': 1,
'consistent-return': 0,
'jsx-a11y/no-noninteractive-element-interactions': [0],
'no-return-assign': 0,
'react/jsx-props-no-spreading': [0],
'jsx-a11y/label-has-associated-control': [0],
'react/require-default-props': [0],
'@typescript-eslint/naming-convention': 0,
'react/jsx-filename-extension': [1, { extensions: ['.tsx'] }],
'react/react-in-jsx-scope': 0,
'react/button-has-type': [0],
'react/prop-types': 1,
'simple-import-sort/imports': 2,
'jsx-a11y/anchor-is-valid': [
2,
{
components: ['Link'],
specialLink: ['hrefLeft', 'hrefRight'],
aspects: ['invalidHref', 'preferButton'],
},
],
'jsx-a11y/alt-text': 1,
'import/no-mutable-exports': 0,
'import/prefer-default-export': 0,
'no-console': 0,
'no-multi-assign': 0,
'no-case-declarations': 0,
'object-curly-spacing': [2, 'always'],
},
},
],
};