-
Notifications
You must be signed in to change notification settings - Fork 94
/
Copy patheslint.config.base.js
80 lines (79 loc) · 2.13 KB
/
eslint.config.base.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
import typescriptParser from '@typescript-eslint/parser';
import globals from 'globals';
export const eslintBaseConfig = {
languageOptions: {
parser: typescriptParser,
parserOptions: {
ecmaFeatures: {
jsx: true,
modules: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
},
globals: {
...globals.browser,
...globals.node,
...globals.es2021,
},
},
rules: {
// '@typescript-eslint/consistent-type-imports': 'warn',
// '@typescript-eslint/explicit-module-boundary-types': 'off',
// '@typescript-eslint/no-shadow': 'off',
// '@typescript-eslint/no-unused-vars': 'warn',
'class-methods-use-this': 'off',
'comma-dangle': ['error', 'always-multiline'],
curly: 1,
// 'import/extensions': 'off',
// 'import/no-default-export': 'error',
// 'import/no-extraneous-dependencies': 'off',
// 'import/no-unresolved': 0,
// 'import/prefer-default-export': 'off',
indent: 'off',
'jsx-quotes': ['error', 'prefer-double'],
'linebreak-style': 'off',
'max-len': 'off',
'newline-per-chained-call': 'off',
'no-bitwise': 'off',
'no-console': [
'error',
{
allow: ['warn', 'error'],
},
],
'no-continue': 'off',
'no-implicit-any-catch': 'off',
'no-nested-ternary': 'off',
'no-param-reassign': 'off',
'no-plusplus': 'off',
'no-restricted-syntax': 'off',
'no-shadow': 'off',
'no-unused-expressions': 'warn',
'no-unused-vars': 'off',
'no-var': 'warn',
'object-curly-newline': 'off',
'prettier/prettier': 'error',
'react/function-component-definition': 'off',
// 'react/jsx-filename-extension': [
// 1,
// {
// extensions: ['.ts', '.tsx'],
// },
// ],
'react/jsx-one-expression-per-line': 'off',
'react/jsx-props-no-spreading': 'off',
'react/jsx-uses-react': 'off',
'react/prop-types': 0,
'react/react-in-jsx-scope': 'off',
'react/require-default-props': 'off',
quotes: [
'error',
'single',
{
avoidEscape: true,
allowTemplateLiterals: true,
},
],
},
};