@luxass/eslint-config 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -1
- package/src/index.js +112 -121
- package/src/javascript.js +106 -118
- package/src/typescript.js +101 -114
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luxass/eslint-config",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Luxass' ESLint config",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Lucas Norgaard",
|
|
@@ -40,8 +40,10 @@
|
|
|
40
40
|
"jsonc-eslint-parser": "^2.1.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
+
"@luxass/prettier-config": "^1.0.4",
|
|
43
44
|
"bumpp": "^7.1.1",
|
|
44
45
|
"eslint": "^8.16.0",
|
|
46
|
+
"prettier": "^2.7.1",
|
|
45
47
|
"typescript": "^4.7.2"
|
|
46
48
|
},
|
|
47
49
|
"scripts": {
|
package/src/index.js
CHANGED
|
@@ -2,162 +2,153 @@ module.exports = {
|
|
|
2
2
|
env: {
|
|
3
3
|
es6: true,
|
|
4
4
|
browser: true,
|
|
5
|
-
node: true
|
|
5
|
+
node: true
|
|
6
6
|
},
|
|
7
7
|
reportUnusedDisableDirectives: true,
|
|
8
8
|
extends: [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
'eslint-config-standard',
|
|
10
|
+
'plugin:import/recommended',
|
|
11
|
+
'plugin:eslint-comments/recommended',
|
|
12
|
+
'plugin:jsonc/recommended-with-jsonc',
|
|
13
|
+
'plugin:markdown/recommended',
|
|
14
|
+
'./javascript',
|
|
15
|
+
'./typescript'
|
|
16
16
|
],
|
|
17
17
|
ignorePatterns: [
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
'*.min.*',
|
|
19
|
+
'CHANGELOG.md',
|
|
20
|
+
'dist',
|
|
21
|
+
'LICENSE*',
|
|
22
|
+
'coverage',
|
|
23
|
+
'public',
|
|
24
|
+
'packages-lock.json',
|
|
25
|
+
'pnpm-lock.yaml',
|
|
26
|
+
'yarn.lock'
|
|
27
27
|
],
|
|
28
|
-
plugins: [
|
|
28
|
+
plugins: ['unicorn'],
|
|
29
29
|
settings: {
|
|
30
|
-
|
|
31
|
-
node: { extensions: [
|
|
32
|
-
}
|
|
30
|
+
'import/resolver': {
|
|
31
|
+
node: { extensions: ['.js', '.mjs'] }
|
|
32
|
+
}
|
|
33
33
|
},
|
|
34
34
|
overrides: [
|
|
35
35
|
{
|
|
36
|
-
files: [
|
|
37
|
-
parser:
|
|
36
|
+
files: ['*.json', '*.json5'],
|
|
37
|
+
parser: 'jsonc-eslint-parser',
|
|
38
38
|
rules: {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
],
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"error",
|
|
50
|
-
{ multiline: true, consistent: true },
|
|
51
|
-
],
|
|
52
|
-
"jsonc/object-curly-spacing": ["error", "always"],
|
|
53
|
-
"jsonc/object-property-newline": [
|
|
54
|
-
"error",
|
|
55
|
-
{ allowMultiplePropertiesPerLine: true },
|
|
56
|
-
],
|
|
57
|
-
},
|
|
39
|
+
'jsonc/array-bracket-spacing': ['error', 'never'],
|
|
40
|
+
'jsonc/comma-dangle': ['error', 'never'],
|
|
41
|
+
'jsonc/comma-style': ['error', 'last'],
|
|
42
|
+
'jsonc/indent': ['error', 2],
|
|
43
|
+
'jsonc/key-spacing': ['error', { beforeColon: false, afterColon: true }],
|
|
44
|
+
'jsonc/no-octal-escape': 'error',
|
|
45
|
+
'jsonc/object-curly-newline': ['error', { multiline: true, consistent: true }],
|
|
46
|
+
'jsonc/object-curly-spacing': ['error', 'always'],
|
|
47
|
+
'jsonc/object-property-newline': ['error', { allowMultiplePropertiesPerLine: true }]
|
|
48
|
+
}
|
|
58
49
|
},
|
|
59
50
|
{
|
|
60
|
-
files: [
|
|
61
|
-
parser:
|
|
51
|
+
files: ['package.json'],
|
|
52
|
+
parser: 'jsonc-eslint-parser',
|
|
62
53
|
rules: {
|
|
63
|
-
|
|
64
|
-
|
|
54
|
+
'jsonc/sort-keys': [
|
|
55
|
+
'error',
|
|
65
56
|
{
|
|
66
|
-
pathPattern:
|
|
57
|
+
pathPattern: '^$',
|
|
67
58
|
order: [
|
|
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
|
-
]
|
|
59
|
+
'name',
|
|
60
|
+
'publisher',
|
|
61
|
+
'displayName',
|
|
62
|
+
'version',
|
|
63
|
+
'private',
|
|
64
|
+
'type',
|
|
65
|
+
'packageManager',
|
|
66
|
+
'description',
|
|
67
|
+
'author',
|
|
68
|
+
'license',
|
|
69
|
+
'funding',
|
|
70
|
+
'homepage',
|
|
71
|
+
'repository',
|
|
72
|
+
'bugs',
|
|
73
|
+
'keywords',
|
|
74
|
+
'categories',
|
|
75
|
+
'sideEffects',
|
|
76
|
+
'exports',
|
|
77
|
+
'main',
|
|
78
|
+
'module',
|
|
79
|
+
'types',
|
|
80
|
+
'typesVersions',
|
|
81
|
+
'bin',
|
|
82
|
+
'icon',
|
|
83
|
+
'files',
|
|
84
|
+
'engines',
|
|
85
|
+
'activationEvents',
|
|
86
|
+
'contributes',
|
|
87
|
+
'scripts',
|
|
88
|
+
'peerDependencies',
|
|
89
|
+
'peerDependenciesMeta',
|
|
90
|
+
'dependencies',
|
|
91
|
+
'optionalDependencies',
|
|
92
|
+
'devDependencies',
|
|
93
|
+
'pnpm'
|
|
94
|
+
]
|
|
104
95
|
},
|
|
105
96
|
{
|
|
106
|
-
pathPattern:
|
|
107
|
-
order: { type:
|
|
97
|
+
pathPattern: '^(?:dev|peer|optional|bundled)?[Dd]ependencies$',
|
|
98
|
+
order: { type: 'asc' }
|
|
108
99
|
},
|
|
109
100
|
{
|
|
110
|
-
pathPattern:
|
|
111
|
-
order: [
|
|
112
|
-
}
|
|
113
|
-
]
|
|
114
|
-
}
|
|
101
|
+
pathPattern: '^exports.*$',
|
|
102
|
+
order: ['types', 'require', 'import']
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
}
|
|
115
106
|
},
|
|
116
107
|
{
|
|
117
|
-
files: [
|
|
108
|
+
files: ['*.d.ts'],
|
|
118
109
|
rules: {
|
|
119
|
-
|
|
120
|
-
}
|
|
110
|
+
'import/no-duplicates': 'off'
|
|
111
|
+
}
|
|
121
112
|
},
|
|
122
113
|
{
|
|
123
|
-
files: [
|
|
114
|
+
files: ['*.js'],
|
|
124
115
|
rules: {
|
|
125
|
-
|
|
126
|
-
}
|
|
116
|
+
'@typescript-eslint/no-var-requires': 'off'
|
|
117
|
+
}
|
|
127
118
|
},
|
|
128
119
|
{
|
|
129
|
-
files: [
|
|
120
|
+
files: ['scripts/**/*.*', 'cli.*'],
|
|
130
121
|
rules: {
|
|
131
|
-
|
|
132
|
-
}
|
|
122
|
+
'no-console': 'off'
|
|
123
|
+
}
|
|
133
124
|
},
|
|
134
125
|
{
|
|
135
|
-
files: [
|
|
126
|
+
files: ['*.test.ts', '*.test.js', '*.spec.ts', '*.spec.js'],
|
|
136
127
|
rules: {
|
|
137
|
-
|
|
138
|
-
}
|
|
128
|
+
'no-unused-expressions': 'off'
|
|
129
|
+
}
|
|
139
130
|
},
|
|
140
131
|
{
|
|
141
|
-
files: [
|
|
132
|
+
files: ['**/*.md/*.*'],
|
|
142
133
|
rules: {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
}
|
|
134
|
+
'@typescript-eslint/no-redeclare': 'off',
|
|
135
|
+
'@typescript-eslint/no-unused-vars': 'off',
|
|
136
|
+
'@typescript-eslint/no-use-before-define': 'off',
|
|
137
|
+
'@typescript-eslint/no-var-requires': 'off',
|
|
138
|
+
'@typescript-eslint/comma-dangle': 'off',
|
|
139
|
+
'import/no-unresolved': 'off',
|
|
140
|
+
'no-alert': 'off',
|
|
141
|
+
'no-console': 'off',
|
|
142
|
+
'no-restricted-imports': 'off',
|
|
143
|
+
'no-undef': 'off',
|
|
144
|
+
'no-unused-expressions': 'off',
|
|
145
|
+
'no-unused-vars': 'off'
|
|
146
|
+
}
|
|
147
|
+
}
|
|
157
148
|
],
|
|
158
149
|
rules: {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
}
|
|
150
|
+
'eol-last': 'off',
|
|
151
|
+
'no-trailing-spaces': 'off',
|
|
152
|
+
'padded-blocks': 'off'
|
|
153
|
+
}
|
|
163
154
|
};
|
package/src/javascript.js
CHANGED
|
@@ -1,141 +1,129 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
rules: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
semi: [
|
|
9
|
-
quotes: [
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
camelcase:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
indent: [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"error",
|
|
33
|
-
"DebuggerStatement",
|
|
34
|
-
"LabeledStatement",
|
|
35
|
-
"WithStatement",
|
|
36
|
-
],
|
|
37
|
-
"object-curly-spacing": ["error", "always"],
|
|
38
|
-
"no-return-await": "off",
|
|
39
|
-
"space-before-function-paren": [
|
|
40
|
-
"error",
|
|
3
|
+
'import/order': 'error',
|
|
4
|
+
'import/first': 'error',
|
|
5
|
+
'import/no-mutable-exports': 'error',
|
|
6
|
+
'import/no-unresolved': 'off',
|
|
7
|
+
'import/no-absolute-path': 'off',
|
|
8
|
+
semi: ['warn', 'always'],
|
|
9
|
+
quotes: ['error', 'double'],
|
|
10
|
+
'quote-props': ['warn', 'as-needed'],
|
|
11
|
+
'no-unused-vars': 'warn',
|
|
12
|
+
'no-param-reassign': 'off',
|
|
13
|
+
'array-bracket-spacing': ['error', 'never'],
|
|
14
|
+
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
|
|
15
|
+
'block-spacing': ['error', 'always'],
|
|
16
|
+
camelcase: 'off',
|
|
17
|
+
'comma-spacing': ['error', { before: false, after: true }],
|
|
18
|
+
'comma-style': ['error', 'last'],
|
|
19
|
+
'comma-dangle': ['error', 'only-multiline'],
|
|
20
|
+
'no-constant-condition': 'warn',
|
|
21
|
+
'no-debugger': 'error',
|
|
22
|
+
'no-console': ['warn', { allow: ['warn', 'error'] }],
|
|
23
|
+
'no-cond-assign': ['error', 'always'],
|
|
24
|
+
'func-call-spacing': ['off', 'never'],
|
|
25
|
+
'key-spacing': ['error', { beforeColon: false, afterColon: true }],
|
|
26
|
+
indent: ['error', 2, { SwitchCase: 1, VariableDeclarator: 1, outerIIFEBody: 1 }],
|
|
27
|
+
'no-restricted-syntax': ['error', 'DebuggerStatement', 'LabeledStatement', 'WithStatement'],
|
|
28
|
+
'object-curly-spacing': ['error', 'always'],
|
|
29
|
+
'no-return-await': 'off',
|
|
30
|
+
'space-before-function-paren': [
|
|
31
|
+
'error',
|
|
41
32
|
{
|
|
42
|
-
anonymous:
|
|
43
|
-
named:
|
|
44
|
-
asyncArrow:
|
|
45
|
-
}
|
|
33
|
+
anonymous: 'always',
|
|
34
|
+
named: 'never',
|
|
35
|
+
asyncArrow: 'always'
|
|
36
|
+
}
|
|
46
37
|
],
|
|
47
38
|
// "no-multiple-empty-lines": ["warn", { max: 1, maxBOF: 0, maxEOF: 0 }],
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
39
|
+
'no-multiple-empty-lines': 'off',
|
|
40
|
+
'no-var': 'error',
|
|
41
|
+
'prefer-const': [
|
|
42
|
+
'error',
|
|
52
43
|
{
|
|
53
|
-
destructuring:
|
|
54
|
-
ignoreReadBeforeAssign: true
|
|
55
|
-
}
|
|
44
|
+
destructuring: 'any',
|
|
45
|
+
ignoreReadBeforeAssign: true
|
|
46
|
+
}
|
|
56
47
|
],
|
|
57
|
-
|
|
58
|
-
|
|
48
|
+
'prefer-arrow-callback': [
|
|
49
|
+
'error',
|
|
59
50
|
{
|
|
60
51
|
allowNamedFunctions: false,
|
|
61
|
-
allowUnboundThis: true
|
|
62
|
-
}
|
|
52
|
+
allowUnboundThis: true
|
|
53
|
+
}
|
|
63
54
|
],
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
55
|
+
'object-shorthand': [
|
|
56
|
+
'error',
|
|
57
|
+
'always',
|
|
67
58
|
{
|
|
68
59
|
ignoreConstructors: false,
|
|
69
|
-
avoidQuotes: true
|
|
70
|
-
}
|
|
60
|
+
avoidQuotes: true
|
|
61
|
+
}
|
|
71
62
|
],
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
63
|
+
'prefer-exponentiation-operator': 'error',
|
|
64
|
+
'prefer-rest-params': 'error',
|
|
65
|
+
'prefer-spread': 'error',
|
|
66
|
+
'prefer-template': 'error',
|
|
67
|
+
'template-curly-spacing': 'error',
|
|
68
|
+
'arrow-parens': ['error', 'as-needed', { requireForBlockBody: true }],
|
|
69
|
+
'generator-star-spacing': 'off',
|
|
70
|
+
'spaced-comment': [
|
|
71
|
+
'error',
|
|
72
|
+
'always',
|
|
82
73
|
{
|
|
83
74
|
line: {
|
|
84
|
-
markers: [
|
|
85
|
-
exceptions: [
|
|
75
|
+
markers: ['/'],
|
|
76
|
+
exceptions: ['/', '#']
|
|
86
77
|
},
|
|
87
78
|
block: {
|
|
88
|
-
markers: [
|
|
89
|
-
exceptions: [
|
|
90
|
-
balanced: true
|
|
91
|
-
}
|
|
92
|
-
}
|
|
79
|
+
markers: ['!'],
|
|
80
|
+
exceptions: ['*'],
|
|
81
|
+
balanced: true
|
|
82
|
+
}
|
|
83
|
+
}
|
|
93
84
|
],
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
complexity: [
|
|
98
|
-
eqeqeq: [
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
"n/no-callback-literal": "off",
|
|
130
|
-
"sort-imports": [
|
|
131
|
-
"error",
|
|
85
|
+
'array-callback-return': 'error',
|
|
86
|
+
'block-scoped-var': 'error',
|
|
87
|
+
'consistent-return': 'off',
|
|
88
|
+
complexity: ['off', 11],
|
|
89
|
+
eqeqeq: ['error', 'smart'],
|
|
90
|
+
'no-alert': 'warn',
|
|
91
|
+
'no-case-declarations': 'error',
|
|
92
|
+
'no-multi-spaces': 'error',
|
|
93
|
+
'no-multi-str': 'error',
|
|
94
|
+
'no-with': 'error',
|
|
95
|
+
'no-void': 'error',
|
|
96
|
+
'no-useless-escape': 'off',
|
|
97
|
+
'vars-on-top': 'error',
|
|
98
|
+
'require-await': 'off',
|
|
99
|
+
'no-return-assign': 'off',
|
|
100
|
+
'operator-linebreak': ['error', 'before'],
|
|
101
|
+
'unicorn/error-message': 'error',
|
|
102
|
+
'unicorn/escape-case': 'error',
|
|
103
|
+
'unicorn/no-instanceof-array': 'error',
|
|
104
|
+
'unicorn/no-new-buffer': 'error',
|
|
105
|
+
'unicorn/no-unsafe-regex': 'off',
|
|
106
|
+
'unicorn/number-literal-case': 'error',
|
|
107
|
+
'unicorn/prefer-includes': 'error',
|
|
108
|
+
'unicorn/prefer-starts-ends-with': 'error',
|
|
109
|
+
'unicorn/prefer-text-content': 'error',
|
|
110
|
+
'unicorn/prefer-type-error': 'error',
|
|
111
|
+
'unicorn/throw-new-error': 'error',
|
|
112
|
+
'no-use-before-define': ['error', { functions: false, classes: false, variables: true }],
|
|
113
|
+
'eslint-comments/disable-enable-pair': 'off',
|
|
114
|
+
'import/no-named-as-default-member': 'off',
|
|
115
|
+
'import/no-named-as-default': 'off',
|
|
116
|
+
'import/namespace': 'off',
|
|
117
|
+
'n/no-callback-literal': 'off',
|
|
118
|
+
'sort-imports': [
|
|
119
|
+
'error',
|
|
132
120
|
{
|
|
133
121
|
ignoreCase: false,
|
|
134
122
|
ignoreDeclarationSort: true,
|
|
135
123
|
ignoreMemberSort: false,
|
|
136
|
-
memberSyntaxSortOrder: [
|
|
137
|
-
allowSeparatedGroups: false
|
|
138
|
-
}
|
|
139
|
-
]
|
|
140
|
-
}
|
|
124
|
+
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
|
|
125
|
+
allowSeparatedGroups: false
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
}
|
|
141
129
|
};
|
package/src/typescript.js
CHANGED
|
@@ -1,35 +1,32 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
extends: [
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
'plugin:import/typescript',
|
|
4
|
+
'plugin:@typescript-eslint/recommended',
|
|
5
|
+
'plugin:react/recommended'
|
|
6
6
|
],
|
|
7
7
|
settings: {
|
|
8
|
-
|
|
9
|
-
node: { extensions: [
|
|
8
|
+
'import/resolver': {
|
|
9
|
+
node: { extensions: ['.js', '.jsx', '.mjs', '.ts', '.tsx', '.d.ts'] }
|
|
10
10
|
},
|
|
11
11
|
react: {
|
|
12
|
-
version:
|
|
13
|
-
}
|
|
12
|
+
version: '17.0'
|
|
13
|
+
}
|
|
14
14
|
},
|
|
15
15
|
rules: {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"@typescript-eslint/consistent-type-imports": [
|
|
24
|
-
"error",
|
|
25
|
-
{ prefer: "type-imports", disallowTypeAnnotations: false },
|
|
16
|
+
'import/named': 'off',
|
|
17
|
+
'@typescript-eslint/ban-ts-comment': ['error', { 'ts-ignore': 'allow-with-description' }],
|
|
18
|
+
'@typescript-eslint/member-delimiter-style': 'warn',
|
|
19
|
+
'@typescript-eslint/type-annotation-spacing': ['error', {}],
|
|
20
|
+
'@typescript-eslint/consistent-type-imports': [
|
|
21
|
+
'error',
|
|
22
|
+
{ prefer: 'type-imports', disallowTypeAnnotations: false }
|
|
26
23
|
],
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
indent:
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
|
|
25
|
+
'@typescript-eslint/prefer-ts-expect-error': 'error',
|
|
26
|
+
'no-useless-constructor': 'off',
|
|
27
|
+
indent: 'off',
|
|
28
|
+
'@typescript-eslint/indent': [
|
|
29
|
+
'error',
|
|
33
30
|
2,
|
|
34
31
|
{
|
|
35
32
|
SwitchCase: 1,
|
|
@@ -45,103 +42,93 @@ module.exports = {
|
|
|
45
42
|
flatTernaryExpressions: false,
|
|
46
43
|
ignoreComments: false,
|
|
47
44
|
ignoredNodes: [
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
45
|
+
'TemplateLiteral *',
|
|
46
|
+
'JSXElement',
|
|
47
|
+
'JSXElement > *',
|
|
48
|
+
'JSXAttribute',
|
|
49
|
+
'JSXIdentifier',
|
|
50
|
+
'JSXNamespacedName',
|
|
51
|
+
'JSXMemberExpression',
|
|
52
|
+
'JSXSpreadAttribute',
|
|
53
|
+
'JSXExpressionContainer',
|
|
54
|
+
'JSXOpeningElement',
|
|
55
|
+
'JSXClosingElement',
|
|
56
|
+
'JSXFragment',
|
|
57
|
+
'JSXOpeningFragment',
|
|
58
|
+
'JSXClosingFragment',
|
|
59
|
+
'JSXText',
|
|
60
|
+
'JSXEmptyExpression',
|
|
61
|
+
'JSXSpreadChild',
|
|
62
|
+
'TSTypeParameterInstantiation'
|
|
66
63
|
],
|
|
67
|
-
offsetTernaryExpressions: true
|
|
68
|
-
}
|
|
69
|
-
],
|
|
70
|
-
"no-unused-vars": "off",
|
|
71
|
-
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
|
|
72
|
-
"no-redeclare": "off",
|
|
73
|
-
"@typescript-eslint/no-redeclare": "error",
|
|
74
|
-
"no-use-before-define": "off",
|
|
75
|
-
"@typescript-eslint/no-use-before-define": [
|
|
76
|
-
"error",
|
|
77
|
-
{ functions: false, classes: false, variables: true },
|
|
64
|
+
offsetTernaryExpressions: true
|
|
65
|
+
}
|
|
78
66
|
],
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
67
|
+
'no-unused-vars': 'off',
|
|
68
|
+
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
|
|
69
|
+
'no-redeclare': 'off',
|
|
70
|
+
'@typescript-eslint/no-redeclare': 'error',
|
|
71
|
+
'no-use-before-define': 'off',
|
|
72
|
+
'@typescript-eslint/no-use-before-define': [
|
|
73
|
+
'error',
|
|
74
|
+
{ functions: false, classes: false, variables: true }
|
|
84
75
|
],
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
76
|
+
'brace-style': 'off',
|
|
77
|
+
'@typescript-eslint/brace-style': ['error', '1tbs', { allowSingleLine: true }],
|
|
78
|
+
'comma-dangle': 'off',
|
|
79
|
+
'@typescript-eslint/comma-dangle': ['error', 'only-multiline'],
|
|
80
|
+
'object-curly-spacing': 'off',
|
|
81
|
+
'@typescript-eslint/object-curly-spacing': ['error', 'always'],
|
|
82
|
+
semi: 'off',
|
|
83
|
+
'@typescript-eslint/semi': ['warn', 'always'],
|
|
84
|
+
quotes: 'off',
|
|
85
|
+
'@typescript-eslint/quotes': ['warn', 'single'],
|
|
86
|
+
'space-before-blocks': 'off',
|
|
87
|
+
'@typescript-eslint/space-before-blocks': ['error', 'always'],
|
|
88
|
+
'space-before-function-paren': 'off',
|
|
89
|
+
'@typescript-eslint/space-before-function-paren': [
|
|
90
|
+
'error',
|
|
98
91
|
{
|
|
99
|
-
anonymous:
|
|
100
|
-
named:
|
|
101
|
-
asyncArrow:
|
|
102
|
-
}
|
|
92
|
+
anonymous: 'always',
|
|
93
|
+
named: 'never',
|
|
94
|
+
asyncArrow: 'always'
|
|
95
|
+
}
|
|
103
96
|
],
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
97
|
+
'space-infix-ops': 'off',
|
|
98
|
+
'@typescript-eslint/space-infix-ops': 'error',
|
|
99
|
+
'keyword-spacing': 'off',
|
|
100
|
+
'@typescript-eslint/keyword-spacing': ['error', { before: true, after: true }],
|
|
101
|
+
'comma-spacing': 'off',
|
|
102
|
+
'@typescript-eslint/comma-spacing': ['error', { before: false, after: true }],
|
|
103
|
+
'no-extra-parens': 'off',
|
|
104
|
+
'@typescript-eslint/no-extra-parens': ['error', 'functions'],
|
|
105
|
+
'no-dupe-class-members': 'off',
|
|
106
|
+
'@typescript-eslint/no-dupe-class-members': 'error',
|
|
107
|
+
'no-loss-of-precision': 'off',
|
|
108
|
+
'@typescript-eslint/no-loss-of-precision': 'error',
|
|
109
|
+
'lines-between-class-members': 'off',
|
|
110
|
+
'@typescript-eslint/lines-between-class-members': [
|
|
111
|
+
'error',
|
|
112
|
+
'always',
|
|
113
|
+
{ exceptAfterSingleLine: true }
|
|
110
114
|
],
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
"always",
|
|
126
|
-
{ exceptAfterSingleLine: true },
|
|
127
|
-
],
|
|
128
|
-
"@typescript-eslint/consistent-indexed-object-style": "off",
|
|
129
|
-
"@typescript-eslint/naming-convention": "off",
|
|
130
|
-
"@typescript-eslint/explicit-function-return-type": "off",
|
|
131
|
-
"@typescript-eslint/explicit-member-accessibility": "off",
|
|
132
|
-
"@typescript-eslint/no-explicit-any": "off",
|
|
133
|
-
"@typescript-eslint/parameter-properties": "off",
|
|
134
|
-
"@typescript-eslint/no-empty-interface": "off",
|
|
135
|
-
"@typescript-eslint/ban-ts-ignore": "off",
|
|
136
|
-
"@typescript-eslint/no-empty-function": "off",
|
|
137
|
-
"@typescript-eslint/no-non-null-assertion": "off",
|
|
138
|
-
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
139
|
-
"@typescript-eslint/ban-types": "off",
|
|
140
|
-
"@typescript-eslint/no-namespace": "off",
|
|
141
|
-
"@typescript-eslint/triple-slash-reference": "off",
|
|
115
|
+
'@typescript-eslint/consistent-indexed-object-style': 'off',
|
|
116
|
+
'@typescript-eslint/naming-convention': 'off',
|
|
117
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
118
|
+
'@typescript-eslint/explicit-member-accessibility': 'off',
|
|
119
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
120
|
+
'@typescript-eslint/parameter-properties': 'off',
|
|
121
|
+
'@typescript-eslint/no-empty-interface': 'off',
|
|
122
|
+
'@typescript-eslint/ban-ts-ignore': 'off',
|
|
123
|
+
'@typescript-eslint/no-empty-function': 'off',
|
|
124
|
+
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
125
|
+
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
126
|
+
'@typescript-eslint/ban-types': 'off',
|
|
127
|
+
'@typescript-eslint/no-namespace': 'off',
|
|
128
|
+
'@typescript-eslint/triple-slash-reference': 'off',
|
|
142
129
|
|
|
143
130
|
// REACT
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
131
|
+
'jsx-quotes': ['warn', 'prefer-double'],
|
|
132
|
+
'react/react-in-jsx-scope': 'off'
|
|
133
|
+
}
|
|
147
134
|
};
|