@paratco/eslint-config 2.3.0 → 3.0.0
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/LICENSE +21 -0
- package/README.md +186 -21
- package/dist/index.d.ts +20 -3571
- package/dist/index.js +2 -14
- package/dist/index.js.map +1 -0
- package/package.json +40 -27
- package/dist/configs/base.d.ts +0 -138
- package/dist/configs/base.d.ts.map +0 -1
- package/dist/configs/base.js +0 -29
- package/dist/configs/import.d.ts +0 -83
- package/dist/configs/import.d.ts.map +0 -1
- package/dist/configs/import.js +0 -41
- package/dist/configs/node.d.ts +0 -221
- package/dist/configs/node.d.ts.map +0 -1
- package/dist/configs/node.js +0 -7
- package/dist/configs/prettierFormatter.d.ts +0 -5
- package/dist/configs/prettierFormatter.d.ts.map +0 -1
- package/dist/configs/prettierFormatter.js +0 -3
- package/dist/configs/react.d.ts +0 -2917
- package/dist/configs/react.d.ts.map +0 -1
- package/dist/configs/react.js +0 -51
- package/dist/configs/stylisticFormatter.d.ts +0 -218
- package/dist/configs/stylisticFormatter.d.ts.map +0 -1
- package/dist/configs/stylisticFormatter.js +0 -29
- package/dist/index.d.ts.map +0 -1
- package/dist/rules/import.d.ts +0 -59
- package/dist/rules/import.d.ts.map +0 -1
- package/dist/rules/import.js +0 -139
- package/dist/rules/javascript.d.ts +0 -23
- package/dist/rules/javascript.d.ts.map +0 -1
- package/dist/rules/javascript.js +0 -42
- package/dist/rules/react.d.ts +0 -112
- package/dist/rules/react.d.ts.map +0 -1
- package/dist/rules/react.js +0 -330
- package/dist/rules/stylistic.d.ts +0 -208
- package/dist/rules/stylistic.d.ts.map +0 -1
- package/dist/rules/stylistic.js +0 -439
- package/dist/rules/typescript.d.ts +0 -96
- package/dist/rules/typescript.d.ts.map +0 -1
- package/dist/rules/typescript.js +0 -254
- package/dist/rules/unicorn.d.ts +0 -14
- package/dist/rules/unicorn.d.ts.map +0 -1
- package/dist/rules/unicorn.js +0 -32
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
readonly "class-methods-use-this": "off";
|
|
3
|
-
readonly "@typescript-eslint/class-methods-use-this": readonly ["error", {
|
|
4
|
-
readonly ignoreOverrideMethods: true;
|
|
5
|
-
readonly ignoreClassesThatImplementAnInterface: true;
|
|
6
|
-
}];
|
|
7
|
-
readonly "consistent-return": "off";
|
|
8
|
-
readonly "@typescript-eslint/consistent-return": "off";
|
|
9
|
-
readonly "@typescript-eslint/consistent-type-exports": readonly ["error", {
|
|
10
|
-
readonly fixMixedExportsWithInlineTypeSpecifier: true;
|
|
11
|
-
}];
|
|
12
|
-
readonly "@typescript-eslint/consistent-type-imports": readonly ["error"];
|
|
13
|
-
readonly "default-param-last": "off";
|
|
14
|
-
readonly "@typescript-eslint/default-param-last": readonly ["error"];
|
|
15
|
-
readonly "@typescript-eslint/explicit-function-return-type": readonly ["error", {
|
|
16
|
-
readonly allowExpressions: true;
|
|
17
|
-
}];
|
|
18
|
-
readonly "@typescript-eslint/explicit-member-accessibility": readonly ["error", {
|
|
19
|
-
readonly accessibility: "no-public";
|
|
20
|
-
readonly overrides: {
|
|
21
|
-
readonly constructors: "off";
|
|
22
|
-
};
|
|
23
|
-
}];
|
|
24
|
-
readonly "@typescript-eslint/explicit-module-boundary-types": readonly ["error"];
|
|
25
|
-
readonly "init-declarations": "off";
|
|
26
|
-
readonly "@typescript-eslint/init-declarations": readonly ["off"];
|
|
27
|
-
readonly "max-params": "off";
|
|
28
|
-
readonly "@typescript-eslint/max-params": readonly ["off"];
|
|
29
|
-
readonly "@typescript-eslint/member-ordering": readonly ["error", {
|
|
30
|
-
readonly default: readonly ["constructor", "field", "static-method", "method", "signature"];
|
|
31
|
-
}];
|
|
32
|
-
readonly "@typescript-eslint/method-signature-style": readonly ["error"];
|
|
33
|
-
readonly "@typescript-eslint/naming-convention": readonly ["error", {
|
|
34
|
-
readonly selector: "function";
|
|
35
|
-
readonly format: readonly ["PascalCase", "camelCase"];
|
|
36
|
-
}];
|
|
37
|
-
readonly "no-dupe-class-members": "off";
|
|
38
|
-
readonly "@typescript-eslint/no-dupe-class-members": readonly ["off"];
|
|
39
|
-
readonly "@typescript-eslint/no-import-type-side-effects": readonly ["error"];
|
|
40
|
-
readonly "no-invalid-this": "off";
|
|
41
|
-
readonly "@typescript-eslint/no-invalid-this": readonly ["error"];
|
|
42
|
-
readonly "no-loop-func": "off";
|
|
43
|
-
readonly "@typescript-eslint/no-loop-func": readonly ["error"];
|
|
44
|
-
readonly "no-magic-numbers": "off";
|
|
45
|
-
readonly "@typescript-eslint/no-magic-numbers": readonly ["off"];
|
|
46
|
-
readonly "no-redeclare": "off";
|
|
47
|
-
readonly "@typescript-eslint/no-redeclare": readonly ["off"];
|
|
48
|
-
readonly "no-restricted-imports": "off";
|
|
49
|
-
readonly "@typescript-eslint/no-restricted-imports": readonly ["error", {
|
|
50
|
-
readonly patterns: readonly [{
|
|
51
|
-
readonly regex: "^(node:)?process$";
|
|
52
|
-
readonly message: "Please dont import node:process.";
|
|
53
|
-
}];
|
|
54
|
-
}];
|
|
55
|
-
readonly "no-shadow": "off";
|
|
56
|
-
readonly "@typescript-eslint/no-shadow": readonly ["error"];
|
|
57
|
-
readonly "@typescript-eslint/no-unnecessary-parameter-property-assignment": readonly ["off"];
|
|
58
|
-
readonly "@typescript-eslint/no-unnecessary-qualifier": readonly ["warn"];
|
|
59
|
-
readonly "@typescript-eslint/no-unnecessary-type-conversion": readonly ["warn"];
|
|
60
|
-
readonly "@typescript-eslint/no-unsafe-type-assertion": readonly ["off"];
|
|
61
|
-
readonly "no-use-before-define": "off";
|
|
62
|
-
readonly "@typescript-eslint/no-use-before-define": readonly ["error"];
|
|
63
|
-
readonly "@typescript-eslint/no-useless-empty-export": readonly ["warn"];
|
|
64
|
-
readonly "@typescript-eslint/parameter-properties": readonly ["error"];
|
|
65
|
-
readonly "prefer-destructuring": "off";
|
|
66
|
-
readonly "@typescript-eslint/prefer-destructuring": readonly ["off"];
|
|
67
|
-
readonly "@typescript-eslint/prefer-enum-initializers": readonly ["off"];
|
|
68
|
-
readonly "@typescript-eslint/prefer-readonly": readonly ["warn"];
|
|
69
|
-
readonly "@typescript-eslint/prefer-readonly-parameter-types": readonly ["off"];
|
|
70
|
-
readonly "@typescript-eslint/promise-function-async": readonly ["error"];
|
|
71
|
-
readonly "@typescript-eslint/require-array-sort-compare": readonly ["error"];
|
|
72
|
-
readonly "@typescript-eslint/strict-boolean-expressions": readonly ["error", {
|
|
73
|
-
readonly allowString: false;
|
|
74
|
-
readonly allowNumber: false;
|
|
75
|
-
readonly allowNullableObject: false;
|
|
76
|
-
}];
|
|
77
|
-
readonly "@typescript-eslint/switch-exhaustiveness-check": readonly ["error"];
|
|
78
|
-
readonly "@typescript-eslint/restrict-template-expressions": readonly ["error", {
|
|
79
|
-
readonly allowBoolean: true;
|
|
80
|
-
readonly allowNumber: true;
|
|
81
|
-
readonly allowRegExp: true;
|
|
82
|
-
}];
|
|
83
|
-
readonly "@typescript-eslint/no-unnecessary-type-parameters": readonly ["off"];
|
|
84
|
-
readonly "no-unused-vars": readonly ["off"];
|
|
85
|
-
readonly "@typescript-eslint/no-unused-vars": readonly ["error", {
|
|
86
|
-
readonly args: "all";
|
|
87
|
-
readonly argsIgnorePattern: "^_";
|
|
88
|
-
readonly caughtErrors: "all";
|
|
89
|
-
readonly caughtErrorsIgnorePattern: "^_";
|
|
90
|
-
readonly destructuredArrayIgnorePattern: "^_";
|
|
91
|
-
readonly ignoreRestSiblings: true;
|
|
92
|
-
}];
|
|
93
|
-
readonly "@typescript-eslint/prefer-optional-chain": readonly ["off"];
|
|
94
|
-
};
|
|
95
|
-
export default _default;
|
|
96
|
-
//# sourceMappingURL=typescript.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../src/rules/typescript.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBA4SW"}
|
package/dist/rules/typescript.js
DELETED
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
// Enforce that class methods utilize this.
|
|
3
|
-
// https://typescript-eslint.io/rules/class-methods-use-this
|
|
4
|
-
// Note: you must disable the base rule as it can report incorrect errors
|
|
5
|
-
"class-methods-use-this": "off",
|
|
6
|
-
"@typescript-eslint/class-methods-use-this": [
|
|
7
|
-
"error",
|
|
8
|
-
{
|
|
9
|
-
ignoreOverrideMethods: true,
|
|
10
|
-
ignoreClassesThatImplementAnInterface: true
|
|
11
|
-
}
|
|
12
|
-
],
|
|
13
|
-
// Require return statements to either always or never specify values
|
|
14
|
-
// https://typescript-eslint.io/rules/consistent-return/
|
|
15
|
-
// Note: you must disable the base rule as it can report incorrect errors
|
|
16
|
-
"consistent-return": "off",
|
|
17
|
-
"@typescript-eslint/consistent-return": "off",
|
|
18
|
-
// Enforce consistent usage of type exports.
|
|
19
|
-
// https://typescript-eslint.io/rules/consistent-type-exports
|
|
20
|
-
"@typescript-eslint/consistent-type-exports": [
|
|
21
|
-
"error",
|
|
22
|
-
{
|
|
23
|
-
fixMixedExportsWithInlineTypeSpecifier: true
|
|
24
|
-
}
|
|
25
|
-
],
|
|
26
|
-
// Enforce consistent usage of type imports.
|
|
27
|
-
// https://typescript-eslint.io/rules/consistent-type-imports
|
|
28
|
-
"@typescript-eslint/consistent-type-imports": ["error"],
|
|
29
|
-
// Enforce default parameters to be last.
|
|
30
|
-
// https://typescript-eslint.io/rules/default-param-last
|
|
31
|
-
// Note: you must disable the base rule as it can report incorrect errors
|
|
32
|
-
"default-param-last": "off",
|
|
33
|
-
"@typescript-eslint/default-param-last": ["error"],
|
|
34
|
-
// Require explicit return types on functions and class methods.
|
|
35
|
-
// https://typescript-eslint.io/rules/explicit-function-return-type
|
|
36
|
-
"@typescript-eslint/explicit-function-return-type": [
|
|
37
|
-
"error",
|
|
38
|
-
{
|
|
39
|
-
allowExpressions: true
|
|
40
|
-
}
|
|
41
|
-
],
|
|
42
|
-
// Require explicit accessibility modifiers on class properties and methods.
|
|
43
|
-
// https://typescript-eslint.io/rules/explicit-member-accessibility
|
|
44
|
-
"@typescript-eslint/explicit-member-accessibility": [
|
|
45
|
-
"error",
|
|
46
|
-
{
|
|
47
|
-
accessibility: "no-public",
|
|
48
|
-
overrides: {
|
|
49
|
-
constructors: "off"
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
],
|
|
53
|
-
// Require explicit return and argument types on exported functions' and classes' public class methods.
|
|
54
|
-
// https://typescript-eslint.io/rules/explicit-module-boundary-types
|
|
55
|
-
"@typescript-eslint/explicit-module-boundary-types": ["error"],
|
|
56
|
-
// Require or disallow initialization in variable declarations.
|
|
57
|
-
// https://typescript-eslint.io/rules/init-declarations
|
|
58
|
-
// Note: you must disable the base rule as it can report incorrect errors
|
|
59
|
-
"init-declarations": "off",
|
|
60
|
-
"@typescript-eslint/init-declarations": ["off"],
|
|
61
|
-
// Enforce a maximum number of parameters in function definitions.
|
|
62
|
-
// https://typescript-eslint.io/rules/max-params
|
|
63
|
-
// Note: you must disable the base rule as it can report incorrect errors
|
|
64
|
-
"max-params": "off",
|
|
65
|
-
"@typescript-eslint/max-params": ["off"],
|
|
66
|
-
// Require a consistent member declaration order.
|
|
67
|
-
// https://typescript-eslint.io/rules/member-ordering
|
|
68
|
-
"@typescript-eslint/member-ordering": [
|
|
69
|
-
"error",
|
|
70
|
-
{ default: ["constructor", "field", "static-method", "method", "signature"] }
|
|
71
|
-
],
|
|
72
|
-
// Enforce using a particular method signature syntax.
|
|
73
|
-
// https://typescript-eslint.io/rules/method-signature-style
|
|
74
|
-
"@typescript-eslint/method-signature-style": ["error"],
|
|
75
|
-
// Enforce naming conventions for everything across a codebase.
|
|
76
|
-
// https://typescript-eslint.io/rules/naming-convention
|
|
77
|
-
// TODO: We can split this rule. for components it enforces PascalCase and functions camelCase
|
|
78
|
-
"@typescript-eslint/naming-convention": [
|
|
79
|
-
"error",
|
|
80
|
-
{
|
|
81
|
-
selector: "function",
|
|
82
|
-
format: ["PascalCase", "camelCase"]
|
|
83
|
-
}
|
|
84
|
-
],
|
|
85
|
-
// Disallow duplicate class members.
|
|
86
|
-
// https://typescript-eslint.io/rules/no-dupe-class-members
|
|
87
|
-
// Note: you must disable the base rule as it can report incorrect errors
|
|
88
|
-
"no-dupe-class-members": "off",
|
|
89
|
-
"@typescript-eslint/no-dupe-class-members": ["off"],
|
|
90
|
-
// Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers.
|
|
91
|
-
// https://typescript-eslint.io/rules/no-import-type-side-effects
|
|
92
|
-
"@typescript-eslint/no-import-type-side-effects": ["error"],
|
|
93
|
-
// Disallow this keywords outside of classes or class-like objects.
|
|
94
|
-
// https://typescript-eslint.io/rules/no-invalid-this
|
|
95
|
-
// Note: you must disable the base rule as it can report incorrect errors
|
|
96
|
-
"no-invalid-this": "off",
|
|
97
|
-
"@typescript-eslint/no-invalid-this": ["error"],
|
|
98
|
-
// Disallow function declarations that contain unsafe references inside loop statements.
|
|
99
|
-
// https://typescript-eslint.io/rules/no-loop-func
|
|
100
|
-
// Note: you must disable the base rule as it can report incorrect errors
|
|
101
|
-
"no-loop-func": "off",
|
|
102
|
-
"@typescript-eslint/no-loop-func": ["error"],
|
|
103
|
-
// Disallow magic numbers.
|
|
104
|
-
// https://typescript-eslint.io/rules/no-magic-numbers
|
|
105
|
-
// Note: you must disable the base rule as it can report incorrect errors
|
|
106
|
-
"no-magic-numbers": "off",
|
|
107
|
-
"@typescript-eslint/no-magic-numbers": ["off"],
|
|
108
|
-
// Disallow variable redeclaration.
|
|
109
|
-
// https://typescript-eslint.io/rules/no-redeclare
|
|
110
|
-
// Note: you must disable the base rule as it can report incorrect errors
|
|
111
|
-
"no-redeclare": "off",
|
|
112
|
-
"@typescript-eslint/no-redeclare": ["off"],
|
|
113
|
-
// Disallow invocation of require().
|
|
114
|
-
// https://typescript-eslint.io/rules/no-require-imports
|
|
115
|
-
// Added to recommended
|
|
116
|
-
// "@typescript-eslint/no-require-imports": ["error"],
|
|
117
|
-
// Disallow specified modules when loaded by import.
|
|
118
|
-
// https://typescript-eslint.io/rules/no-restricted-imports
|
|
119
|
-
// Note: you must disable the base rule as it can report incorrect errors
|
|
120
|
-
"no-restricted-imports": "off",
|
|
121
|
-
"@typescript-eslint/no-restricted-imports": [
|
|
122
|
-
"error",
|
|
123
|
-
{
|
|
124
|
-
patterns: [
|
|
125
|
-
{
|
|
126
|
-
regex: "^(node:)?process$",
|
|
127
|
-
message: "Please dont import node:process."
|
|
128
|
-
}
|
|
129
|
-
]
|
|
130
|
-
}
|
|
131
|
-
],
|
|
132
|
-
// Disallow certain types
|
|
133
|
-
// https://typescript-eslint.io/rules/no-restricted-types/
|
|
134
|
-
// "@typescript-eslint/no-restricted-types": ["off"],
|
|
135
|
-
// Disallow variable declarations from shadowing variables declared in the outer scope.
|
|
136
|
-
// https://typescript-eslint.io/rules/no-shadow
|
|
137
|
-
// Note: you must disable the base rule as it can report incorrect errors
|
|
138
|
-
"no-shadow": "off",
|
|
139
|
-
"@typescript-eslint/no-shadow": ["error"],
|
|
140
|
-
// https://typescript-eslint.io/rules/no-unnecessary-parameter-property-assignment/
|
|
141
|
-
// Disallow unnecessary assignment of constructor property parameter
|
|
142
|
-
"@typescript-eslint/no-unnecessary-parameter-property-assignment": ["off"],
|
|
143
|
-
// Disallow unnecessary namespace qualifiers.
|
|
144
|
-
// https://typescript-eslint.io/rules/no-unnecessary-qualifier
|
|
145
|
-
"@typescript-eslint/no-unnecessary-qualifier": ["warn"],
|
|
146
|
-
// Disallow conversion idioms when they do not change the type or value of the expression
|
|
147
|
-
// https://typescript-eslint.io/rules/no-unnecessary-type-conversion/
|
|
148
|
-
"@typescript-eslint/no-unnecessary-type-conversion": ["warn"],
|
|
149
|
-
// Disallow type assertions that narrow a type
|
|
150
|
-
// https://typescript-eslint.io/rules/no-unsafe-type-assertion/
|
|
151
|
-
"@typescript-eslint/no-unsafe-type-assertion": ["off"],
|
|
152
|
-
// Require unary negation to take a number.
|
|
153
|
-
// https://typescript-eslint.io/rules/no-unsafe-unary-minus
|
|
154
|
-
// Added to recommended
|
|
155
|
-
// "@typescript-eslint/no-unsafe-unary-minus": ["error"],
|
|
156
|
-
// Disallow unused expressions.
|
|
157
|
-
// https://typescript-eslint.io/rules/no-unused-expressions
|
|
158
|
-
// Note: you must disable the base rule as it can report incorrect errors
|
|
159
|
-
// Added to recommended
|
|
160
|
-
// "no-unused-expressions": "off",
|
|
161
|
-
// "@typescript-eslint/no-unused-expressions": ["off"],
|
|
162
|
-
// Disallow the use of variables before they are defined.
|
|
163
|
-
// https://typescript-eslint.io/rules/no-use-before-define
|
|
164
|
-
// Note: you must disable the base rule as it can report incorrect errors
|
|
165
|
-
"no-use-before-define": "off",
|
|
166
|
-
"@typescript-eslint/no-use-before-define": ["error"],
|
|
167
|
-
// Disallow empty exports that don't change anything in a module file.
|
|
168
|
-
// https://typescript-eslint.io/rules/no-useless-empty-export
|
|
169
|
-
"@typescript-eslint/no-useless-empty-export": ["warn"],
|
|
170
|
-
// Require or disallow parameter properties in class constructors.
|
|
171
|
-
// https://typescript-eslint.io/rules/parameter-properties
|
|
172
|
-
"@typescript-eslint/parameter-properties": ["error"],
|
|
173
|
-
// Require destructuring from arrays and/or objects.
|
|
174
|
-
// https://typescript-eslint.io/rules/prefer-destructuring
|
|
175
|
-
// Note: you must disable the base rule as it can report incorrect errors
|
|
176
|
-
"prefer-destructuring": "off",
|
|
177
|
-
"@typescript-eslint/prefer-destructuring": ["off"],
|
|
178
|
-
// Require each enum member value to be explicitly initialized.
|
|
179
|
-
// https://typescript-eslint.io/rules/prefer-enum-initializers
|
|
180
|
-
"@typescript-eslint/prefer-enum-initializers": ["off"],
|
|
181
|
-
// Enforce the use of Array.prototype.find() over Array.prototype.filter() followed by [0] when looking for a single result.
|
|
182
|
-
// https://typescript-eslint.io/rules/prefer-find
|
|
183
|
-
// Added to stylistic
|
|
184
|
-
// "@typescript-eslint/prefer-find": ["warn"],
|
|
185
|
-
// Require private members to be marked as readonly if they're never modified outside the constructor.
|
|
186
|
-
// https://typescript-eslint.io/rules/prefer-readonly
|
|
187
|
-
"@typescript-eslint/prefer-readonly": ["warn"],
|
|
188
|
-
// Require function parameters to be typed as readonly to prevent accidental mutation of inputs.
|
|
189
|
-
// https://typescript-eslint.io/rules/prefer-readonly-parameter-types
|
|
190
|
-
"@typescript-eslint/prefer-readonly-parameter-types": ["off"],
|
|
191
|
-
// Enforce RegExp#exec over String#match if no global flag is provided.
|
|
192
|
-
// https://typescript-eslint.io/rules/prefer-regexp-exec
|
|
193
|
-
// Added to stylistic
|
|
194
|
-
// "@typescript-eslint/prefer-regexp-exec": ["warn"],
|
|
195
|
-
// Require any function or method that returns a Promise to be marked async.
|
|
196
|
-
// https://typescript-eslint.io/rules/promise-function-async
|
|
197
|
-
"@typescript-eslint/promise-function-async": ["error"],
|
|
198
|
-
// Require Array#sort and Array#toSorted calls to always provide a compareFunction.
|
|
199
|
-
// https://typescript-eslint.io/rules/require-array-sort-compare
|
|
200
|
-
"@typescript-eslint/require-array-sort-compare": ["error"],
|
|
201
|
-
// Enforce consistent returning of awaited values.
|
|
202
|
-
// https://typescript-eslint.io/rules/return-await
|
|
203
|
-
// Note: you must disable the base rule as it can report incorrect errors
|
|
204
|
-
// Added to recommended
|
|
205
|
-
// "no-return-await": "off",
|
|
206
|
-
// "@typescript-eslint/return-await": ["off"],
|
|
207
|
-
// Disallow certain types in boolean expressions.
|
|
208
|
-
// https://typescript-eslint.io/rules/strict-boolean-expressions
|
|
209
|
-
"@typescript-eslint/strict-boolean-expressions": [
|
|
210
|
-
"error",
|
|
211
|
-
{
|
|
212
|
-
allowString: false,
|
|
213
|
-
allowNumber: false,
|
|
214
|
-
allowNullableObject: false
|
|
215
|
-
}
|
|
216
|
-
],
|
|
217
|
-
// Require switch-case statements to be exhaustive.
|
|
218
|
-
// https://typescript-eslint.io/rules/switch-exhaustiveness-check
|
|
219
|
-
"@typescript-eslint/switch-exhaustiveness-check": ["error"],
|
|
220
|
-
// Additional rules (Customize rules that are not in predefined configs)
|
|
221
|
-
// Enforce template literal expressions to be of string type.
|
|
222
|
-
// https://typescript-eslint.io/rules/restrict-template-expressions
|
|
223
|
-
"@typescript-eslint/restrict-template-expressions": [
|
|
224
|
-
"error",
|
|
225
|
-
{
|
|
226
|
-
allowBoolean: true,
|
|
227
|
-
allowNumber: true,
|
|
228
|
-
allowRegExp: true
|
|
229
|
-
}
|
|
230
|
-
],
|
|
231
|
-
// Disallow type parameters that aren't used multiple times
|
|
232
|
-
// https://typescript-eslint.io/rules/no-unnecessary-type-parameters
|
|
233
|
-
// Note: This rule is in the strict rules. But we decided to disable this rule.
|
|
234
|
-
"@typescript-eslint/no-unnecessary-type-parameters": ["off"],
|
|
235
|
-
// Disallow unused variables.
|
|
236
|
-
// https://typescript-eslint.io/rules/no-unused-vars
|
|
237
|
-
// Note: This rule is in the recommended rules. But we modify it.
|
|
238
|
-
"no-unused-vars": ["off"],
|
|
239
|
-
"@typescript-eslint/no-unused-vars": [
|
|
240
|
-
"error",
|
|
241
|
-
{
|
|
242
|
-
args: "all",
|
|
243
|
-
argsIgnorePattern: "^_",
|
|
244
|
-
caughtErrors: "all",
|
|
245
|
-
caughtErrorsIgnorePattern: "^_",
|
|
246
|
-
destructuredArrayIgnorePattern: "^_",
|
|
247
|
-
ignoreRestSiblings: true
|
|
248
|
-
}
|
|
249
|
-
],
|
|
250
|
-
// Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects
|
|
251
|
-
// https://typescript-eslint.io/rules/prefer-optional-chain
|
|
252
|
-
// Note: This rule is in the recommended rules. But we remove it.
|
|
253
|
-
"@typescript-eslint/prefer-optional-chain": ["off"]
|
|
254
|
-
};
|
package/dist/rules/unicorn.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
"unicorn/filename-case": string[];
|
|
3
|
-
"unicorn/prevent-abbreviations": string[];
|
|
4
|
-
"unicorn/no-null": string[];
|
|
5
|
-
"unicorn/no-negated-condition": string[];
|
|
6
|
-
"unicorn/switch-case-braces": string[];
|
|
7
|
-
"unicorn/prefer-spread": string[];
|
|
8
|
-
"unicorn/prefer-at": string[];
|
|
9
|
-
"unicorn/prefer-ternary": string[];
|
|
10
|
-
"unicorn/no-typeof-undefined": string[];
|
|
11
|
-
"unicorn/no-static-only-class": string[];
|
|
12
|
-
};
|
|
13
|
-
export default _default;
|
|
14
|
-
//# sourceMappingURL=unicorn.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unicorn.d.ts","sourceRoot":"","sources":["../../src/rules/unicorn.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wBAwCE"}
|
package/dist/rules/unicorn.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/filename-case.md
|
|
3
|
-
// Enforce a case style for filenames.
|
|
4
|
-
"unicorn/filename-case": ["off"],
|
|
5
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prevent-abbreviations.md
|
|
6
|
-
// Prevent abbreviations.
|
|
7
|
-
"unicorn/prevent-abbreviations": ["off"],
|
|
8
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-null.md
|
|
9
|
-
// Disallow the use of the null literal.
|
|
10
|
-
"unicorn/no-null": ["off"],
|
|
11
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-negated-condition.md
|
|
12
|
-
// Disallow negated conditions.
|
|
13
|
-
"unicorn/no-negated-condition": ["off"],
|
|
14
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/switch-case-braces.md
|
|
15
|
-
// Enforce consistent brace style for case clauses.
|
|
16
|
-
"unicorn/switch-case-braces": ["off"],
|
|
17
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-spread.md
|
|
18
|
-
// Prefer the spread operator over Array.from(…), Array#concat(…), Array#{slice,toSpliced}() and String#split('').
|
|
19
|
-
"unicorn/prefer-spread": ["off"],
|
|
20
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-at.md
|
|
21
|
-
// Prefer .at() method for index access and String#charAt().
|
|
22
|
-
"unicorn/prefer-at": ["off"],
|
|
23
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-ternary.md
|
|
24
|
-
// Prefer ternary expressions over simple if-else statements.
|
|
25
|
-
"unicorn/prefer-ternary": ["warn", "only-single-line"],
|
|
26
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-typeof-undefined.md
|
|
27
|
-
// Disallow comparing undefined using typeof.
|
|
28
|
-
"unicorn/no-typeof-undefined": ["off"],
|
|
29
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-static-only-class.md
|
|
30
|
-
// Disallow classes that only have static members.
|
|
31
|
-
"unicorn/no-static-only-class": ["off"]
|
|
32
|
-
};
|