-
Notifications
You must be signed in to change notification settings - Fork 25
/
.eslintrc.js
65 lines (63 loc) · 1.99 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
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:@typescript-eslint/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
],
plugins: ['import'],
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
ecmaFeatures: { jsx: true },
},
env: {
es6: true,
node: true,
},
rules: {
'import/order': [
'error', {
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
'newlines-between': 'always',
groups: ['builtin', 'external', ['parent', 'sibling', 'index']],
},
],
'quotes': ['error', 'single'],
'eol-last': ['error', 'always'],
'prefer-template': 'error',
'object-curly-spacing': ['error', 'always'],
'comma-spacing': ['error'],
'no-multi-spaces': ['error'],
'no-unexpected-multiline': ['error'],
'object-curly-newline': ['error', { multiline: true }],
'array-bracket-newline': ['error', { multiline: true }],
'no-multiple-empty-lines': ['error', { max: 2, maxEOF: 0 }],
'function-paren-newline': ['error', 'multiline'],
'no-trailing-spaces': 'error',
'react/prop-types': ['off'],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/member-delimiter-style': ['error'],
'@typescript-eslint/type-annotation-spacing': ['error'],
'indent': 'off',
'@typescript-eslint/indent': ['error', 2],
'semi': 'off',
'@typescript-eslint/semi': ['error'],
'comma-dangle': 'off',
'@typescript-eslint/comma-dangle': ['error', 'always-multiline'],
'no-empty-function': 'off',
'@typescript-eslint/no-empty-function': ['off'],
'@typescript-eslint/no-explicit-any': ['off'],
'react/no-unknown-property': ['error', { ignore: ['css'] }],
},
settings: {
react: { 'version': 'detect' },
'import/parsers': { '@typescript-eslint/parser': ['.ts', '.tsx'] },
},
};