@lincy/eslint-config 7.1.0 → 7.2.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/index.mjs CHANGED
@@ -295,6 +295,7 @@ function isInGitHooksOrLintStaged() {
295
295
  //#endregion
296
296
  //#region src/configs/stylistic.ts
297
297
  const StylisticConfigDefaults = {
298
+ braceStyle: "stroustrup",
298
299
  indent: 4,
299
300
  jsx: true,
300
301
  lessOpinionated: false,
@@ -304,12 +305,13 @@ const StylisticConfigDefaults = {
304
305
  };
305
306
  async function stylistic(options = {}) {
306
307
  const { overrides = {}, stylistic = StylisticConfigDefaults } = options;
307
- const { indent, jsx, lessOpinionated, quotes, semi } = typeof stylistic === "boolean" ? StylisticConfigDefaults : {
308
+ const { braceStyle, indent, jsx, lessOpinionated, quotes, semi } = typeof stylistic === "boolean" ? StylisticConfigDefaults : {
308
309
  ...StylisticConfigDefaults,
309
310
  ...stylistic
310
311
  };
311
312
  const pluginStylistic = await interopDefault(import("@stylistic/eslint-plugin"));
312
313
  const config = pluginStylistic.configs.customize({
314
+ braceStyle,
313
315
  indent,
314
316
  jsx,
315
317
  pluginName: "style",
@@ -1187,17 +1189,12 @@ async function react(options = {}) {
1187
1189
  const isUsingRemix = RemixPackages.some((i) => isPackageExists(i));
1188
1190
  const isUsingReactRouter = ReactRouterPackages.some((i) => isPackageExists(i));
1189
1191
  const isUsingNext = NextJsPackages.some((i) => isPackageExists(i));
1190
- const plugins = pluginReact.configs.all.plugins;
1191
1192
  return [
1192
1193
  {
1193
1194
  name: "eslint/react/setup",
1194
1195
  plugins: {
1195
- "react": plugins["@eslint-react"],
1196
- "react-dom": plugins["@eslint-react/dom"],
1197
- "react-naming-convention": plugins["@eslint-react/naming-convention"],
1198
- "react-refresh": pluginReactRefresh,
1199
- "react-rsc": plugins["@eslint-react/rsc"],
1200
- "react-web-api": plugins["@eslint-react/web-api"]
1196
+ "react": pluginReact.configs.all.plugins["@eslint-react"],
1197
+ "react-refresh": pluginReactRefresh
1201
1198
  }
1202
1199
  },
1203
1200
  {
@@ -1238,7 +1235,6 @@ async function react(options = {}) {
1238
1235
  "shouldRevalidate"
1239
1236
  ] : []]
1240
1237
  }],
1241
- "react/prefer-namespace-import": "error",
1242
1238
  ...overrides
1243
1239
  }
1244
1240
  },
@@ -1246,8 +1242,8 @@ async function react(options = {}) {
1246
1242
  files: filesTypeAware,
1247
1243
  name: "eslint/react/typescript",
1248
1244
  rules: {
1249
- "react-dom/no-string-style-prop": "off",
1250
- "react-dom/no-unknown-property": "off"
1245
+ "react/dom-no-string-style-prop": "off",
1246
+ "react/dom-no-unknown-property": "off"
1251
1247
  }
1252
1248
  },
1253
1249
  ...isTypeAware ? [{
@@ -1787,7 +1783,7 @@ vueVersion = Number.isNaN(vueVersion) ? "3" : vueVersion;
1787
1783
  async function vue(options = {}) {
1788
1784
  const { files = [GLOB_VUE], overrides = {}, stylistic = true } = options;
1789
1785
  const sfcBlocks = options.sfcBlocks === true ? {} : options.sfcBlocks ?? {};
1790
- const { indent = 4 } = typeof stylistic === "boolean" ? {} : stylistic;
1786
+ const { braceStyle = "stroustrup", indent = 4 } = typeof stylistic === "boolean" ? {} : stylistic;
1791
1787
  const [pluginVue, parserVue, processorVueBlocks] = await Promise.all([
1792
1788
  interopDefault(import("eslint-plugin-vue")),
1793
1789
  interopDefault(import("vue-eslint-parser")),
@@ -1953,7 +1949,7 @@ async function vue(options = {}) {
1953
1949
  }],
1954
1950
  "vue/brace-style": [
1955
1951
  "error",
1956
- "stroustrup",
1952
+ braceStyle,
1957
1953
  { allowSingleLine: false }
1958
1954
  ],
1959
1955
  "vue/comma-dangle": ["error", "always-multiline"],
@@ -2049,10 +2045,6 @@ const VuePackages = [
2049
2045
  ];
2050
2046
  const defaultPluginRenaming = {
2051
2047
  "@eslint-react": "react",
2052
- "@eslint-react/dom": "react-dom",
2053
- "@eslint-react/naming-convention": "react-naming-convention",
2054
- "@eslint-react/rsc": "react-rsc",
2055
- "@eslint-react/web-api": "react-web-api",
2056
2048
  "@next/next": "next",
2057
2049
  "@stylistic": "style",
2058
2050
  "@typescript-eslint": "ts",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lincy/eslint-config",
3
3
  "type": "module",
4
- "version": "7.1.0",
4
+ "version": "7.2.0",
5
5
  "description": "LinCenYing's ESLint config",
6
6
  "author": "LinCenYing <lincenying@gmail.com> (https://github.com/lincenying/)",
7
7
  "license": "MIT",
@@ -23,14 +23,13 @@
23
23
  "dist"
24
24
  ],
25
25
  "peerDependencies": {
26
- "@eslint-react/eslint-plugin": "^3.0.0",
26
+ "@eslint-react/eslint-plugin": "^5.6.0",
27
27
  "@next/eslint-plugin-next": ">=15.0.0",
28
28
  "@prettier/plugin-xml": "^3.4.1",
29
29
  "@unocss/eslint-plugin": ">=0.50.0",
30
30
  "eslint": "^9.10.0 || ^10.0.0",
31
31
  "eslint-plugin-format": ">=0.1.0",
32
- "eslint-plugin-react-hooks": "^7.0.0",
33
- "eslint-plugin-react-refresh": "^0.4.19"
32
+ "eslint-plugin-react-refresh": "^0.5.0"
34
33
  },
35
34
  "peerDependenciesMeta": {
36
35
  "@eslint-react/eslint-plugin": {
@@ -48,44 +47,41 @@
48
47
  "eslint-plugin-format": {
49
48
  "optional": true
50
49
  },
51
- "eslint-plugin-react-hooks": {
52
- "optional": true
53
- },
54
50
  "eslint-plugin-react-refresh": {
55
51
  "optional": true
56
52
  }
57
53
  },
58
54
  "dependencies": {
59
55
  "@antfu/install-pkg": "^1.1.0",
60
- "@clack/prompts": "^1.2.0",
61
- "@e18e/eslint-plugin": "^0.3.0",
56
+ "@clack/prompts": "^1.3.0",
57
+ "@e18e/eslint-plugin": "^0.4.1",
62
58
  "@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
63
59
  "@eslint/markdown": "^8.0.1",
64
60
  "@stylistic/eslint-plugin": "^5.10.0",
65
- "@typescript-eslint/eslint-plugin": "^8.59.0",
66
- "@typescript-eslint/parser": "^8.59.0",
67
- "@vitest/eslint-plugin": "^1.6.16",
61
+ "@typescript-eslint/eslint-plugin": "^8.59.3",
62
+ "@typescript-eslint/parser": "^8.59.3",
63
+ "@vitest/eslint-plugin": "^1.6.17",
68
64
  "eslint-config-flat-gitignore": "^2.3.0",
69
- "eslint-flat-config-utils": "^3.1.0",
65
+ "eslint-flat-config-utils": "^3.2.0",
70
66
  "eslint-merge-processors": "^2.0.0",
71
67
  "eslint-parser-plain": "^0.1.1",
72
- "eslint-plugin-antfu": "^3.2.2",
73
- "eslint-plugin-erasable-syntax-only": "^0.4.0",
68
+ "eslint-plugin-antfu": "^3.2.3",
69
+ "eslint-plugin-erasable-syntax-only": "^0.4.1",
74
70
  "eslint-plugin-import-lite": "^0.6.0",
75
71
  "eslint-plugin-jsdoc": "^62.9.0",
76
72
  "eslint-plugin-jsonc": "^3.1.2",
77
- "eslint-plugin-n": "^17.24.0",
78
- "eslint-plugin-no-only-tests": "^3.3.0",
73
+ "eslint-plugin-n": "^18.0.1",
74
+ "eslint-plugin-no-only-tests": "^3.4.0",
79
75
  "eslint-plugin-perfectionist": "^5.9.0",
80
76
  "eslint-plugin-pnpm": "^1.6.0",
81
77
  "eslint-plugin-regexp": "^3.1.0",
82
78
  "eslint-plugin-toml": "^1.3.1",
83
79
  "eslint-plugin-unicorn": "^64.0.0",
84
80
  "eslint-plugin-unused-imports": "^4.4.1",
85
- "eslint-plugin-vue": "^10.9.0",
86
- "eslint-plugin-yml": "^3.3.1",
81
+ "eslint-plugin-vue": "^10.9.1",
82
+ "eslint-plugin-yml": "^3.3.2",
87
83
  "eslint-processor-vue-blocks": "^2.0.0",
88
- "globals": "^17.5.0",
84
+ "globals": "^17.6.0",
89
85
  "jsonc-eslint-parser": "^3.1.0",
90
86
  "local-pkg": "^1.1.2",
91
87
  "toml-eslint-parser": "^1.0.3",
@@ -93,34 +89,33 @@
93
89
  "yaml-eslint-parser": "^2.0.0"
94
90
  },
95
91
  "devDependencies": {
96
- "@antfu/ni": "^30.0.0",
97
- "@eslint-react/eslint-plugin": "^3.0.0",
98
- "@eslint/config-inspector": "^1.5.0",
99
- "@next/eslint-plugin-next": "^16.2.4",
92
+ "@antfu/ni": "^30.1.0",
93
+ "@eslint-react/eslint-plugin": "^5.6.0",
94
+ "@eslint/config-inspector": "^2.0.1",
95
+ "@next/eslint-plugin-next": "^16.2.6",
100
96
  "@prettier/plugin-xml": "^3.4.2",
101
97
  "@stylistic/eslint-plugin-migrate": "^4.4.1",
102
- "@types/node": "^25.6.0",
98
+ "@types/node": "^25.7.0",
103
99
  "@types/react": "^19.2.14",
104
100
  "@unocss/eslint-plugin": "^66.6.8",
105
- "bumpp": "^11.0.1",
106
- "eslint": "^10.2.1",
101
+ "bumpp": "^11.1.0",
102
+ "eslint": "^10.3.0",
107
103
  "eslint-plugin-format": "^2.0.1",
108
- "eslint-plugin-react-hooks": "^7.1.1",
109
104
  "eslint-plugin-react-refresh": "^0.5.2",
110
105
  "eslint-typegen": "^2.3.1",
111
106
  "esno": "^4.8.0",
112
107
  "execa": "^9.6.1",
113
108
  "find-up-simple": "^1.0.1",
114
- "lint-staged": "^16.4.0",
109
+ "lint-staged": "^17.0.4",
115
110
  "prettier": "^3.8.3",
116
- "react": "^19.2.5",
111
+ "react": "^19.2.6",
117
112
  "simple-open-url": "^3.0.1",
118
113
  "tinyglobby": "^0.2.16",
119
- "tsdown": "^0.21.9",
114
+ "tsdown": "^0.22.0",
120
115
  "typescript": "^6.0.3",
121
- "vitest": "^4.1.5",
122
- "vue": "^3.5.32",
123
- "@lincy/eslint-config": "7.1.0"
116
+ "vitest": "^4.1.6",
117
+ "vue": "^3.5.34",
118
+ "@lincy/eslint-config": "7.2.0"
124
119
  },
125
120
  "resolutions": {
126
121
  "@eslint-community/eslint-utils": "catalog:peer",