@coderwyd/eslint-config 2.7.2 → 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/index.js CHANGED
@@ -104,17 +104,19 @@ var GLOB_EXCLUDE = [
104
104
  function disables() {
105
105
  return [
106
106
  {
107
- files: [`scripts/${GLOB_SRC}`],
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
112
  "ts/explicit-function-return-type": "off"
112
113
  }
113
114
  },
114
115
  {
115
- files: [`cli/${GLOB_SRC}`, `cli.${GLOB_SRC_EXT}`],
116
+ files: [`**/cli/${GLOB_SRC}`, `**/cli.${GLOB_SRC_EXT}`],
116
117
  name: "coderwyd/disables/cli",
117
118
  rules: {
119
+ "antfu/no-top-level-await": "off",
118
120
  "no-console": "off"
119
121
  }
120
122
  },
@@ -140,6 +142,7 @@ function disables() {
140
142
  files: ["**/*.{test,spec}.([tj])s?(x)"],
141
143
  name: "coderwyd/disables/test",
142
144
  rules: {
145
+ "antfu/no-top-level-await": "off",
143
146
  "no-unused-expressions": "off"
144
147
  }
145
148
  },
@@ -495,6 +498,7 @@ function javascript(options = {}) {
495
498
  "error",
496
499
  { enforceForClassMembers: true, setWithoutGet: true }
497
500
  ],
501
+ "antfu/no-top-level-await": "error",
498
502
  "array-callback-return": "error",
499
503
  "block-scoped-var": "error",
500
504
  "constructor-super": "error",
@@ -985,6 +989,13 @@ async function react(options = {}) {
985
989
  allowConstantExport: isAllowConstantExport,
986
990
  allowExportNames: [
987
991
  ...isUsingNext ? [
992
+ "dynamic",
993
+ "dynamicParams",
994
+ "revalidate",
995
+ "fetchCache",
996
+ "runtime",
997
+ "preferredRegion",
998
+ "maxDuration",
988
999
  "config",
989
1000
  "generateStaticParams",
990
1001
  "metadata",
@@ -1584,8 +1595,13 @@ async function typescript(options = {}) {
1584
1595
  "ts/no-import-type-side-effects": "error",
1585
1596
  "ts/no-invalid-void-type": "off",
1586
1597
  "ts/no-non-null-assertion": "off",
1587
- "ts/no-redeclare": "error",
1598
+ "ts/no-redeclare": ["error", { builtinGlobals: false }],
1588
1599
  "ts/no-require-imports": "error",
1600
+ "ts/no-unused-expressions": ["error", {
1601
+ allowShortCircuit: true,
1602
+ allowTaggedTemplates: true,
1603
+ allowTernary: true
1604
+ }],
1589
1605
  "ts/no-unused-vars": "off",
1590
1606
  "ts/no-use-before-define": [
1591
1607
  "error",
@@ -1793,7 +1809,9 @@ async function vue(options = {}) {
1793
1809
  rules: {
1794
1810
  ...pluginVue.configs.base.rules,
1795
1811
  ...vueRules,
1812
+ "antfu/no-top-level-await": "off",
1796
1813
  "node/prefer-global/process": "off",
1814
+ "ts/explicit-function-return-type": "off",
1797
1815
  "vue/block-order": [
1798
1816
  "error",
1799
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.2",
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",
@@ -72,24 +72,24 @@
72
72
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
73
73
  "@stylistic/eslint-plugin": "^2.8.0",
74
74
  "@toml-tools/parser": "^1.0.0",
75
- "@typescript-eslint/eslint-plugin": "^8.5.0",
76
- "@typescript-eslint/parser": "^8.5.0",
77
- "@vitest/eslint-plugin": "^1.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.6.0",
81
- "eslint-plugin-command": "^0.2.4",
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.2.1",
85
- "eslint-plugin-jsdoc": "^50.2.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.2",
87
+ "eslint-plugin-n": "^17.10.3",
88
88
  "eslint-plugin-no-only-tests": "^3.3.0",
89
- "eslint-plugin-perfectionist": "^3.5.0",
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.3",
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
95
  "eslint-typegen": "^0.3.2",
@@ -105,21 +105,21 @@
105
105
  },
106
106
  "devDependencies": {
107
107
  "@antfu/ni": "^0.23.0",
108
- "@eslint-react/eslint-plugin": "^1.14.1",
108
+ "@eslint-react/eslint-plugin": "^1.14.2",
109
109
  "@eslint/config-inspector": "^0.5.4",
110
110
  "@stylistic/eslint-plugin-migrate": "^2.8.0",
111
111
  "@types/fs-extra": "^11.0.4",
112
- "@types/node": "^22.5.4",
112
+ "@types/node": "^22.6.1",
113
113
  "@types/prompts": "^2.4.9",
114
114
  "@types/yargs": "^17.0.33",
115
- "@unocss/eslint-plugin": "^0.62.3",
115
+ "@unocss/eslint-plugin": "^0.62.4",
116
116
  "bumpp": "^9.5.2",
117
- "eslint": "^9.10.0",
117
+ "eslint": "^9.11.1",
118
118
  "eslint-plugin-react-hooks": "^4.6.2",
119
- "eslint-plugin-react-refresh": "^0.4.11",
119
+ "eslint-plugin-react-refresh": "^0.4.12",
120
120
  "eslint-plugin-svelte": "2.43.0",
121
121
  "eslint-plugin-tailwindcss": "^3.17.4",
122
- "execa": "^9.3.1",
122
+ "execa": "^9.4.0",
123
123
  "fast-glob": "^3.3.2",
124
124
  "fs-extra": "^11.2.0",
125
125
  "jiti": "^1.21.6",
@@ -127,8 +127,8 @@
127
127
  "rimraf": "^6.0.1",
128
128
  "simple-git-hooks": "^2.11.1",
129
129
  "svelte": "^4.2.19",
130
- "svelte-eslint-parser": "^0.41.0",
131
- "tsup": "^8.2.4",
130
+ "svelte-eslint-parser": "^0.41.1",
131
+ "tsup": "^8.3.0",
132
132
  "tsx": "^4.19.1",
133
133
  "typescript": "^5.6.2"
134
134
  },