-
Notifications
You must be signed in to change notification settings - Fork 90
/
.eslintrc.js
152 lines (148 loc) · 4.51 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
const path = require('path')
module.exports = {
extends: [
'airbnb',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier',
'prettier/react',
'prettier/@typescript-eslint',
],
env: {
browser: true,
es6: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: path.resolve(__dirname, './tsconfig.test.json'),
sourceType: 'module',
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
ignorePatterns: ['/generated.tsx', 'node_modules/'],
plugins: ['prettier', '@typescript-eslint'],
rules: {
'prettier/prettier': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/class-name-casing': 'error',
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/indent': 'off',
'@typescript-eslint/no-param-reassign': 'off',
'@typescript-eslint/no-this-alias': 'error',
'@typescript-eslint/quotes': 'off',
'@typescript-eslint/space-within-parens': ['off', 'never'],
'@typescript-eslint/type-annotation-spacing': 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/prefer-regexp-exec': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/no-empty-function': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
vars: 'all',
args: 'after-used',
argsIgnorePattern: '^_',
ignoreRestSiblings: false,
ignoreRestSiblings: true,
caughtErrorsIgnorePattern: '^ignore',
},
],
'arrow-parens': ['off', 'as-needed'],
camelcase: 'off',
'capitalized-comments': 'error',
'consistent-return': 'off',
'class-methods-use-this': 'off',
'eol-last': 'off',
eqeqeq: ['error', 'smart'],
'id-blacklist': 'off',
'id-match': 'error',
'global-require': 'off',
'linebreak-style': 'off',
'new-parens': 'off',
'newline-per-chained-call': 'off',
'no-var': 'error',
'no-bitwise': 'off',
'no-eval': 'error',
'no-empty': 'off',
'no-plusplus': 'off',
'no-console': 'off',
'no-cond-assign': 'off',
'no-new-wrappers': 'error',
'no-param-reassign': 'off',
'no-underscore-dangle': 'off',
'no-restricted-syntax': 'off',
'no-prototype-builtins': 'off',
'no-duplicate-imports': 'error',
'no-useless-constructor': 'off',
'object-shorthand': 'error',
'one-var': ['error', 'never'],
'padding-line-between-statements': [
'error',
{
blankLine: 'always',
prev: '*',
next: 'return',
},
],
'prefer-const': 'error',
'prefer-template': 'error',
'quote-props': 'off',
radix: 'off',
'space-before-function-paren': 'off',
'spaced-comment': 'error',
'import/order': 'error',
'import/extensions': 'off',
'import/no-unresolved': 'off',
'import/no-extraneous-dependencies': 'off',
'import/prefer-default-export': 'off',
'import/no-dynamic-require': 'off',
'react/jsx-key': 'error',
'react/jsx-no-bind': 'error',
'react/self-closing-comp': 'error',
'react/state-in-constructor': 'off',
'react/jsx-props-no-spreading': 'off',
'react/no-did-update-set-state': 'off',
'react/prefer-stateless-function': 'off',
'react/destructuring-assignment': 'off',
'react/jsx-one-expression-per-line': 'off',
'react/jsx-boolean-value': ['error', 'always'],
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx', '.ts', '.tsx'] }],
'react/jsx-no-bind': 'off',
'react/no-unescaped-entities': 'off',
'react/static-property-placement': 'off',
'react/prop-types': 'off',
'react/sort-comp': [
'error',
{
order: [
'static-variables',
'static-methods',
'instance-variables',
'type-annotations',
'lifecycle',
'everything-else',
'/^on.+$/',
'/^handle.+$/',
'rendering',
],
groups: {
rendering: ['/^render.+$/', 'render'],
},
},
],
'jsx-a11y/anchor-is-valid': 'off',
'jsx-a11y/alt-text': 'off',
},
}