-
Notifications
You must be signed in to change notification settings - Fork 26
/
.eslintrc.js
52 lines (52 loc) · 1.7 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
module.exports = {
extends: 'erb/typescript',
rules: {
'@typescript-eslint/ban-ts-comment': 'warn',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/naming-convention': 'off',
'consistent-return': 'warn',
'dot-notation': 'off',
'import/no-extraneous-dependencies': 'off',
'import/prefer-default-export': 'off',
'import/no-cycle': 'warn',
'jsx-a11y/anchor-is-valid': 'warn',
'jsx-a11y/click-events-have-key-events': 'warn',
'lines-between-class-members': 'off',
'max-classes-per-file': 'off',
'no-param-reassign': 'off',
'no-plusplus': 'off',
'no-restricted-syntax': 'off',
'prefer-destructuring': 'warn',
'promise/no-return-wrap': 'warn',
'react/destructuring-assignment': 'off',
'react/jsx-curly-newline': 'off',
'react/jsx-one-expression-per-line': 'off',
'react/jsx-props-no-spreading': 'off',
'react/jsx-wrap-multilines': 'off',
'react/no-access-state-in-setstate': 'warn',
'react/no-array-index-key': 'off',
'react/no-did-update-set-state': 'warn',
'react/no-will-update-set-state': 'warn',
'react/prop-types': 'off',
'react/static-property-placement': 'off',
},
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
project: './tsconfig.json',
tsconfigRootDir: __dirname,
createDefaultProgram: true,
},
settings: {
'import/resolver': {
// See https://github.com/benmosher/eslint-plugin-import/issues/1396#issuecomment-575727774 for line below
node: {},
webpack: {
config: require.resolve('./configs/webpack.config.eslint.js'),
},
},
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
},
};