@paratco/eslint-config 2.2.6 → 2.3.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/dist/configs/base.d.ts +2 -2
- package/dist/configs/base.js +3 -3
- package/dist/configs/node.d.ts +2 -2
- package/dist/configs/react.d.ts +2 -2
- package/dist/index.d.ts +6 -6
- package/dist/rules/typescript.d.ts +1 -1
- package/dist/rules/typescript.js +3 -3
- package/package.json +10 -10
package/dist/configs/base.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const _default: ({
|
|
2
2
|
readonly rules: Readonly<import("eslint").Linter.RulesRecord>;
|
|
3
|
-
} | import("eslint").
|
|
3
|
+
} | import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray | import("eslint").Linter.FlatConfig<import("eslint").Linter.RulesRecord> | {
|
|
4
4
|
files: string[];
|
|
5
5
|
rules: {
|
|
6
6
|
readonly eqeqeq: readonly ["warn"];
|
|
@@ -83,6 +83,7 @@ declare const _default: ({
|
|
|
83
83
|
readonly "@typescript-eslint/no-shadow": readonly ["error"];
|
|
84
84
|
readonly "@typescript-eslint/no-unnecessary-parameter-property-assignment": readonly ["off"];
|
|
85
85
|
readonly "@typescript-eslint/no-unnecessary-qualifier": readonly ["warn"];
|
|
86
|
+
readonly "@typescript-eslint/no-unnecessary-type-conversion": readonly ["warn"];
|
|
86
87
|
readonly "@typescript-eslint/no-unsafe-type-assertion": readonly ["off"];
|
|
87
88
|
readonly "no-use-before-define": "off";
|
|
88
89
|
readonly "@typescript-eslint/no-use-before-define": readonly ["error"];
|
|
@@ -101,7 +102,6 @@ declare const _default: ({
|
|
|
101
102
|
readonly allowNullableObject: false;
|
|
102
103
|
}];
|
|
103
104
|
readonly "@typescript-eslint/switch-exhaustiveness-check": readonly ["error"];
|
|
104
|
-
readonly "@typescript-eslint/typedef": readonly ["off"];
|
|
105
105
|
readonly "@typescript-eslint/restrict-template-expressions": readonly ["error", {
|
|
106
106
|
readonly allowBoolean: true;
|
|
107
107
|
readonly allowNumber: true;
|
package/dist/configs/base.js
CHANGED
|
@@ -8,8 +8,8 @@ import unicornRules from "../rules/unicorn.js";
|
|
|
8
8
|
export default [
|
|
9
9
|
// Set predefined configs
|
|
10
10
|
eslint.configs.recommended,
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
tsEslint.configs.strictTypeChecked,
|
|
12
|
+
tsEslint.configs.stylisticTypeChecked,
|
|
13
13
|
eslintPluginUnicorn.configs.recommended,
|
|
14
14
|
// JavaScript Rules
|
|
15
15
|
{
|
|
@@ -21,7 +21,7 @@ export default [
|
|
|
21
21
|
files: ["**/*.{ts,tsx}"],
|
|
22
22
|
rules: typescriptRules
|
|
23
23
|
},
|
|
24
|
-
//
|
|
24
|
+
// Unicorn Rules
|
|
25
25
|
{
|
|
26
26
|
files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"],
|
|
27
27
|
rules: unicornRules
|
package/dist/configs/node.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const _default: ({
|
|
2
2
|
readonly rules: Readonly<import("eslint").Linter.RulesRecord>;
|
|
3
|
-
} | import("eslint").
|
|
3
|
+
} | import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray | import("eslint").Linter.FlatConfig<import("eslint").Linter.RulesRecord> | {
|
|
4
4
|
files: string[];
|
|
5
5
|
rules: {
|
|
6
6
|
readonly eqeqeq: readonly ["warn"];
|
|
@@ -83,6 +83,7 @@ declare const _default: ({
|
|
|
83
83
|
readonly "@typescript-eslint/no-shadow": readonly ["error"];
|
|
84
84
|
readonly "@typescript-eslint/no-unnecessary-parameter-property-assignment": readonly ["off"];
|
|
85
85
|
readonly "@typescript-eslint/no-unnecessary-qualifier": readonly ["warn"];
|
|
86
|
+
readonly "@typescript-eslint/no-unnecessary-type-conversion": readonly ["warn"];
|
|
86
87
|
readonly "@typescript-eslint/no-unsafe-type-assertion": readonly ["off"];
|
|
87
88
|
readonly "no-use-before-define": "off";
|
|
88
89
|
readonly "@typescript-eslint/no-use-before-define": readonly ["error"];
|
|
@@ -101,7 +102,6 @@ declare const _default: ({
|
|
|
101
102
|
readonly allowNullableObject: false;
|
|
102
103
|
}];
|
|
103
104
|
readonly "@typescript-eslint/switch-exhaustiveness-check": readonly ["error"];
|
|
104
|
-
readonly "@typescript-eslint/typedef": readonly ["off"];
|
|
105
105
|
readonly "@typescript-eslint/restrict-template-expressions": readonly ["error", {
|
|
106
106
|
readonly allowBoolean: true;
|
|
107
107
|
readonly allowNumber: true;
|
package/dist/configs/react.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import reactPlugin from "eslint-plugin-react";
|
|
|
2
2
|
import reactHooksPlugin from "eslint-plugin-react-hooks";
|
|
3
3
|
declare const _default: ({
|
|
4
4
|
readonly rules: Readonly<import("eslint").Linter.RulesRecord>;
|
|
5
|
-
} | import("eslint").
|
|
5
|
+
} | import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray | import("eslint").Linter.FlatConfig<import("eslint").Linter.RulesRecord> | {
|
|
6
6
|
files: string[];
|
|
7
7
|
rules: {
|
|
8
8
|
readonly eqeqeq: readonly ["warn"];
|
|
@@ -85,6 +85,7 @@ declare const _default: ({
|
|
|
85
85
|
readonly "@typescript-eslint/no-shadow": readonly ["error"];
|
|
86
86
|
readonly "@typescript-eslint/no-unnecessary-parameter-property-assignment": readonly ["off"];
|
|
87
87
|
readonly "@typescript-eslint/no-unnecessary-qualifier": readonly ["warn"];
|
|
88
|
+
readonly "@typescript-eslint/no-unnecessary-type-conversion": readonly ["warn"];
|
|
88
89
|
readonly "@typescript-eslint/no-unsafe-type-assertion": readonly ["off"];
|
|
89
90
|
readonly "no-use-before-define": "off";
|
|
90
91
|
readonly "@typescript-eslint/no-use-before-define": readonly ["error"];
|
|
@@ -103,7 +104,6 @@ declare const _default: ({
|
|
|
103
104
|
readonly allowNullableObject: false;
|
|
104
105
|
}];
|
|
105
106
|
readonly "@typescript-eslint/switch-exhaustiveness-check": readonly ["error"];
|
|
106
|
-
readonly "@typescript-eslint/typedef": readonly ["off"];
|
|
107
107
|
readonly "@typescript-eslint/restrict-template-expressions": readonly ["error", {
|
|
108
108
|
readonly allowBoolean: true;
|
|
109
109
|
readonly allowNumber: true;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
base: ({
|
|
3
3
|
readonly rules: Readonly<import("eslint").Linter.RulesRecord>;
|
|
4
|
-
} | import("eslint").
|
|
4
|
+
} | import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray | import("eslint").Linter.FlatConfig<import("eslint").Linter.RulesRecord> | {
|
|
5
5
|
files: string[];
|
|
6
6
|
rules: {
|
|
7
7
|
readonly eqeqeq: readonly ["warn"];
|
|
@@ -84,6 +84,7 @@ declare const _default: {
|
|
|
84
84
|
readonly "@typescript-eslint/no-shadow": readonly ["error"];
|
|
85
85
|
readonly "@typescript-eslint/no-unnecessary-parameter-property-assignment": readonly ["off"];
|
|
86
86
|
readonly "@typescript-eslint/no-unnecessary-qualifier": readonly ["warn"];
|
|
87
|
+
readonly "@typescript-eslint/no-unnecessary-type-conversion": readonly ["warn"];
|
|
87
88
|
readonly "@typescript-eslint/no-unsafe-type-assertion": readonly ["off"];
|
|
88
89
|
readonly "no-use-before-define": "off";
|
|
89
90
|
readonly "@typescript-eslint/no-use-before-define": readonly ["error"];
|
|
@@ -102,7 +103,6 @@ declare const _default: {
|
|
|
102
103
|
readonly allowNullableObject: false;
|
|
103
104
|
}];
|
|
104
105
|
readonly "@typescript-eslint/switch-exhaustiveness-check": readonly ["error"];
|
|
105
|
-
readonly "@typescript-eslint/typedef": readonly ["off"];
|
|
106
106
|
readonly "@typescript-eslint/restrict-template-expressions": readonly ["error", {
|
|
107
107
|
readonly allowBoolean: true;
|
|
108
108
|
readonly allowNumber: true;
|
|
@@ -137,7 +137,7 @@ declare const _default: {
|
|
|
137
137
|
})[];
|
|
138
138
|
react: ({
|
|
139
139
|
readonly rules: Readonly<import("eslint").Linter.RulesRecord>;
|
|
140
|
-
} | import("eslint").
|
|
140
|
+
} | import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray | import("eslint").Linter.FlatConfig<import("eslint").Linter.RulesRecord> | {
|
|
141
141
|
files: string[];
|
|
142
142
|
rules: {
|
|
143
143
|
readonly eqeqeq: readonly ["warn"];
|
|
@@ -220,6 +220,7 @@ declare const _default: {
|
|
|
220
220
|
readonly "@typescript-eslint/no-shadow": readonly ["error"];
|
|
221
221
|
readonly "@typescript-eslint/no-unnecessary-parameter-property-assignment": readonly ["off"];
|
|
222
222
|
readonly "@typescript-eslint/no-unnecessary-qualifier": readonly ["warn"];
|
|
223
|
+
readonly "@typescript-eslint/no-unnecessary-type-conversion": readonly ["warn"];
|
|
223
224
|
readonly "@typescript-eslint/no-unsafe-type-assertion": readonly ["off"];
|
|
224
225
|
readonly "no-use-before-define": "off";
|
|
225
226
|
readonly "@typescript-eslint/no-use-before-define": readonly ["error"];
|
|
@@ -238,7 +239,6 @@ declare const _default: {
|
|
|
238
239
|
readonly allowNullableObject: false;
|
|
239
240
|
}];
|
|
240
241
|
readonly "@typescript-eslint/switch-exhaustiveness-check": readonly ["error"];
|
|
241
|
-
readonly "@typescript-eslint/typedef": readonly ["off"];
|
|
242
242
|
readonly "@typescript-eslint/restrict-template-expressions": readonly ["error", {
|
|
243
243
|
readonly allowBoolean: true;
|
|
244
244
|
readonly allowNumber: true;
|
|
@@ -3050,7 +3050,7 @@ declare const _default: {
|
|
|
3050
3050
|
})[];
|
|
3051
3051
|
node: ({
|
|
3052
3052
|
readonly rules: Readonly<import("eslint").Linter.RulesRecord>;
|
|
3053
|
-
} | import("eslint").
|
|
3053
|
+
} | import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray | import("eslint").Linter.FlatConfig<import("eslint").Linter.RulesRecord> | {
|
|
3054
3054
|
files: string[];
|
|
3055
3055
|
rules: {
|
|
3056
3056
|
readonly eqeqeq: readonly ["warn"];
|
|
@@ -3133,6 +3133,7 @@ declare const _default: {
|
|
|
3133
3133
|
readonly "@typescript-eslint/no-shadow": readonly ["error"];
|
|
3134
3134
|
readonly "@typescript-eslint/no-unnecessary-parameter-property-assignment": readonly ["off"];
|
|
3135
3135
|
readonly "@typescript-eslint/no-unnecessary-qualifier": readonly ["warn"];
|
|
3136
|
+
readonly "@typescript-eslint/no-unnecessary-type-conversion": readonly ["warn"];
|
|
3136
3137
|
readonly "@typescript-eslint/no-unsafe-type-assertion": readonly ["off"];
|
|
3137
3138
|
readonly "no-use-before-define": "off";
|
|
3138
3139
|
readonly "@typescript-eslint/no-use-before-define": readonly ["error"];
|
|
@@ -3151,7 +3152,6 @@ declare const _default: {
|
|
|
3151
3152
|
readonly allowNullableObject: false;
|
|
3152
3153
|
}];
|
|
3153
3154
|
readonly "@typescript-eslint/switch-exhaustiveness-check": readonly ["error"];
|
|
3154
|
-
readonly "@typescript-eslint/typedef": readonly ["off"];
|
|
3155
3155
|
readonly "@typescript-eslint/restrict-template-expressions": readonly ["error", {
|
|
3156
3156
|
readonly allowBoolean: true;
|
|
3157
3157
|
readonly allowNumber: true;
|
|
@@ -56,6 +56,7 @@ declare const _default: {
|
|
|
56
56
|
readonly "@typescript-eslint/no-shadow": readonly ["error"];
|
|
57
57
|
readonly "@typescript-eslint/no-unnecessary-parameter-property-assignment": readonly ["off"];
|
|
58
58
|
readonly "@typescript-eslint/no-unnecessary-qualifier": readonly ["warn"];
|
|
59
|
+
readonly "@typescript-eslint/no-unnecessary-type-conversion": readonly ["warn"];
|
|
59
60
|
readonly "@typescript-eslint/no-unsafe-type-assertion": readonly ["off"];
|
|
60
61
|
readonly "no-use-before-define": "off";
|
|
61
62
|
readonly "@typescript-eslint/no-use-before-define": readonly ["error"];
|
|
@@ -74,7 +75,6 @@ declare const _default: {
|
|
|
74
75
|
readonly allowNullableObject: false;
|
|
75
76
|
}];
|
|
76
77
|
readonly "@typescript-eslint/switch-exhaustiveness-check": readonly ["error"];
|
|
77
|
-
readonly "@typescript-eslint/typedef": readonly ["off"];
|
|
78
78
|
readonly "@typescript-eslint/restrict-template-expressions": readonly ["error", {
|
|
79
79
|
readonly allowBoolean: true;
|
|
80
80
|
readonly allowNumber: true;
|
package/dist/rules/typescript.js
CHANGED
|
@@ -143,6 +143,9 @@ export default {
|
|
|
143
143
|
// Disallow unnecessary namespace qualifiers.
|
|
144
144
|
// https://typescript-eslint.io/rules/no-unnecessary-qualifier
|
|
145
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"],
|
|
146
149
|
// Disallow type assertions that narrow a type
|
|
147
150
|
// https://typescript-eslint.io/rules/no-unsafe-type-assertion/
|
|
148
151
|
"@typescript-eslint/no-unsafe-type-assertion": ["off"],
|
|
@@ -214,9 +217,6 @@ export default {
|
|
|
214
217
|
// Require switch-case statements to be exhaustive.
|
|
215
218
|
// https://typescript-eslint.io/rules/switch-exhaustiveness-check
|
|
216
219
|
"@typescript-eslint/switch-exhaustiveness-check": ["error"],
|
|
217
|
-
// Require type annotations in certain places.
|
|
218
|
-
// https://typescript-eslint.io/rules/typedef
|
|
219
|
-
"@typescript-eslint/typedef": ["off"],
|
|
220
220
|
// Additional rules (Customize rules that are not in predefined configs)
|
|
221
221
|
// Enforce template literal expressions to be of string type.
|
|
222
222
|
// https://typescript-eslint.io/rules/restrict-template-expressions
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paratco/eslint-config",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "Paratco",
|
|
6
6
|
"license": "ISC",
|
|
@@ -37,26 +37,26 @@
|
|
|
37
37
|
"build": "tsc"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"eslint": "^9.
|
|
41
|
-
"typescript-eslint": "^8.
|
|
40
|
+
"eslint": "^9.30.0",
|
|
41
|
+
"typescript-eslint": "^8.35.0"
|
|
42
42
|
},
|
|
43
43
|
"optionalDependencies": {
|
|
44
|
-
"prettier": "^3.
|
|
44
|
+
"prettier": "^3.6.2"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@eslint/js": "^9.
|
|
48
|
-
"@stylistic/eslint-plugin": "^
|
|
49
|
-
"eslint": "^9.
|
|
47
|
+
"@eslint/js": "^9.30.0",
|
|
48
|
+
"@stylistic/eslint-plugin": "^5.1.0",
|
|
49
|
+
"eslint": "^9.30.0",
|
|
50
50
|
"eslint-config-prettier": "^10.1.5",
|
|
51
|
-
"eslint-import-resolver-typescript": "^4.4.
|
|
52
|
-
"eslint-plugin-import-x": "^4.
|
|
51
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
52
|
+
"eslint-plugin-import-x": "^4.16.1",
|
|
53
53
|
"eslint-plugin-react": "^7.37.5",
|
|
54
54
|
"eslint-plugin-react-hooks": "5.2.0",
|
|
55
55
|
"eslint-plugin-react-refresh": "^0.4.20",
|
|
56
56
|
"eslint-plugin-unicorn": "^59.0.1",
|
|
57
57
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
58
58
|
"globals": "^16.2.0",
|
|
59
|
-
"typescript-eslint": "^8.
|
|
59
|
+
"typescript-eslint": "^8.35.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"typescript": "^5.8.3"
|