@debbl/eslint-config 3.4.0 → 3.5.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/index.cjs +18 -15
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +18 -15
- package/package.json +27 -27
package/dist/index.cjs
CHANGED
|
@@ -263,7 +263,6 @@ var import_globals = __toESM(require("globals"), 1);
|
|
|
263
263
|
var javascript = async (options) => {
|
|
264
264
|
const { overrides = {} } = options;
|
|
265
265
|
const pluginUnusedImports = await interopDefault(
|
|
266
|
-
// @ts-expect-error missing types
|
|
267
266
|
import("eslint-plugin-unused-imports")
|
|
268
267
|
);
|
|
269
268
|
return [
|
|
@@ -931,14 +930,12 @@ var import_node_process = __toESM(require("process"), 1);
|
|
|
931
930
|
var typeAwareRules = {
|
|
932
931
|
"dot-notation": "off",
|
|
933
932
|
"no-implied-eval": "off",
|
|
934
|
-
"no-throw-literal": "off",
|
|
935
933
|
"@typescript-eslint/await-thenable": "error",
|
|
936
934
|
"@typescript-eslint/dot-notation": ["error", { allowKeywords: true }],
|
|
937
935
|
"@typescript-eslint/no-floating-promises": "error",
|
|
938
936
|
"@typescript-eslint/no-for-in-array": "error",
|
|
939
937
|
"@typescript-eslint/no-implied-eval": "error",
|
|
940
938
|
"@typescript-eslint/no-misused-promises": "error",
|
|
941
|
-
"@typescript-eslint/no-throw-literal": "error",
|
|
942
939
|
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
|
943
940
|
"@typescript-eslint/no-unsafe-argument": "error",
|
|
944
941
|
"@typescript-eslint/no-unsafe-assignment": "error",
|
|
@@ -948,8 +945,11 @@ var typeAwareRules = {
|
|
|
948
945
|
"@typescript-eslint/promise-function-async": "error",
|
|
949
946
|
"@typescript-eslint/restrict-plus-operands": "error",
|
|
950
947
|
"@typescript-eslint/restrict-template-expressions": "error",
|
|
951
|
-
"@typescript-eslint/
|
|
952
|
-
"@typescript-eslint/
|
|
948
|
+
"@typescript-eslint/return-await": ["error", "in-try-catch"],
|
|
949
|
+
"@typescript-eslint/strict-boolean-expressions": [
|
|
950
|
+
"error",
|
|
951
|
+
{ allowNullableBoolean: true, allowNullableObject: true }
|
|
952
|
+
],
|
|
953
953
|
"@typescript-eslint/switch-exhaustiveness-check": "error",
|
|
954
954
|
"@typescript-eslint/unbound-method": "error"
|
|
955
955
|
};
|
|
@@ -999,18 +999,13 @@ var typescript = async (options) => {
|
|
|
999
999
|
"solid/no-unknown-namespaces": "off"
|
|
1000
1000
|
} : {},
|
|
1001
1001
|
"no-dupe-class-members": "off",
|
|
1002
|
-
"no-invalid-this": "off",
|
|
1003
1002
|
"no-loss-of-precision": "off",
|
|
1004
1003
|
"no-redeclare": "off",
|
|
1005
1004
|
"no-use-before-define": "off",
|
|
1006
1005
|
"no-useless-constructor": "off",
|
|
1007
1006
|
"@typescript-eslint/ban-ts-comment": [
|
|
1008
1007
|
"error",
|
|
1009
|
-
{ "ts-
|
|
1010
|
-
],
|
|
1011
|
-
"@typescript-eslint/ban-types": [
|
|
1012
|
-
"error",
|
|
1013
|
-
{ types: { Function: false } }
|
|
1008
|
+
{ "ts-expect-error": "allow-with-description" }
|
|
1014
1009
|
],
|
|
1015
1010
|
"@typescript-eslint/consistent-type-definitions": [
|
|
1016
1011
|
"error",
|
|
@@ -1018,16 +1013,22 @@ var typescript = async (options) => {
|
|
|
1018
1013
|
],
|
|
1019
1014
|
"@typescript-eslint/consistent-type-imports": [
|
|
1020
1015
|
"error",
|
|
1021
|
-
{
|
|
1016
|
+
{
|
|
1017
|
+
disallowTypeAnnotations: false,
|
|
1018
|
+
prefer: "type-imports"
|
|
1019
|
+
}
|
|
1022
1020
|
],
|
|
1023
1021
|
// https://www.totaltypescript.com/method-shorthand-syntax-considered-harmful
|
|
1024
1022
|
"@typescript-eslint/method-signature-style": ["error", "property"],
|
|
1025
1023
|
"@typescript-eslint/no-dupe-class-members": "error",
|
|
1026
1024
|
"@typescript-eslint/no-dynamic-delete": "off",
|
|
1025
|
+
"@typescript-eslint/no-empty-object-type": [
|
|
1026
|
+
"error",
|
|
1027
|
+
{ allowInterfaces: "always" }
|
|
1028
|
+
],
|
|
1027
1029
|
"@typescript-eslint/no-explicit-any": "off",
|
|
1028
1030
|
"@typescript-eslint/no-extraneous-class": "off",
|
|
1029
1031
|
"@typescript-eslint/no-import-type-side-effects": "error",
|
|
1030
|
-
"@typescript-eslint/no-invalid-this": "error",
|
|
1031
1032
|
"@typescript-eslint/no-invalid-void-type": "off",
|
|
1032
1033
|
"@typescript-eslint/no-loss-of-precision": "error",
|
|
1033
1034
|
"@typescript-eslint/no-non-null-assertion": "off",
|
|
@@ -1039,7 +1040,7 @@ var typescript = async (options) => {
|
|
|
1039
1040
|
{ classes: false, functions: false, variables: true }
|
|
1040
1041
|
],
|
|
1041
1042
|
"@typescript-eslint/no-useless-constructor": "off",
|
|
1042
|
-
"@typescript-eslint/
|
|
1043
|
+
"@typescript-eslint/no-wrapper-object-types": "error",
|
|
1043
1044
|
"@typescript-eslint/triple-slash-reference": "off",
|
|
1044
1045
|
"@typescript-eslint/unified-signatures": "off",
|
|
1045
1046
|
...tsconfigPath ? typeAwareRules : {},
|
|
@@ -1365,14 +1366,17 @@ var test = async (options) => {
|
|
|
1365
1366
|
name: "eslint/test/rules",
|
|
1366
1367
|
files: GLOB_TESTS,
|
|
1367
1368
|
rules: {
|
|
1369
|
+
"node/prefer-global/process": "off",
|
|
1368
1370
|
"test/consistent-test-it": [
|
|
1369
1371
|
"error",
|
|
1370
1372
|
{ fn: "it", withinDescribe: "it" }
|
|
1371
1373
|
],
|
|
1372
1374
|
"test/no-identical-title": "error",
|
|
1375
|
+
"test/no-import-node-test": "error",
|
|
1373
1376
|
"test/no-only-tests": "error",
|
|
1374
1377
|
"test/prefer-hooks-in-order": "error",
|
|
1375
1378
|
"test/prefer-lowercase-title": "error",
|
|
1379
|
+
"@typescript-eslint/explicit-function-return-type": "off",
|
|
1376
1380
|
...overrides
|
|
1377
1381
|
}
|
|
1378
1382
|
}
|
|
@@ -1382,7 +1386,6 @@ var test = async (options) => {
|
|
|
1382
1386
|
// src/configs/perfectionist.ts
|
|
1383
1387
|
async function perfectionist() {
|
|
1384
1388
|
const pluginPerfectionist = await interopDefault(
|
|
1385
|
-
// @ts-expect-error missing types
|
|
1386
1389
|
import("eslint-plugin-perfectionist")
|
|
1387
1390
|
);
|
|
1388
1391
|
return [
|
package/dist/index.d.cts
CHANGED
|
@@ -81,7 +81,7 @@ declare const prettier: PrettierConfig;
|
|
|
81
81
|
|
|
82
82
|
type Awaitable<T> = T | Promise<T>;
|
|
83
83
|
type GetConfigOption<T extends (...args: any) => any> = Parameters<T>[0];
|
|
84
|
-
interface ConfigItem extends Linter.
|
|
84
|
+
interface ConfigItem extends Linter.Config {
|
|
85
85
|
/**
|
|
86
86
|
* An object containing a name-value mapping of plugin names to plugin objects. When `files` is specified, these plugins are only available to the matching files.
|
|
87
87
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -81,7 +81,7 @@ declare const prettier: PrettierConfig;
|
|
|
81
81
|
|
|
82
82
|
type Awaitable<T> = T | Promise<T>;
|
|
83
83
|
type GetConfigOption<T extends (...args: any) => any> = Parameters<T>[0];
|
|
84
|
-
interface ConfigItem extends Linter.
|
|
84
|
+
interface ConfigItem extends Linter.Config {
|
|
85
85
|
/**
|
|
86
86
|
* An object containing a name-value mapping of plugin names to plugin objects. When `files` is specified, these plugins are only available to the matching files.
|
|
87
87
|
*
|
package/dist/index.js
CHANGED
|
@@ -180,7 +180,6 @@ import globals from "globals";
|
|
|
180
180
|
var javascript = async (options) => {
|
|
181
181
|
const { overrides = {} } = options;
|
|
182
182
|
const pluginUnusedImports = await interopDefault(
|
|
183
|
-
// @ts-expect-error missing types
|
|
184
183
|
import("eslint-plugin-unused-imports")
|
|
185
184
|
);
|
|
186
185
|
return [
|
|
@@ -848,14 +847,12 @@ import process2 from "process";
|
|
|
848
847
|
var typeAwareRules = {
|
|
849
848
|
"dot-notation": "off",
|
|
850
849
|
"no-implied-eval": "off",
|
|
851
|
-
"no-throw-literal": "off",
|
|
852
850
|
"@typescript-eslint/await-thenable": "error",
|
|
853
851
|
"@typescript-eslint/dot-notation": ["error", { allowKeywords: true }],
|
|
854
852
|
"@typescript-eslint/no-floating-promises": "error",
|
|
855
853
|
"@typescript-eslint/no-for-in-array": "error",
|
|
856
854
|
"@typescript-eslint/no-implied-eval": "error",
|
|
857
855
|
"@typescript-eslint/no-misused-promises": "error",
|
|
858
|
-
"@typescript-eslint/no-throw-literal": "error",
|
|
859
856
|
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
|
860
857
|
"@typescript-eslint/no-unsafe-argument": "error",
|
|
861
858
|
"@typescript-eslint/no-unsafe-assignment": "error",
|
|
@@ -865,8 +862,11 @@ var typeAwareRules = {
|
|
|
865
862
|
"@typescript-eslint/promise-function-async": "error",
|
|
866
863
|
"@typescript-eslint/restrict-plus-operands": "error",
|
|
867
864
|
"@typescript-eslint/restrict-template-expressions": "error",
|
|
868
|
-
"@typescript-eslint/
|
|
869
|
-
"@typescript-eslint/
|
|
865
|
+
"@typescript-eslint/return-await": ["error", "in-try-catch"],
|
|
866
|
+
"@typescript-eslint/strict-boolean-expressions": [
|
|
867
|
+
"error",
|
|
868
|
+
{ allowNullableBoolean: true, allowNullableObject: true }
|
|
869
|
+
],
|
|
870
870
|
"@typescript-eslint/switch-exhaustiveness-check": "error",
|
|
871
871
|
"@typescript-eslint/unbound-method": "error"
|
|
872
872
|
};
|
|
@@ -916,18 +916,13 @@ var typescript = async (options) => {
|
|
|
916
916
|
"solid/no-unknown-namespaces": "off"
|
|
917
917
|
} : {},
|
|
918
918
|
"no-dupe-class-members": "off",
|
|
919
|
-
"no-invalid-this": "off",
|
|
920
919
|
"no-loss-of-precision": "off",
|
|
921
920
|
"no-redeclare": "off",
|
|
922
921
|
"no-use-before-define": "off",
|
|
923
922
|
"no-useless-constructor": "off",
|
|
924
923
|
"@typescript-eslint/ban-ts-comment": [
|
|
925
924
|
"error",
|
|
926
|
-
{ "ts-
|
|
927
|
-
],
|
|
928
|
-
"@typescript-eslint/ban-types": [
|
|
929
|
-
"error",
|
|
930
|
-
{ types: { Function: false } }
|
|
925
|
+
{ "ts-expect-error": "allow-with-description" }
|
|
931
926
|
],
|
|
932
927
|
"@typescript-eslint/consistent-type-definitions": [
|
|
933
928
|
"error",
|
|
@@ -935,16 +930,22 @@ var typescript = async (options) => {
|
|
|
935
930
|
],
|
|
936
931
|
"@typescript-eslint/consistent-type-imports": [
|
|
937
932
|
"error",
|
|
938
|
-
{
|
|
933
|
+
{
|
|
934
|
+
disallowTypeAnnotations: false,
|
|
935
|
+
prefer: "type-imports"
|
|
936
|
+
}
|
|
939
937
|
],
|
|
940
938
|
// https://www.totaltypescript.com/method-shorthand-syntax-considered-harmful
|
|
941
939
|
"@typescript-eslint/method-signature-style": ["error", "property"],
|
|
942
940
|
"@typescript-eslint/no-dupe-class-members": "error",
|
|
943
941
|
"@typescript-eslint/no-dynamic-delete": "off",
|
|
942
|
+
"@typescript-eslint/no-empty-object-type": [
|
|
943
|
+
"error",
|
|
944
|
+
{ allowInterfaces: "always" }
|
|
945
|
+
],
|
|
944
946
|
"@typescript-eslint/no-explicit-any": "off",
|
|
945
947
|
"@typescript-eslint/no-extraneous-class": "off",
|
|
946
948
|
"@typescript-eslint/no-import-type-side-effects": "error",
|
|
947
|
-
"@typescript-eslint/no-invalid-this": "error",
|
|
948
949
|
"@typescript-eslint/no-invalid-void-type": "off",
|
|
949
950
|
"@typescript-eslint/no-loss-of-precision": "error",
|
|
950
951
|
"@typescript-eslint/no-non-null-assertion": "off",
|
|
@@ -956,7 +957,7 @@ var typescript = async (options) => {
|
|
|
956
957
|
{ classes: false, functions: false, variables: true }
|
|
957
958
|
],
|
|
958
959
|
"@typescript-eslint/no-useless-constructor": "off",
|
|
959
|
-
"@typescript-eslint/
|
|
960
|
+
"@typescript-eslint/no-wrapper-object-types": "error",
|
|
960
961
|
"@typescript-eslint/triple-slash-reference": "off",
|
|
961
962
|
"@typescript-eslint/unified-signatures": "off",
|
|
962
963
|
...tsconfigPath ? typeAwareRules : {},
|
|
@@ -1282,14 +1283,17 @@ var test = async (options) => {
|
|
|
1282
1283
|
name: "eslint/test/rules",
|
|
1283
1284
|
files: GLOB_TESTS,
|
|
1284
1285
|
rules: {
|
|
1286
|
+
"node/prefer-global/process": "off",
|
|
1285
1287
|
"test/consistent-test-it": [
|
|
1286
1288
|
"error",
|
|
1287
1289
|
{ fn: "it", withinDescribe: "it" }
|
|
1288
1290
|
],
|
|
1289
1291
|
"test/no-identical-title": "error",
|
|
1292
|
+
"test/no-import-node-test": "error",
|
|
1290
1293
|
"test/no-only-tests": "error",
|
|
1291
1294
|
"test/prefer-hooks-in-order": "error",
|
|
1292
1295
|
"test/prefer-lowercase-title": "error",
|
|
1296
|
+
"@typescript-eslint/explicit-function-return-type": "off",
|
|
1293
1297
|
...overrides
|
|
1294
1298
|
}
|
|
1295
1299
|
}
|
|
@@ -1299,7 +1303,6 @@ var test = async (options) => {
|
|
|
1299
1303
|
// src/configs/perfectionist.ts
|
|
1300
1304
|
async function perfectionist() {
|
|
1301
1305
|
const pluginPerfectionist = await interopDefault(
|
|
1302
|
-
// @ts-expect-error missing types
|
|
1303
1306
|
import("eslint-plugin-perfectionist")
|
|
1304
1307
|
);
|
|
1305
1308
|
return [
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@debbl/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.5.0",
|
|
5
5
|
"description": "Brendan Dash's ESLint config",
|
|
6
6
|
"author": "Debbl <me@aiwan.run> (https://github.com/Debbl/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -26,56 +26,56 @@
|
|
|
26
26
|
"eslint": ">=8.40.0"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@next/eslint-plugin-next": "
|
|
30
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
31
|
-
"@typescript-eslint/parser": "^
|
|
29
|
+
"@next/eslint-plugin-next": "15.0.0-rc.0",
|
|
30
|
+
"@typescript-eslint/eslint-plugin": "^8.3.0",
|
|
31
|
+
"@typescript-eslint/parser": "^8.3.0",
|
|
32
32
|
"eslint-config-prettier": "^9.1.0",
|
|
33
33
|
"eslint-mdx": "^3.1.5",
|
|
34
34
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
35
|
-
"eslint-plugin-import-x": "^
|
|
36
|
-
"eslint-plugin-jsdoc": "^
|
|
35
|
+
"eslint-plugin-import-x": "^4.1.1",
|
|
36
|
+
"eslint-plugin-jsdoc": "^50.2.2",
|
|
37
37
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
38
38
|
"eslint-plugin-markdown": "^5.1.0",
|
|
39
39
|
"eslint-plugin-mdx": "^3.1.5",
|
|
40
|
-
"eslint-plugin-n": "^17.
|
|
41
|
-
"eslint-plugin-no-only-tests": "^3.
|
|
42
|
-
"eslint-plugin-perfectionist": "^
|
|
40
|
+
"eslint-plugin-n": "^17.10.2",
|
|
41
|
+
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
42
|
+
"eslint-plugin-perfectionist": "^3.3.0",
|
|
43
43
|
"eslint-plugin-prettier": "^5.2.1",
|
|
44
44
|
"eslint-plugin-react": "^7.35.0",
|
|
45
|
-
"eslint-plugin-react-compiler": "0.0.0-experimental-
|
|
46
|
-
"eslint-plugin-react-hooks": "
|
|
47
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
48
|
-
"eslint-plugin-solid": "^0.14.
|
|
45
|
+
"eslint-plugin-react-compiler": "0.0.0-experimental-b8a7b48-20240830",
|
|
46
|
+
"eslint-plugin-react-hooks": "0.0.0-experimental-e56f4ae3-20240830",
|
|
47
|
+
"eslint-plugin-react-refresh": "^0.4.11",
|
|
48
|
+
"eslint-plugin-solid": "^0.14.2",
|
|
49
49
|
"eslint-plugin-tailwindcss": "^3.17.4",
|
|
50
50
|
"eslint-plugin-toml": "^0.11.1",
|
|
51
|
-
"eslint-plugin-unicorn": "^
|
|
52
|
-
"eslint-plugin-unused-imports": "
|
|
51
|
+
"eslint-plugin-unicorn": "^55.0.0",
|
|
52
|
+
"eslint-plugin-unused-imports": "^4.1.3",
|
|
53
53
|
"eslint-plugin-vitest": "^0.5.4",
|
|
54
54
|
"eslint-plugin-vue": "^9.27.0",
|
|
55
55
|
"eslint-plugin-yml": "^1.14.0",
|
|
56
|
-
"globals": "^15.
|
|
56
|
+
"globals": "^15.9.0",
|
|
57
57
|
"jsonc-eslint-parser": "^2.4.0",
|
|
58
58
|
"prettier": "^3.3.3",
|
|
59
|
-
"prettier-plugin-tailwindcss": "^0.6.
|
|
59
|
+
"prettier-plugin-tailwindcss": "^0.6.6",
|
|
60
60
|
"toml-eslint-parser": "^0.10.0",
|
|
61
61
|
"vue-eslint-parser": "^9.4.3",
|
|
62
62
|
"yaml-eslint-parser": "^1.2.3"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@eslint/config-inspector": "^0.5.
|
|
66
|
-
"@types/eslint": "^
|
|
67
|
-
"@types/node": "^
|
|
68
|
-
"@types/react": "^18.3.
|
|
69
|
-
"bumpp": "^9.
|
|
70
|
-
"eslint": "
|
|
71
|
-
"execa": "^9.3.
|
|
65
|
+
"@eslint/config-inspector": "^0.5.4",
|
|
66
|
+
"@types/eslint": "^9.6.1",
|
|
67
|
+
"@types/node": "^22.5.1",
|
|
68
|
+
"@types/react": "^18.3.5",
|
|
69
|
+
"bumpp": "^9.5.2",
|
|
70
|
+
"eslint": "^9.9.1",
|
|
71
|
+
"execa": "^9.3.1",
|
|
72
72
|
"fast-glob": "^3.3.2",
|
|
73
73
|
"fs-extra": "^11.2.0",
|
|
74
74
|
"react": "^18.3.1",
|
|
75
75
|
"sucrase": "^3.35.0",
|
|
76
|
-
"tsup": "^8.2.
|
|
77
|
-
"typescript": "^5.5.
|
|
78
|
-
"vitest": "^2.0.
|
|
76
|
+
"tsup": "^8.2.4",
|
|
77
|
+
"typescript": "^5.5.4",
|
|
78
|
+
"vitest": "^2.0.5"
|
|
79
79
|
},
|
|
80
80
|
"scripts": {
|
|
81
81
|
"build": "tsup --format esm,cjs --clean --dts",
|