@lincy/eslint-config 5.4.0 → 5.4.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/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",
@@ -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
@@ -1767,7 +1767,7 @@ async function typescript(options = {}) {
1767
1767
  allowTernary: true
1768
1768
  }],
1769
1769
  "ts/no-unused-vars": [
1770
- "error",
1770
+ "warn",
1771
1771
  {
1772
1772
  args: "all",
1773
1773
  argsIgnorePattern: "^_",
@@ -2020,7 +2020,7 @@ async function vue(options = {}) {
2020
2020
  "vue/no-restricted-v-bind": ["error", "/^v-/"],
2021
2021
  "vue/no-setup-props-reactivity-loss": "off",
2022
2022
  "vue/no-sparse-arrays": "error",
2023
- "vue/no-unused-refs": "error",
2023
+ "vue/no-unused-refs": "warn",
2024
2024
  "vue/no-useless-v-bind": "error",
2025
2025
  "vue/no-v-html": "off",
2026
2026
  "vue/no-v-text-v-html-on-component": "off",
@@ -2352,6 +2352,15 @@ function lincy(options = {}, ...userConfigs) {
2352
2352
  if (autoRenamePlugins) {
2353
2353
  composer = composer.renamePlugins(defaultPluginRenaming);
2354
2354
  }
2355
+ if (isInEditor) {
2356
+ composer = composer.disableRulesFix([
2357
+ "unused-imports/no-unused-imports",
2358
+ "test/no-only-tests",
2359
+ "prefer-const"
2360
+ ], {
2361
+ builtinRules: () => import(["eslint", "use-at-your-own-risk"].join("/")).then((r) => r.builtinRules)
2362
+ });
2363
+ }
2355
2364
  return composer;
2356
2365
  }
2357
2366
  function resolveSubOptions(options, key) {
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.1",
5
+ "packageManager": "pnpm@9.15.4",
6
6
  "description": "LinCenYing's ESLint config",
7
7
  "author": "LinCenYing <lincenying@gmail.com> (https://github.com/lincenying/)",
8
8
  "license": "MIT",
@@ -72,20 +72,20 @@
72
72
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
73
73
  "@eslint/markdown": "^6.2.1",
74
74
  "@stylistic/eslint-plugin": "^2.13.0",
75
- "@typescript-eslint/eslint-plugin": "^8.19.1",
76
- "@typescript-eslint/parser": "^8.19.1",
75
+ "@typescript-eslint/eslint-plugin": "^8.21.0",
76
+ "@typescript-eslint/parser": "^8.21.0",
77
77
  "@vitest/eslint-plugin": "^1.1.25",
78
78
  "eslint-config-flat-gitignore": "^1.0.0",
79
- "eslint-flat-config-utils": "^1.0.0",
79
+ "eslint-flat-config-utils": "^1.1.0",
80
80
  "eslint-merge-processors": "^1.0.0",
81
81
  "eslint-parser-plain": "^0.1.1",
82
82
  "eslint-plugin-antfu": "^2.7.0",
83
83
  "eslint-plugin-import-x": "^4.6.1",
84
- "eslint-plugin-jsdoc": "^50.6.1",
84
+ "eslint-plugin-jsdoc": "^50.6.2",
85
85
  "eslint-plugin-jsonc": "^2.18.2",
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.7.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",
@@ -103,20 +103,20 @@
103
103
  },
104
104
  "devDependencies": {
105
105
  "@antfu/ni": "^23.2.0",
106
- "@eslint-react/eslint-plugin": "^1.23.2",
106
+ "@eslint-react/eslint-plugin": "^1.24.1",
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
113
  "@stylistic/eslint-plugin-migrate": "^2.13.0",
114
114
  "@types/fs-extra": "^11.0.4",
115
- "@types/node": "^22.10.5",
115
+ "@types/node": "^22.10.8",
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",
117
+ "@types/react": "^19.0.7",
118
+ "@unocss/eslint-plugin": "^65.4.3",
119
+ "bumpp": "^9.10.2",
120
120
  "eslint": "^9.18.0",
121
121
  "eslint-plugin-format": "^1.0.1",
122
122
  "eslint-plugin-react-hooks": "^5.1.0",
@@ -124,8 +124,8 @@
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",
127
+ "fs-extra": "^11.3.0",
128
+ "lint-staged": "^15.4.1",
129
129
  "prettier": "^3.4.2",
130
130
  "react": "^19.0.0",
131
131
  "rimraf": "^6.0.1",
@@ -134,8 +134,8 @@
134
134
  "sucrase": "^3.35.0",
135
135
  "tsup": "^8.3.5",
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.3",
139
139
  "vue": "^3.5.13"
140
140
  },
141
141
  "pnpm": {
@@ -147,7 +147,7 @@
147
147
  },
148
148
  "resolutions": {
149
149
  "@eslint-community/eslint-utils": "^4.4.1",
150
- "@typescript-eslint/utils": "^8.19.1",
150
+ "@typescript-eslint/utils": "^8.21.0",
151
151
  "eslint": "^9.18.0",
152
152
  "tsx": "^4.19.2"
153
153
  },