@lincy/eslint-config 5.6.0 → 5.7.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.js CHANGED
@@ -2,7 +2,7 @@ import { FlatConfigComposer } from "eslint-flat-config-utils";
2
2
  import { getPackageInfoSync, isPackageExists } from "local-pkg";
3
3
  import pluginComments from "@eslint-community/eslint-plugin-eslint-comments";
4
4
  import pluginAntfu from "eslint-plugin-antfu";
5
- import * as pluginImport from "eslint-plugin-import-x";
5
+ import pluginImportLite from "eslint-plugin-import-lite";
6
6
  import pluginNode from "eslint-plugin-n";
7
7
  import pluginPerfectionist from "eslint-plugin-perfectionist";
8
8
  import pluginUnicorn from "eslint-plugin-unicorn";
@@ -436,7 +436,7 @@ async function imports(options = {}) {
436
436
  name: "eslint/imports/rules",
437
437
  plugins: {
438
438
  antfu: pluginAntfu,
439
- import: pluginImport
439
+ import: pluginImportLite
440
440
  },
441
441
  rules: {
442
442
  "antfu/import-dedupe": "error",
@@ -447,12 +447,7 @@ async function imports(options = {}) {
447
447
  "import/no-duplicates": "error",
448
448
  "import/no-mutable-exports": "error",
449
449
  "import/no-named-default": "error",
450
- "import/no-self-import": "error",
451
- "import/no-webpack-loader-syntax": "error",
452
- ...stylistic$1 ? { "import/newline-after-import": ["error", {
453
- considerComments: true,
454
- count: 1
455
- }] } : {},
450
+ ...stylistic$1 ? { "import/newline-after-import": ["error", { count: 1 }] } : {},
456
451
  ...overrides
457
452
  }
458
453
  }];
@@ -772,7 +767,7 @@ async function jsonc(options = {}) {
772
767
  multiline: true
773
768
  }],
774
769
  "jsonc/object-curly-spacing": ["error", "always"],
775
- "jsonc/object-property-newline": ["error", { allowMultiplePropertiesPerLine: true }],
770
+ "jsonc/object-property-newline": ["error", { allowAllPropertiesOnSameLine: true }],
776
771
  "jsonc/quote-props": "error",
777
772
  "jsonc/quotes": "error"
778
773
  } : {},
@@ -1068,7 +1063,11 @@ async function react(options = {}) {
1068
1063
  "links",
1069
1064
  "headers",
1070
1065
  "loader",
1071
- "action"
1066
+ "action",
1067
+ "clientLoader",
1068
+ "clientAction",
1069
+ "handle",
1070
+ "shouldRevalidate"
1072
1071
  ] : []]
1073
1072
  }],
1074
1073
  "react-web-api/no-leaked-event-listener": "warn",
@@ -1833,7 +1832,7 @@ async function vue(options = {}) {
1833
1832
  }],
1834
1833
  "vue/object-curly-newline": "off",
1835
1834
  "vue/object-curly-spacing": ["error", "always"],
1836
- "vue/object-property-newline": ["error", { allowMultiplePropertiesPerLine: true }],
1835
+ "vue/object-property-newline": ["error", { allowAllPropertiesOnSameLine: true }],
1837
1836
  "vue/operator-linebreak": ["error", "before"],
1838
1837
  "vue/padding-line-between-blocks": ["error", "always"],
1839
1838
  "vue/quote-props": ["error", "consistent-as-needed"],
@@ -1948,7 +1947,7 @@ const defaultPluginRenaming = {
1948
1947
  "@eslint-react/naming-convention": "react-naming-convention",
1949
1948
  "@stylistic": "style",
1950
1949
  "@typescript-eslint": "ts",
1951
- "import-x": "import",
1950
+ "import-lite": "import",
1952
1951
  "n": "node",
1953
1952
  "vitest": "test",
1954
1953
  "yml": "yaml"
@@ -1964,7 +1963,7 @@ const defaultPluginRenaming = {
1964
1963
  * 合并的 ESLint 配置
1965
1964
  */
1966
1965
  function lincy(options = {}, ...userConfigs) {
1967
- const { autoRenamePlugins = true, componentExts = [], gitignore: enableGitignore = true, ignores: ignoresList = [], jsx: enableJsx = true, overrides = {}, pnpm: enableCatalogs = false, react: enableReact = false, regexp: enableRegexp = true, typescript: enableTypeScript = isPackageExists("typescript"), unicorn: enableUnicorn = true, unocss: enableUnoCSS = false, vue: enableVue = VuePackages.some((i) => isPackageExists(i)) } = options;
1966
+ const { autoRenamePlugins = true, componentExts = [], gitignore: enableGitignore = true, ignores: ignoresList = [], imports: enableImports = true, jsx: enableJsx = true, overrides = {}, pnpm: enableCatalogs = false, react: enableReact = false, regexp: enableRegexp = true, typescript: enableTypeScript = isPackageExists("typescript"), unicorn: enableUnicorn = true, unocss: enableUnoCSS = false, vue: enableVue = VuePackages.some((i) => isPackageExists(i)) } = options;
1968
1967
  let isInEditor = options.isInEditor;
1969
1968
  if (isInEditor == null) {
1970
1969
  isInEditor = isInEditorEnv();
@@ -1997,6 +1996,10 @@ function lincy(options = {}, ...userConfigs) {
1997
1996
  ...enableUnicorn === true ? {} : enableUnicorn,
1998
1997
  overrides: overrides.unicorn
1999
1998
  }));
1999
+ if (enableImports) configs$1.push(imports({
2000
+ overrides: overrides.imports,
2001
+ stylistic: stylisticOptions
2002
+ }));
2000
2003
  if (enableVue) componentExts.push("vue");
2001
2004
  if (enableJsx) configs$1.push(jsx());
2002
2005
  if (enableTypeScript) configs$1.push(typescript({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lincy/eslint-config",
3
3
  "type": "module",
4
- "version": "5.6.0",
4
+ "version": "5.7.0",
5
5
  "description": "LinCenYing's ESLint config",
6
6
  "author": "LinCenYing <lincenying@gmail.com> (https://github.com/lincenying/)",
7
7
  "license": "MIT",
@@ -52,33 +52,33 @@
52
52
  },
53
53
  "dependencies": {
54
54
  "@antfu/install-pkg": "^1.1.0",
55
- "@clack/prompts": "^0.10.1",
55
+ "@clack/prompts": "^0.11.0",
56
56
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
57
- "@eslint/markdown": "^6.4.0",
58
- "@stylistic/eslint-plugin": "^4.2.0",
59
- "@typescript-eslint/eslint-plugin": "^8.32.1",
60
- "@typescript-eslint/parser": "^8.32.1",
61
- "@vitest/eslint-plugin": "^1.2.0",
57
+ "@eslint/markdown": "^6.6.0",
58
+ "@stylistic/eslint-plugin": "^5.0.0",
59
+ "@typescript-eslint/eslint-plugin": "^8.34.1",
60
+ "@typescript-eslint/parser": "^8.34.1",
61
+ "@vitest/eslint-plugin": "^1.2.7",
62
62
  "eslint-config-flat-gitignore": "^2.1.0",
63
63
  "eslint-flat-config-utils": "^2.1.0",
64
64
  "eslint-merge-processors": "^2.0.0",
65
65
  "eslint-parser-plain": "^0.1.1",
66
66
  "eslint-plugin-antfu": "^3.1.1",
67
- "eslint-plugin-import-x": "^4.12.2",
68
- "eslint-plugin-jsdoc": "^50.6.17",
67
+ "eslint-plugin-import-lite": "^0.3.0",
68
+ "eslint-plugin-jsdoc": "^51.2.1",
69
69
  "eslint-plugin-jsonc": "^2.20.1",
70
- "eslint-plugin-n": "^17.18.0",
70
+ "eslint-plugin-n": "^17.20.0",
71
71
  "eslint-plugin-no-only-tests": "^3.3.0",
72
- "eslint-plugin-perfectionist": "^4.13.0",
72
+ "eslint-plugin-perfectionist": "^4.15.0",
73
73
  "eslint-plugin-pnpm": "^0.3.1",
74
- "eslint-plugin-regexp": "^2.7.0",
74
+ "eslint-plugin-regexp": "^2.9.0",
75
75
  "eslint-plugin-toml": "^0.12.0",
76
76
  "eslint-plugin-unicorn": "^59.0.1",
77
77
  "eslint-plugin-unused-imports": "^4.1.4",
78
- "eslint-plugin-vue": "^10.1.0",
78
+ "eslint-plugin-vue": "^10.2.0",
79
79
  "eslint-plugin-yml": "^1.18.0",
80
80
  "eslint-processor-vue-blocks": "^2.0.0",
81
- "globals": "^16.1.0",
81
+ "globals": "^16.2.0",
82
82
  "jsonc-eslint-parser": "^2.4.0",
83
83
  "local-pkg": "^1.1.1",
84
84
  "prompts": "^2.4.2",
@@ -87,36 +87,36 @@
87
87
  "yaml-eslint-parser": "^1.3.0"
88
88
  },
89
89
  "devDependencies": {
90
- "@antfu/ni": "^24.4.0",
91
- "@eslint-react/eslint-plugin": "^1.49.0",
90
+ "@antfu/ni": "^25.0.0",
91
+ "@eslint-react/eslint-plugin": "^1.52.2",
92
92
  "@eslint-types/typescript-eslint": "^7.5.0",
93
93
  "@eslint-types/unicorn": "^52.0.0",
94
- "@eslint/config-inspector": "^1.0.2",
94
+ "@eslint/config-inspector": "^1.1.0",
95
95
  "@prettier/plugin-xml": "^3.4.1",
96
- "@stylistic/eslint-plugin-migrate": "^4.2.0",
97
- "@types/node": "^22.15.21",
98
- "@types/react": "^19.1.4",
99
- "@unocss/eslint-plugin": "^66.1.2",
100
- "bumpp": "^10.1.1",
101
- "eslint": "^9.27.0",
96
+ "@stylistic/eslint-plugin-migrate": "^4.4.1",
97
+ "@types/node": "^24.0.3",
98
+ "@types/react": "^19.1.8",
99
+ "@unocss/eslint-plugin": "^66.2.3",
100
+ "bumpp": "^10.2.0",
101
+ "eslint": "^9.29.0",
102
102
  "eslint-plugin-format": "^1.0.1",
103
103
  "eslint-plugin-react-hooks": "^5.2.0",
104
104
  "eslint-plugin-react-refresh": "^0.4.20",
105
105
  "eslint-typegen": "^2.2.0",
106
106
  "esno": "^4.8.0",
107
- "execa": "^9.5.3",
108
- "lint-staged": "^16.0.0",
107
+ "execa": "^9.6.0",
108
+ "lint-staged": "^16.1.2",
109
109
  "prettier": "^3.5.3",
110
110
  "react": "^19.1.0",
111
111
  "simple-git-hooks": "^2.13.0",
112
112
  "simple-open-url": "^3.0.1",
113
113
  "sucrase": "^3.35.0",
114
- "tinyglobby": "^0.2.13",
115
- "tsdown": "^0.11.13",
114
+ "tinyglobby": "^0.2.14",
115
+ "tsdown": "^0.12.8",
116
116
  "typescript": "^5.8.3",
117
- "vitest": "^3.1.4",
118
- "vue": "^3.5.14",
119
- "@lincy/eslint-config": "5.6.0"
117
+ "vitest": "^3.2.4",
118
+ "vue": "^3.5.17",
119
+ "@lincy/eslint-config": "5.7.0"
120
120
  },
121
121
  "simple-git-hooks": {
122
122
  "pre-commit": "npx lint-staged"