@coderwyd/eslint-config 2.6.0 → 2.6.1
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/README.md +10 -10
- package/dist/cli.cjs +23 -23
- package/dist/cli.js +23 -23
- package/dist/index.cjs +15 -13
- package/dist/index.d.cts +1631 -1479
- package/dist/index.d.ts +1631 -1479
- package/dist/index.js +15 -15
- package/package.json +19 -19
package/dist/index.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
// src/index.ts
|
|
2
|
-
import fs from "node:fs";
|
|
3
|
-
|
|
4
1
|
// src/plugins/index.ts
|
|
5
2
|
import { default as default2 } from "eslint-plugin-antfu";
|
|
6
3
|
import { default as default3 } from "eslint-plugin-eslint-comments";
|
|
@@ -75,6 +72,7 @@ var GLOB_EXCLUDE = [
|
|
|
75
72
|
"**/.vitepress/cache",
|
|
76
73
|
"**/.nuxt",
|
|
77
74
|
"**/.next",
|
|
75
|
+
"**/.svelte-kit",
|
|
78
76
|
"**/.vercel",
|
|
79
77
|
"**/.changeset",
|
|
80
78
|
"**/.idea",
|
|
@@ -854,6 +852,7 @@ function sortTsconfig() {
|
|
|
854
852
|
"allowSyntheticDefaultImports",
|
|
855
853
|
"esModuleInterop",
|
|
856
854
|
"forceConsistentCasingInFileNames",
|
|
855
|
+
"isolatedDeclarations",
|
|
857
856
|
"isolatedModules",
|
|
858
857
|
"preserveSymlinks",
|
|
859
858
|
"verbatimModuleSyntax",
|
|
@@ -931,7 +930,7 @@ async function typescript(options = {}) {
|
|
|
931
930
|
`${GLOB_MARKDOWN}/**`,
|
|
932
931
|
GLOB_ASTRO_TS
|
|
933
932
|
];
|
|
934
|
-
const tsconfigPath = options
|
|
933
|
+
const tsconfigPath = options.tsconfigPath;
|
|
935
934
|
const isTypeAware = !!tsconfigPath;
|
|
936
935
|
const typeAwareRules = {
|
|
937
936
|
"dot-notation": "off",
|
|
@@ -1014,7 +1013,7 @@ async function typescript(options = {}) {
|
|
|
1014
1013
|
"no-useless-constructor": "off",
|
|
1015
1014
|
"ts/ban-ts-comment": [
|
|
1016
1015
|
"error",
|
|
1017
|
-
{ "ts-
|
|
1016
|
+
{ "ts-expect-error": "allow-with-description" }
|
|
1018
1017
|
],
|
|
1019
1018
|
"ts/consistent-type-definitions": ["error", "interface"],
|
|
1020
1019
|
"ts/consistent-type-imports": [
|
|
@@ -1025,7 +1024,15 @@ async function typescript(options = {}) {
|
|
|
1025
1024
|
// https://www.totaltypescript.com/method-shorthand-syntax-considered-harmful
|
|
1026
1025
|
"ts/no-dupe-class-members": "error",
|
|
1027
1026
|
"ts/no-dynamic-delete": "off",
|
|
1028
|
-
"ts/no-empty-object-type": [
|
|
1027
|
+
"ts/no-empty-object-type": [
|
|
1028
|
+
"error",
|
|
1029
|
+
{
|
|
1030
|
+
allowInterfaces: "with-single-extends",
|
|
1031
|
+
// interface Derived extends Base {}
|
|
1032
|
+
allowObjectTypes: "never",
|
|
1033
|
+
allowWithName: "Props$"
|
|
1034
|
+
}
|
|
1035
|
+
],
|
|
1029
1036
|
"ts/no-explicit-any": "off",
|
|
1030
1037
|
"ts/no-extraneous-class": "off",
|
|
1031
1038
|
"ts/no-import-type-side-effects": "error",
|
|
@@ -1041,7 +1048,6 @@ async function typescript(options = {}) {
|
|
|
1041
1048
|
],
|
|
1042
1049
|
"ts/no-useless-constructor": "off",
|
|
1043
1050
|
"ts/no-wrapper-object-types": "error",
|
|
1044
|
-
"ts/prefer-ts-expect-error": "error",
|
|
1045
1051
|
"ts/triple-slash-reference": "off",
|
|
1046
1052
|
"ts/unified-signatures": "off",
|
|
1047
1053
|
...overrides
|
|
@@ -1426,6 +1432,7 @@ async function test(options = {}) {
|
|
|
1426
1432
|
"test/no-only-tests": isInEditor2 ? "off" : "error",
|
|
1427
1433
|
"test/prefer-hooks-in-order": "error",
|
|
1428
1434
|
"test/prefer-lowercase-title": "error",
|
|
1435
|
+
"ts/explicit-function-return-type": "off",
|
|
1429
1436
|
...overrides
|
|
1430
1437
|
}
|
|
1431
1438
|
}
|
|
@@ -1788,7 +1795,6 @@ async function svelte(options = {}) {
|
|
|
1788
1795
|
"svelte/no-useless-mustaches": "error",
|
|
1789
1796
|
"svelte/require-store-callbacks-use-set-param": "error",
|
|
1790
1797
|
"svelte/system": "error",
|
|
1791
|
-
"svelte/valid-compile": "error",
|
|
1792
1798
|
"svelte/valid-each-key": "error",
|
|
1793
1799
|
"unused-imports/no-unused-vars": [
|
|
1794
1800
|
"error",
|
|
@@ -1958,13 +1964,7 @@ async function defineConfig(options = {}, ...userConfigs) {
|
|
|
1958
1964
|
])
|
|
1959
1965
|
);
|
|
1960
1966
|
} else {
|
|
1961
|
-
|
|
1962
|
-
configs2.push(
|
|
1963
|
-
interopDefault(import("eslint-config-flat-gitignore")).then((r) => [
|
|
1964
|
-
r()
|
|
1965
|
-
])
|
|
1966
|
-
);
|
|
1967
|
-
}
|
|
1967
|
+
configs2.push(interopDefault(import("eslint-config-flat-gitignore")).then((r) => [r({ strict: false })]));
|
|
1968
1968
|
}
|
|
1969
1969
|
}
|
|
1970
1970
|
const typescriptOptions = resolveSubOptions(options, "typescript");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coderwyd/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.6.
|
|
4
|
+
"version": "2.6.1",
|
|
5
5
|
"description": "Donny's ESLint config",
|
|
6
6
|
"author": "Donny Wang <donny526@outlook.com> (https://github.com/coderwyd/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -71,23 +71,23 @@
|
|
|
71
71
|
"@antfu/install-pkg": "^0.3.3",
|
|
72
72
|
"@stylistic/eslint-plugin": "^2.6.0-beta.0",
|
|
73
73
|
"@toml-tools/parser": "^1.0.0",
|
|
74
|
-
"@typescript-eslint/eslint-plugin": "^8.0.0-alpha.
|
|
75
|
-
"@typescript-eslint/parser": "^8.0.0-alpha.
|
|
76
|
-
"eslint-config-flat-gitignore": "^0.1.
|
|
74
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0-alpha.51",
|
|
75
|
+
"@typescript-eslint/parser": "^8.0.0-alpha.51",
|
|
76
|
+
"eslint-config-flat-gitignore": "^0.1.8",
|
|
77
77
|
"eslint-merge-processors": "^0.1.0",
|
|
78
78
|
"eslint-plugin-antfu": "^2.3.4",
|
|
79
79
|
"eslint-plugin-command": "^0.2.3",
|
|
80
80
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
81
81
|
"eslint-plugin-format": "^0.1.2",
|
|
82
82
|
"eslint-plugin-import-x": "^3.0.1",
|
|
83
|
-
"eslint-plugin-jsdoc": "^48.
|
|
83
|
+
"eslint-plugin-jsdoc": "^48.8.3",
|
|
84
84
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
85
85
|
"eslint-plugin-n": "^17.9.0",
|
|
86
86
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
87
|
-
"eslint-plugin-perfectionist": "^
|
|
87
|
+
"eslint-plugin-perfectionist": "^3.0.0",
|
|
88
88
|
"eslint-plugin-regexp": "^2.6.0",
|
|
89
89
|
"eslint-plugin-unicorn": "^54.0.0",
|
|
90
|
-
"eslint-plugin-unused-imports": "^4.0.
|
|
90
|
+
"eslint-plugin-unused-imports": "^4.0.1",
|
|
91
91
|
"eslint-plugin-vitest": "^0.5.4",
|
|
92
92
|
"eslint-plugin-vue": "^9.27.0",
|
|
93
93
|
"eslint-processor-vue-blocks": "^0.1.2",
|
|
@@ -103,21 +103,21 @@
|
|
|
103
103
|
"yargs": "^17.7.2"
|
|
104
104
|
},
|
|
105
105
|
"devDependencies": {
|
|
106
|
-
"@antfu/ni": "^0.
|
|
107
|
-
"@eslint-react/eslint-plugin": "^1.5.
|
|
108
|
-
"@eslint/config-inspector": "^0.5.
|
|
106
|
+
"@antfu/ni": "^0.22.0",
|
|
107
|
+
"@eslint-react/eslint-plugin": "^1.5.30",
|
|
108
|
+
"@eslint/config-inspector": "^0.5.2",
|
|
109
109
|
"@stylistic/eslint-plugin-migrate": "^2.3.0",
|
|
110
|
-
"@types/eslint": "^8.56.
|
|
110
|
+
"@types/eslint": "^8.56.11",
|
|
111
111
|
"@types/fs-extra": "^11.0.4",
|
|
112
|
-
"@types/node": "^20.14.
|
|
112
|
+
"@types/node": "^20.14.11",
|
|
113
113
|
"@types/prompts": "^2.4.9",
|
|
114
114
|
"@types/yargs": "^17.0.32",
|
|
115
|
-
"@unocss/eslint-plugin": "^0.61.
|
|
115
|
+
"@unocss/eslint-plugin": "^0.61.5",
|
|
116
116
|
"bumpp": "^9.4.1",
|
|
117
|
-
"eslint": "^9.
|
|
117
|
+
"eslint": "^9.7.0",
|
|
118
118
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
119
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
120
|
-
"eslint-plugin-svelte": "2.
|
|
119
|
+
"eslint-plugin-react-refresh": "^0.4.9",
|
|
120
|
+
"eslint-plugin-svelte": "2.43.0",
|
|
121
121
|
"eslint-plugin-tailwindcss": "^3.17.4",
|
|
122
122
|
"execa": "^9.3.0",
|
|
123
123
|
"fast-glob": "^3.3.2",
|
|
@@ -126,10 +126,10 @@
|
|
|
126
126
|
"rimraf": "^6.0.1",
|
|
127
127
|
"simple-git-hooks": "^2.11.1",
|
|
128
128
|
"svelte": "^4.2.18",
|
|
129
|
-
"svelte-eslint-parser": "^0.
|
|
130
|
-
"tsup": "^8.
|
|
129
|
+
"svelte-eslint-parser": "^0.41.0",
|
|
130
|
+
"tsup": "^8.2.2",
|
|
131
131
|
"tsx": "^4.16.2",
|
|
132
|
-
"typescript": "^5.5.
|
|
132
|
+
"typescript": "^5.5.4"
|
|
133
133
|
},
|
|
134
134
|
"simple-git-hooks": {
|
|
135
135
|
"pre-commit": "pnpx nano-staged"
|