-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
117 lines (112 loc) · 4.35 KB
/
eslint.config.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
//// @ts-check
import eslintJsRecommended from '@eslint/js'
import globals from 'globals'
import reactPlugin from 'eslint-plugin-react'
import {
config as typeScriptEslintCreateConfig,
configs as typeScriptLintConfigs,
plugin as typeScriptPlugin
} from 'typescript-eslint'
const config = typeScriptEslintCreateConfig(
{ ignores: [ 'dist', 'node_modules', 'lib' ] },
{
extends: [
...typeScriptLintConfigs.recommendedTypeChecked,
eslintJsRecommended.configs.recommended,
reactPlugin.configs.flat.recommended
],
files: [ '**/*.ts', '**/*.tsx' ],
languageOptions: {
parserOptions: {
projectService: true,
ecmaFeatures: { 'jsx': true },
},
globals: {
...globals.browser,
...globals.node,
...globals.worker,
...globals.serviceworker,
...globals.jest,
React: true,
JSX: true
}
},
plugins: { typeScriptPlugin, reactPlugin },
settings: {
react: {
version: 'detect'
}
},
rules: {
'no-unused-vars': 0,
'no-undef': 0,
'quotes': [ 1, 'single', 'avoid-escape' ],
'semi': [ 1, 'never' ],
'comma-spacing': [ 1, {
'before': false,
'after': true
}],
'keyword-spacing': 1,
'object-curly-spacing': [ 1, 'always' ],
'array-callback-return': 1,
'array-bracket-spacing': [ 1, 'always', {
'objectsInArrays': false,
'arraysInArrays': false
}],
'arrow-parens': [ 1, 'as-needed' ],
'arrow-body-style': [ 1, 'as-needed' ],
'prefer-arrow-callback': 1,
'prefer-spread': 0,
'prefer-const': 1,
'no-cond-assign': 0,
'no-inner-declarations': 0,
'no-case-declarations': 0,
'comma-dangle': 1,
'eol-last': [ 1, 'never' ],
'no-trailing-spaces': 1,
'react/display-name': 0,
'react/jsx-no-bind': 0,
'react/no-children-prop': 0,
'react/prop-types': 0,
'react/jsx-curly-spacing': [ 1, 'always', {
'spacing': { 'objectLiterals': 'never' }
}],
'react/jsx-first-prop-new-line': [ 1, 'never' ],
'react/jsx-closing-bracket-location': [ 1, 'after-props' ],
'react/jsx-tag-spacing': [ 1, {
'beforeClosing': 'never'
}],
'react/jsx-no-useless-fragment': 1,
'react/jsx-props-no-multi-spaces': 1,
'react/jsx-fragments': [ 1, 'syntax' ],
'@typescript-eslint/no-unused-expressions': 0,
'@typescript-eslint/no-unused-vars': 1,
'@typescript-eslint/no-non-null-asserted-optional-chain' : 0,
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/no-misused-promises': 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/no-use-before-define': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/camelcase': 0,
'@typescript-eslint/member-delimiter-style': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-unsafe-member-access': 0,
'@typescript-eslint/no-unsafe-assignment': 0,
'@typescript-eslint/restrict-plus-operands': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/no-unsafe-call': 0,
'@typescript-eslint/restrict-template-expressions': 0,
'@typescript-eslint/no-floating-promises': 0,
'@typescript-eslint/no-unsafe-return': 0,
'@typescript-eslint/unbound-method': 0,
'@typescript-eslint/no-unnecessary-type-assertion': 0,
'@typescript-eslint/no-unsafe-argument': 0,
'@typescript-eslint/ban-types': 0,
'@typescript-eslint/no-base-to-string': 0,
'@typescript-eslint/only-throw-error': 0,
'@typescript-eslint/await-thenable': 0
}
}
)
export default config