-
Notifications
You must be signed in to change notification settings - Fork 372
Expand file tree
/
Copy path.eslintrc.js
More file actions
52 lines (51 loc) · 1.33 KB
/
.eslintrc.js
File metadata and controls
52 lines (51 loc) · 1.33 KB
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
let rules = {
'max-len': ['error', 80, 2, { ignoreUrls: true }],
'no-console': [0],
'no-restricted-syntax': 'off',
'no-continue': 'off',
'no-underscore-dangle': 'off',
'import/extensions': 'off',
'import/no-unresolved': 'off',
'operator-linebreak': 'off',
'implicit-arrow-linebreak': 'off',
'react/destructuring-assignment': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'react/jsx-one-expression-per-line': 'off',
'react/jsx-filename-extension': [2, { extensions: ['.ts', '.tsx'] }],
'lines-between-class-members': [
'error',
'always',
{ exceptAfterSingleLine: true },
],
};
module.exports = {
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended', 'prettier'],
parser: '@typescript-eslint/parser',
// parser: '@babel/eslint-parser',
rules,
env: {
browser: true,
commonjs: true,
node: true,
jest: true,
es6: true,
},
plugins: ['@typescript-eslint', 'react', 'react-hooks', 'jsx-a11y'],
settings: {
ecmascript: 6,
jsx: true,
'import/resolver': {
node: {
paths: ['src'],
},
},
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
react: {
pragma: 'React',
version: '18.2.0',
},
},
};