@lincy/eslint-config 5.4.0 → 5.4.2

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
@@ -153,7 +153,7 @@ async function disables() {
153
153
  },
154
154
  {
155
155
  files: [`**/*.config.${GLOB_SRC_EXT}`, `**/*.config.*.${GLOB_SRC_EXT}`],
156
- name: "antfu/disables/config-files",
156
+ name: "eslint/disables/config-files",
157
157
  rules: {
158
158
  "antfu/no-top-level-await": "off",
159
159
  "no-console": "off",
@@ -281,7 +281,6 @@ async function stylistic(options = {}) {
281
281
  } = typeof stylistic2 === "boolean" ? StylisticConfigDefaults : { ...StylisticConfigDefaults, ...stylistic2 };
282
282
  const pluginStylistic = await interopDefault(import("@stylistic/eslint-plugin"));
283
283
  const config = pluginStylistic.configs.customize({
284
- flat: true,
285
284
  indent,
286
285
  jsx: jsx2,
287
286
  pluginName: "style",
@@ -578,6 +577,7 @@ async function imports(options = {}) {
578
577
  "antfu/import-dedupe": "error",
579
578
  "antfu/no-import-dist": "error",
580
579
  "antfu/no-import-node-modules-by-path": "error",
580
+ "import/consistent-type-specifier-style": ["error", "prefer-top-level"],
581
581
  "import/first": "error",
582
582
  "import/no-duplicates": "error",
583
583
  "import/no-mutable-exports": "error",
@@ -732,7 +732,7 @@ async function javascript(options = {}) {
732
732
  allowTaggedTemplates: true,
733
733
  allowTernary: true
734
734
  }],
735
- "no-unused-vars": ["error", {
735
+ "no-unused-vars": ["warn", {
736
736
  args: "none",
737
737
  caughtErrors: "none",
738
738
  ignoreRestSiblings: true,
@@ -765,7 +765,7 @@ async function javascript(options = {}) {
765
765
  }
766
766
  ],
767
767
  "prefer-const": [
768
- "error",
768
+ isInEditor ? "warn" : "error",
769
769
  {
770
770
  destructuring: "all",
771
771
  ignoreReadBeforeAssign: true
@@ -779,7 +779,7 @@ async function javascript(options = {}) {
779
779
  "prefer-template": "error",
780
780
  "symbol-description": "error",
781
781
  "unicode-bom": ["error", "never"],
782
- "unused-imports/no-unused-imports": isInEditor ? "off" : "error",
782
+ "unused-imports/no-unused-imports": isInEditor ? "warn" : "error",
783
783
  "unused-imports/no-unused-vars": [
784
784
  "error",
785
785
  {
@@ -1562,7 +1562,7 @@ async function test(options = {}) {
1562
1562
  "test/consistent-test-it": ["error", { fn: "it", withinDescribe: "it" }],
1563
1563
  "test/no-identical-title": "error",
1564
1564
  "test/no-import-node-test": "error",
1565
- "test/no-only-tests": isInEditor ? "off" : "error",
1565
+ "test/no-only-tests": isInEditor ? "warn" : "error",
1566
1566
  "test/prefer-hooks-in-order": "error",
1567
1567
  "test/prefer-lowercase-title": "error",
1568
1568
  // Disables
@@ -1745,6 +1745,7 @@ async function typescript(options = {}) {
1745
1745
  "ts/consistent-type-definitions": ["error", "interface"],
1746
1746
  "ts/consistent-type-imports": ["error", {
1747
1747
  disallowTypeAnnotations: false,
1748
+ fixStyle: "separate-type-imports",
1748
1749
  prefer: "type-imports"
1749
1750
  }],
1750
1751
  "ts/method-signature-style": ["error", "property"],
@@ -1767,7 +1768,7 @@ async function typescript(options = {}) {
1767
1768
  allowTernary: true
1768
1769
  }],
1769
1770
  "ts/no-unused-vars": [
1770
- "error",
1771
+ "warn",
1771
1772
  {
1772
1773
  args: "all",
1773
1774
  argsIgnorePattern: "^_",
@@ -2020,7 +2021,7 @@ async function vue(options = {}) {
2020
2021
  "vue/no-restricted-v-bind": ["error", "/^v-/"],
2021
2022
  "vue/no-setup-props-reactivity-loss": "off",
2022
2023
  "vue/no-sparse-arrays": "error",
2023
- "vue/no-unused-refs": "error",
2024
+ "vue/no-unused-refs": "warn",
2024
2025
  "vue/no-useless-v-bind": "error",
2025
2026
  "vue/no-v-html": "off",
2026
2027
  "vue/no-v-text-v-html-on-component": "off",
@@ -2352,6 +2353,15 @@ function lincy(options = {}, ...userConfigs) {
2352
2353
  if (autoRenamePlugins) {
2353
2354
  composer = composer.renamePlugins(defaultPluginRenaming);
2354
2355
  }
2356
+ if (isInEditor) {
2357
+ composer = composer.disableRulesFix([
2358
+ "unused-imports/no-unused-imports",
2359
+ "test/no-only-tests",
2360
+ "prefer-const"
2361
+ ], {
2362
+ builtinRules: () => import(["eslint", "use-at-your-own-risk"].join("/")).then((r) => r.builtinRules)
2363
+ });
2364
+ }
2355
2365
  return composer;
2356
2366
  }
2357
2367
  function resolveSubOptions(options, key) {
@@ -2366,7 +2376,7 @@ function getOverrides(options, key) {
2366
2376
  }
2367
2377
 
2368
2378
  // src/index.ts
2369
- var src_default = lincy;
2379
+ var index_default = lincy;
2370
2380
  export {
2371
2381
  GLOB_ALL_SRC,
2372
2382
  GLOB_CSS,
@@ -2399,7 +2409,7 @@ export {
2399
2409
  StylisticConfigDefaults,
2400
2410
  combine,
2401
2411
  comments,
2402
- src_default as default,
2412
+ index_default as default,
2403
2413
  defaultPluginRenaming,
2404
2414
  disables,
2405
2415
  ensurePackages,
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@lincy/eslint-config",
3
3
  "type": "module",
4
- "version": "5.4.0",
5
- "packageManager": "pnpm@9.15.3",
4
+ "version": "5.4.2",
5
+ "packageManager": "pnpm@10.3.0",
6
6
  "description": "LinCenYing's ESLint config",
7
7
  "author": "LinCenYing <lincenying@gmail.com> (https://github.com/lincenying/)",
8
8
  "license": "MIT",
@@ -68,32 +68,32 @@
68
68
  "dependencies": {
69
69
  "@antfu/eslint-define-config": "1.23.0-2",
70
70
  "@antfu/install-pkg": "^1.0.0",
71
- "@clack/prompts": "^0.9.1",
71
+ "@clack/prompts": "^0.10.0",
72
72
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
73
- "@eslint/markdown": "^6.2.1",
74
- "@stylistic/eslint-plugin": "^2.13.0",
75
- "@typescript-eslint/eslint-plugin": "^8.19.1",
76
- "@typescript-eslint/parser": "^8.19.1",
77
- "@vitest/eslint-plugin": "^1.1.25",
78
- "eslint-config-flat-gitignore": "^1.0.0",
79
- "eslint-flat-config-utils": "^1.0.0",
80
- "eslint-merge-processors": "^1.0.0",
73
+ "@eslint/markdown": "^6.2.2",
74
+ "@stylistic/eslint-plugin": "4.0.0-beta.1",
75
+ "@typescript-eslint/eslint-plugin": "^8.24.0",
76
+ "@typescript-eslint/parser": "^8.24.0",
77
+ "@vitest/eslint-plugin": "^1.1.31",
78
+ "eslint-config-flat-gitignore": "^2.0.0",
79
+ "eslint-flat-config-utils": "^2.0.1",
80
+ "eslint-merge-processors": "^2.0.0",
81
81
  "eslint-parser-plain": "^0.1.1",
82
- "eslint-plugin-antfu": "^2.7.0",
82
+ "eslint-plugin-antfu": "^3.0.0",
83
83
  "eslint-plugin-import-x": "^4.6.1",
84
- "eslint-plugin-jsdoc": "^50.6.1",
85
- "eslint-plugin-jsonc": "^2.18.2",
84
+ "eslint-plugin-jsdoc": "^50.6.3",
85
+ "eslint-plugin-jsonc": "^2.19.1",
86
86
  "eslint-plugin-n": "^17.15.1",
87
87
  "eslint-plugin-no-only-tests": "^3.3.0",
88
- "eslint-plugin-perfectionist": "^4.6.0",
88
+ "eslint-plugin-perfectionist": "^4.8.0",
89
89
  "eslint-plugin-regexp": "^2.7.0",
90
90
  "eslint-plugin-toml": "^0.12.0",
91
91
  "eslint-plugin-unicorn": "^56.0.1",
92
92
  "eslint-plugin-unused-imports": "^4.1.4",
93
93
  "eslint-plugin-vue": "^9.32.0",
94
94
  "eslint-plugin-yml": "^1.16.0",
95
- "eslint-processor-vue-blocks": "^1.0.0",
96
- "globals": "^15.14.0",
95
+ "eslint-processor-vue-blocks": "^2.0.0",
96
+ "globals": "^15.15.0",
97
97
  "jsonc-eslint-parser": "^2.4.0",
98
98
  "local-pkg": "^1.0.0",
99
99
  "prompts": "^2.4.2",
@@ -102,40 +102,40 @@
102
102
  "yaml-eslint-parser": "^1.2.3"
103
103
  },
104
104
  "devDependencies": {
105
- "@antfu/ni": "^23.2.0",
106
- "@eslint-react/eslint-plugin": "^1.23.2",
105
+ "@antfu/ni": "^23.3.1",
106
+ "@eslint-react/eslint-plugin": "^1.26.2",
107
107
  "@eslint-types/jsdoc": "48.2.2",
108
108
  "@eslint-types/typescript-eslint": "^7.5.0",
109
109
  "@eslint-types/unicorn": "^52.0.0",
110
- "@eslint/config-inspector": "^0.7.1",
110
+ "@eslint/config-inspector": "^1.0.0",
111
111
  "@lincy/eslint-config": "workspace:*",
112
112
  "@prettier/plugin-xml": "^3.4.1",
113
- "@stylistic/eslint-plugin-migrate": "^2.13.0",
113
+ "@stylistic/eslint-plugin-migrate": "^4.0.0-beta.1",
114
114
  "@types/fs-extra": "^11.0.4",
115
- "@types/node": "^22.10.5",
115
+ "@types/node": "^22.13.1",
116
116
  "@types/prompts": "^2.4.9",
117
- "@types/react": "^19.0.6",
118
- "@unocss/eslint-plugin": "^65.4.0",
119
- "bumpp": "^9.10.0",
120
- "eslint": "^9.18.0",
117
+ "@types/react": "^19.0.8",
118
+ "@unocss/eslint-plugin": "^65.4.3",
119
+ "bumpp": "^10.0.3",
120
+ "eslint": "^9.20.1",
121
121
  "eslint-plugin-format": "^1.0.1",
122
122
  "eslint-plugin-react-hooks": "^5.1.0",
123
- "eslint-plugin-react-refresh": "^0.4.18",
123
+ "eslint-plugin-react-refresh": "^0.4.19",
124
124
  "eslint-ts-patch": "9.8.0-1",
125
125
  "eslint-typegen": "^1.0.0",
126
126
  "esno": "^4.8.0",
127
- "fs-extra": "^11.2.0",
128
- "lint-staged": "^15.3.0",
129
- "prettier": "^3.4.2",
127
+ "fs-extra": "^11.3.0",
128
+ "lint-staged": "^15.4.3",
129
+ "prettier": "^3.5.0",
130
130
  "react": "^19.0.0",
131
131
  "rimraf": "^6.0.1",
132
132
  "simple-git-hooks": "^2.11.1",
133
133
  "simple-open-url": "^3.0.1",
134
134
  "sucrase": "^3.35.0",
135
- "tsup": "^8.3.5",
135
+ "tsup": "^8.3.6",
136
136
  "typescript": "^5.7.3",
137
- "unbuild": "^3.3.0",
138
- "vitest": "^2.1.8",
137
+ "unbuild": "^3.3.1",
138
+ "vitest": "^3.0.5",
139
139
  "vue": "^3.5.13"
140
140
  },
141
141
  "pnpm": {
@@ -147,8 +147,8 @@
147
147
  },
148
148
  "resolutions": {
149
149
  "@eslint-community/eslint-utils": "^4.4.1",
150
- "@typescript-eslint/utils": "^8.19.1",
151
- "eslint": "^9.18.0",
150
+ "@typescript-eslint/utils": "^8.24.0",
151
+ "eslint": "^9.20.1",
152
152
  "tsx": "^4.19.2"
153
153
  },
154
154
  "simple-git-hooks": {