@coderwyd/eslint-config 2.5.6 → 2.6.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/cli.cjs +9 -9
- package/dist/cli.js +9 -9
- package/dist/index.cjs +7 -6
- package/dist/index.d.cts +293 -810
- package/dist/index.d.ts +293 -810
- package/dist/index.js +7 -6
- package/package.json +18 -18
package/dist/index.js
CHANGED
|
@@ -31,7 +31,6 @@ async function comments() {
|
|
|
31
31
|
// src/constants/glob.ts
|
|
32
32
|
var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
33
33
|
var GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
34
|
-
var GLOB_JS = "**/*.?([cm])js";
|
|
35
34
|
var GLOB_JSX = "**/*.?([cm])jsx";
|
|
36
35
|
var GLOB_TS = "**/*.?([cm])ts";
|
|
37
36
|
var GLOB_DTS = "**/*.d.?([cm])ts";
|
|
@@ -937,14 +936,12 @@ async function typescript(options = {}) {
|
|
|
937
936
|
const typeAwareRules = {
|
|
938
937
|
"dot-notation": "off",
|
|
939
938
|
"no-implied-eval": "off",
|
|
940
|
-
"no-throw-literal": "off",
|
|
941
939
|
"ts/await-thenable": "error",
|
|
942
940
|
"ts/dot-notation": ["error", { allowKeywords: true }],
|
|
943
941
|
"ts/no-floating-promises": "error",
|
|
944
942
|
"ts/no-for-in-array": "error",
|
|
945
943
|
"ts/no-implied-eval": "error",
|
|
946
944
|
"ts/no-misused-promises": "error",
|
|
947
|
-
"ts/no-throw-literal": "error",
|
|
948
945
|
"ts/no-unnecessary-type-assertion": "error",
|
|
949
946
|
"ts/no-unsafe-argument": "error",
|
|
950
947
|
"ts/no-unsafe-assignment": "error",
|
|
@@ -973,7 +970,10 @@ async function typescript(options = {}) {
|
|
|
973
970
|
extraFileExtensions: componentExts.map((ext) => `.${ext}`),
|
|
974
971
|
sourceType: "module",
|
|
975
972
|
...typeAware ? {
|
|
976
|
-
|
|
973
|
+
projectService: {
|
|
974
|
+
allowDefaultProject: ["./*.js"],
|
|
975
|
+
defaultProject: tsconfigPath
|
|
976
|
+
},
|
|
977
977
|
tsconfigRootDir: process2.cwd()
|
|
978
978
|
} : {},
|
|
979
979
|
...parserOptions
|
|
@@ -1016,7 +1016,6 @@ async function typescript(options = {}) {
|
|
|
1016
1016
|
"error",
|
|
1017
1017
|
{ "ts-ignore": "allow-with-description" }
|
|
1018
1018
|
],
|
|
1019
|
-
"ts/ban-types": ["error", { types: { Function: false } }],
|
|
1020
1019
|
"ts/consistent-type-definitions": ["error", "interface"],
|
|
1021
1020
|
"ts/consistent-type-imports": [
|
|
1022
1021
|
"error",
|
|
@@ -1026,6 +1025,7 @@ async function typescript(options = {}) {
|
|
|
1026
1025
|
// https://www.totaltypescript.com/method-shorthand-syntax-considered-harmful
|
|
1027
1026
|
"ts/no-dupe-class-members": "error",
|
|
1028
1027
|
"ts/no-dynamic-delete": "off",
|
|
1028
|
+
"ts/no-empty-object-type": ["error", { allowInterfaces: "always" }],
|
|
1029
1029
|
"ts/no-explicit-any": "off",
|
|
1030
1030
|
"ts/no-extraneous-class": "off",
|
|
1031
1031
|
"ts/no-import-type-side-effects": "error",
|
|
@@ -1040,6 +1040,7 @@ async function typescript(options = {}) {
|
|
|
1040
1040
|
{ classes: false, functions: false, variables: true }
|
|
1041
1041
|
],
|
|
1042
1042
|
"ts/no-useless-constructor": "off",
|
|
1043
|
+
"ts/no-wrapper-object-types": "error",
|
|
1043
1044
|
"ts/prefer-ts-expect-error": "error",
|
|
1044
1045
|
"ts/triple-slash-reference": "off",
|
|
1045
1046
|
"ts/unified-signatures": "off",
|
|
@@ -1474,7 +1475,7 @@ function hasPackages(packages) {
|
|
|
1474
1475
|
// src/configs/react.ts
|
|
1475
1476
|
var ReactRefreshAllowConstantExportPackages = ["vite"];
|
|
1476
1477
|
async function react(options = {}) {
|
|
1477
|
-
const { files = [
|
|
1478
|
+
const { files = [GLOB_SRC], overrides = {} } = options;
|
|
1478
1479
|
await ensurePackages([
|
|
1479
1480
|
"@eslint-react/eslint-plugin",
|
|
1480
1481
|
"eslint-plugin-react-hooks",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coderwyd/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.6.0",
|
|
5
5
|
"description": "Donny's ESLint config",
|
|
6
6
|
"author": "Donny Wang <donny526@outlook.com> (https://github.com/coderwyd/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -69,30 +69,30 @@
|
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"@antfu/install-pkg": "^0.3.3",
|
|
72
|
-
"@stylistic/eslint-plugin": "^2.
|
|
72
|
+
"@stylistic/eslint-plugin": "^2.6.0-beta.0",
|
|
73
73
|
"@toml-tools/parser": "^1.0.0",
|
|
74
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
75
|
-
"@typescript-eslint/parser": "^
|
|
76
|
-
"eslint-config-flat-gitignore": "^0.1.
|
|
74
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0-alpha.41",
|
|
75
|
+
"@typescript-eslint/parser": "^8.0.0-alpha.41",
|
|
76
|
+
"eslint-config-flat-gitignore": "^0.1.7",
|
|
77
77
|
"eslint-merge-processors": "^0.1.0",
|
|
78
|
-
"eslint-plugin-antfu": "^2.3.
|
|
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
|
-
"eslint-plugin-import-x": "^0.
|
|
83
|
-
"eslint-plugin-jsdoc": "^48.
|
|
82
|
+
"eslint-plugin-import-x": "^3.0.1",
|
|
83
|
+
"eslint-plugin-jsdoc": "^48.7.0",
|
|
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
87
|
"eslint-plugin-perfectionist": "^2.11.0",
|
|
88
88
|
"eslint-plugin-regexp": "^2.6.0",
|
|
89
89
|
"eslint-plugin-unicorn": "^54.0.0",
|
|
90
|
-
"eslint-plugin-unused-imports": "^
|
|
90
|
+
"eslint-plugin-unused-imports": "^4.0.0",
|
|
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",
|
|
94
94
|
"eslint-typegen": "^0.2.4",
|
|
95
|
-
"globals": "^15.
|
|
95
|
+
"globals": "^15.8.0",
|
|
96
96
|
"jsonc-eslint-parser": "^2.4.0",
|
|
97
97
|
"local-pkg": "^0.5.0",
|
|
98
98
|
"parse-gitignore": "^2.0.0",
|
|
@@ -104,31 +104,31 @@
|
|
|
104
104
|
},
|
|
105
105
|
"devDependencies": {
|
|
106
106
|
"@antfu/ni": "^0.21.12",
|
|
107
|
-
"@eslint-react/eslint-plugin": "^1.5.
|
|
107
|
+
"@eslint-react/eslint-plugin": "^1.5.24",
|
|
108
108
|
"@eslint/config-inspector": "^0.5.1",
|
|
109
109
|
"@stylistic/eslint-plugin-migrate": "^2.3.0",
|
|
110
110
|
"@types/eslint": "^8.56.10",
|
|
111
111
|
"@types/fs-extra": "^11.0.4",
|
|
112
|
-
"@types/node": "^20.14.
|
|
112
|
+
"@types/node": "^20.14.10",
|
|
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.3",
|
|
116
116
|
"bumpp": "^9.4.1",
|
|
117
117
|
"eslint": "^9.6.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.8",
|
|
120
|
+
"eslint-plugin-svelte": "2.41.0",
|
|
121
121
|
"eslint-plugin-tailwindcss": "^3.17.4",
|
|
122
122
|
"execa": "^9.3.0",
|
|
123
123
|
"fast-glob": "^3.3.2",
|
|
124
124
|
"fs-extra": "^11.2.0",
|
|
125
125
|
"lint-staged": "^15.2.7",
|
|
126
|
-
"rimraf": "^
|
|
126
|
+
"rimraf": "^6.0.1",
|
|
127
127
|
"simple-git-hooks": "^2.11.1",
|
|
128
128
|
"svelte": "^4.2.18",
|
|
129
|
-
"svelte-eslint-parser": "^0.
|
|
129
|
+
"svelte-eslint-parser": "^0.40.0",
|
|
130
130
|
"tsup": "^8.1.0",
|
|
131
|
-
"tsx": "^4.16.
|
|
131
|
+
"tsx": "^4.16.2",
|
|
132
132
|
"typescript": "^5.5.3"
|
|
133
133
|
},
|
|
134
134
|
"simple-git-hooks": {
|