@coderwyd/eslint-config 2.7.1 → 2.7.3
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 +12 -13
- package/dist/cli.js +12 -13
- package/dist/index.cjs +23 -8
- package/dist/index.d.cts +187 -110
- package/dist/index.d.ts +187 -110
- package/dist/index.js +22 -7
- package/package.json +24 -25
package/dist/index.js
CHANGED
|
@@ -104,18 +104,19 @@ var GLOB_EXCLUDE = [
|
|
|
104
104
|
function disables() {
|
|
105
105
|
return [
|
|
106
106
|
{
|
|
107
|
-
files: [
|
|
107
|
+
files: [`**/scripts/${GLOB_SRC}`],
|
|
108
108
|
name: "coderwyd/disables/scripts",
|
|
109
109
|
rules: {
|
|
110
|
+
"antfu/no-top-level-await": "off",
|
|
110
111
|
"no-console": "off",
|
|
111
|
-
"ts/explicit-function-return-type": "off"
|
|
112
|
-
"unicorn/consistent-function-scoping": "off"
|
|
112
|
+
"ts/explicit-function-return-type": "off"
|
|
113
113
|
}
|
|
114
114
|
},
|
|
115
115
|
{
|
|
116
|
-
files: [
|
|
116
|
+
files: [`**/cli/${GLOB_SRC}`, `**/cli.${GLOB_SRC_EXT}`],
|
|
117
117
|
name: "coderwyd/disables/cli",
|
|
118
118
|
rules: {
|
|
119
|
+
"antfu/no-top-level-await": "off",
|
|
119
120
|
"no-console": "off"
|
|
120
121
|
}
|
|
121
122
|
},
|
|
@@ -141,6 +142,7 @@ function disables() {
|
|
|
141
142
|
files: ["**/*.{test,spec}.([tj])s?(x)"],
|
|
142
143
|
name: "coderwyd/disables/test",
|
|
143
144
|
rules: {
|
|
145
|
+
"antfu/no-top-level-await": "off",
|
|
144
146
|
"no-unused-expressions": "off"
|
|
145
147
|
}
|
|
146
148
|
},
|
|
@@ -496,6 +498,7 @@ function javascript(options = {}) {
|
|
|
496
498
|
"error",
|
|
497
499
|
{ enforceForClassMembers: true, setWithoutGet: true }
|
|
498
500
|
],
|
|
501
|
+
"antfu/no-top-level-await": "error",
|
|
499
502
|
"array-callback-return": "error",
|
|
500
503
|
"block-scoped-var": "error",
|
|
501
504
|
"constructor-super": "error",
|
|
@@ -986,6 +989,13 @@ async function react(options = {}) {
|
|
|
986
989
|
allowConstantExport: isAllowConstantExport,
|
|
987
990
|
allowExportNames: [
|
|
988
991
|
...isUsingNext ? [
|
|
992
|
+
"dynamic",
|
|
993
|
+
"dynamicParams",
|
|
994
|
+
"revalidate",
|
|
995
|
+
"fetchCache",
|
|
996
|
+
"runtime",
|
|
997
|
+
"preferredRegion",
|
|
998
|
+
"maxDuration",
|
|
989
999
|
"config",
|
|
990
1000
|
"generateStaticParams",
|
|
991
1001
|
"metadata",
|
|
@@ -1458,7 +1468,6 @@ async function test(options = {}) {
|
|
|
1458
1468
|
"test/prefer-hooks-in-order": "error",
|
|
1459
1469
|
"test/prefer-lowercase-title": "error",
|
|
1460
1470
|
"ts/explicit-function-return-type": "off",
|
|
1461
|
-
"unicorn/consistent-function-scoping": "off",
|
|
1462
1471
|
...overrides
|
|
1463
1472
|
}
|
|
1464
1473
|
}
|
|
@@ -1586,8 +1595,13 @@ async function typescript(options = {}) {
|
|
|
1586
1595
|
"ts/no-import-type-side-effects": "error",
|
|
1587
1596
|
"ts/no-invalid-void-type": "off",
|
|
1588
1597
|
"ts/no-non-null-assertion": "off",
|
|
1589
|
-
"ts/no-redeclare": "error",
|
|
1598
|
+
"ts/no-redeclare": ["error", { builtinGlobals: false }],
|
|
1590
1599
|
"ts/no-require-imports": "error",
|
|
1600
|
+
"ts/no-unused-expressions": ["error", {
|
|
1601
|
+
allowShortCircuit: true,
|
|
1602
|
+
allowTaggedTemplates: true,
|
|
1603
|
+
allowTernary: true
|
|
1604
|
+
}],
|
|
1591
1605
|
"ts/no-unused-vars": "off",
|
|
1592
1606
|
"ts/no-use-before-define": [
|
|
1593
1607
|
"error",
|
|
@@ -1626,7 +1640,6 @@ function unicorn() {
|
|
|
1626
1640
|
// 'unicorn/better-regex': 'error',
|
|
1627
1641
|
"unicorn/catch-error-name": "error",
|
|
1628
1642
|
"unicorn/consistent-empty-array-spread": "error",
|
|
1629
|
-
"unicorn/consistent-function-scoping": ["error", { checkArrowFunctions: false }],
|
|
1630
1643
|
"unicorn/custom-error-definition": "error",
|
|
1631
1644
|
"unicorn/error-message": "error",
|
|
1632
1645
|
// 'unicorn/explicit-length-check': 'error',
|
|
@@ -1796,7 +1809,9 @@ async function vue(options = {}) {
|
|
|
1796
1809
|
rules: {
|
|
1797
1810
|
...pluginVue.configs.base.rules,
|
|
1798
1811
|
...vueRules,
|
|
1812
|
+
"antfu/no-top-level-await": "off",
|
|
1799
1813
|
"node/prefer-global/process": "off",
|
|
1814
|
+
"ts/explicit-function-return-type": "off",
|
|
1800
1815
|
"vue/block-order": [
|
|
1801
1816
|
"error",
|
|
1802
1817
|
{
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coderwyd/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.7.
|
|
4
|
+
"version": "2.7.3",
|
|
5
5
|
"description": "Donny's ESLint config",
|
|
6
6
|
"author": "Donny Wang <donny526@outlook.com> (https://github.com/coderwyd/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -70,29 +70,29 @@
|
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"@antfu/install-pkg": "^0.4.1",
|
|
72
72
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
|
|
73
|
-
"@stylistic/eslint-plugin": "^2.
|
|
73
|
+
"@stylistic/eslint-plugin": "^2.8.0",
|
|
74
74
|
"@toml-tools/parser": "^1.0.0",
|
|
75
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
76
|
-
"@typescript-eslint/parser": "^8.
|
|
77
|
-
"@vitest/eslint-plugin": "^1.1.
|
|
75
|
+
"@typescript-eslint/eslint-plugin": "^8.7.0",
|
|
76
|
+
"@typescript-eslint/parser": "^8.7.0",
|
|
77
|
+
"@vitest/eslint-plugin": "^1.1.4",
|
|
78
78
|
"eslint-config-flat-gitignore": "^0.3.0",
|
|
79
79
|
"eslint-merge-processors": "^0.1.0",
|
|
80
|
-
"eslint-plugin-antfu": "^2.
|
|
81
|
-
"eslint-plugin-command": "^0.2.
|
|
80
|
+
"eslint-plugin-antfu": "^2.7.0",
|
|
81
|
+
"eslint-plugin-command": "^0.2.5",
|
|
82
82
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
83
83
|
"eslint-plugin-format": "^0.1.2",
|
|
84
|
-
"eslint-plugin-import-x": "^4.
|
|
85
|
-
"eslint-plugin-jsdoc": "^50.2.
|
|
84
|
+
"eslint-plugin-import-x": "^4.3.0",
|
|
85
|
+
"eslint-plugin-jsdoc": "^50.2.4",
|
|
86
86
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
87
|
-
"eslint-plugin-n": "^17.10.
|
|
87
|
+
"eslint-plugin-n": "^17.10.3",
|
|
88
88
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
89
|
-
"eslint-plugin-perfectionist": "^3.
|
|
89
|
+
"eslint-plugin-perfectionist": "^3.7.0",
|
|
90
90
|
"eslint-plugin-regexp": "^2.6.0",
|
|
91
91
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
92
|
-
"eslint-plugin-unused-imports": "^4.1.
|
|
92
|
+
"eslint-plugin-unused-imports": "^4.1.4",
|
|
93
93
|
"eslint-plugin-vue": "^9.28.0",
|
|
94
94
|
"eslint-processor-vue-blocks": "^0.1.2",
|
|
95
|
-
"eslint-typegen": "^0.3.
|
|
95
|
+
"eslint-typegen": "^0.3.2",
|
|
96
96
|
"globals": "^15.9.0",
|
|
97
97
|
"jsonc-eslint-parser": "^2.4.0",
|
|
98
98
|
"local-pkg": "^0.5.0",
|
|
@@ -105,22 +105,21 @@
|
|
|
105
105
|
},
|
|
106
106
|
"devDependencies": {
|
|
107
107
|
"@antfu/ni": "^0.23.0",
|
|
108
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
108
|
+
"@eslint-react/eslint-plugin": "^1.14.2",
|
|
109
109
|
"@eslint/config-inspector": "^0.5.4",
|
|
110
|
-
"@stylistic/eslint-plugin-migrate": "^2.
|
|
111
|
-
"@types/eslint": "^9.6.1",
|
|
110
|
+
"@stylistic/eslint-plugin-migrate": "^2.8.0",
|
|
112
111
|
"@types/fs-extra": "^11.0.4",
|
|
113
|
-
"@types/node": "^22.
|
|
112
|
+
"@types/node": "^22.6.1",
|
|
114
113
|
"@types/prompts": "^2.4.9",
|
|
115
114
|
"@types/yargs": "^17.0.33",
|
|
116
|
-
"@unocss/eslint-plugin": "^0.62.
|
|
115
|
+
"@unocss/eslint-plugin": "^0.62.4",
|
|
117
116
|
"bumpp": "^9.5.2",
|
|
118
|
-
"eslint": "^9.
|
|
117
|
+
"eslint": "^9.11.1",
|
|
119
118
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
120
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
119
|
+
"eslint-plugin-react-refresh": "^0.4.12",
|
|
121
120
|
"eslint-plugin-svelte": "2.43.0",
|
|
122
121
|
"eslint-plugin-tailwindcss": "^3.17.4",
|
|
123
|
-
"execa": "^9.
|
|
122
|
+
"execa": "^9.4.0",
|
|
124
123
|
"fast-glob": "^3.3.2",
|
|
125
124
|
"fs-extra": "^11.2.0",
|
|
126
125
|
"jiti": "^1.21.6",
|
|
@@ -128,10 +127,10 @@
|
|
|
128
127
|
"rimraf": "^6.0.1",
|
|
129
128
|
"simple-git-hooks": "^2.11.1",
|
|
130
129
|
"svelte": "^4.2.19",
|
|
131
|
-
"svelte-eslint-parser": "^0.41.
|
|
132
|
-
"tsup": "^8.
|
|
133
|
-
"tsx": "^4.19.
|
|
134
|
-
"typescript": "^5.
|
|
130
|
+
"svelte-eslint-parser": "^0.41.1",
|
|
131
|
+
"tsup": "^8.3.0",
|
|
132
|
+
"tsx": "^4.19.1",
|
|
133
|
+
"typescript": "^5.6.2"
|
|
135
134
|
},
|
|
136
135
|
"simple-git-hooks": {
|
|
137
136
|
"pre-commit": "pnpx nano-staged"
|