@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/README.md +1 -1
- package/dist/index.cjs +16 -13
- package/dist/index.d.cts +406 -696
- package/dist/index.d.ts +406 -696
- package/dist/index.js +16 -13
- package/package.json +30 -30
package/README.md
CHANGED
|
@@ -465,7 +465,7 @@ export default combine(
|
|
|
465
465
|
|
|
466
466
|
| New Prefix | Original Prefix | Source Plugin |
|
|
467
467
|
| ---------- | ---------------------- | ------------------------------------------------------------------------------------------ |
|
|
468
|
-
| `import/*` | `import-
|
|
468
|
+
| `import/*` | `import-lite/*` | [eslint-plugin-import-lite](https://github.com/9romise/eslint-plugin-import-lite) |
|
|
469
469
|
| `node/*` | `n/*` | [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n) |
|
|
470
470
|
| `yaml/*` | `yml/*` | [eslint-plugin-yml](https://github.com/ota-meshi/eslint-plugin-yml) |
|
|
471
471
|
| `ts/*` | `@typescript-eslint/*` | [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint) |
|
package/dist/index.cjs
CHANGED
|
@@ -26,7 +26,7 @@ const eslint_flat_config_utils = __toESM(require("eslint-flat-config-utils"));
|
|
|
26
26
|
const local_pkg = __toESM(require("local-pkg"));
|
|
27
27
|
const __eslint_community_eslint_plugin_eslint_comments = __toESM(require("@eslint-community/eslint-plugin-eslint-comments"));
|
|
28
28
|
const eslint_plugin_antfu = __toESM(require("eslint-plugin-antfu"));
|
|
29
|
-
const
|
|
29
|
+
const eslint_plugin_import_lite = __toESM(require("eslint-plugin-import-lite"));
|
|
30
30
|
const eslint_plugin_n = __toESM(require("eslint-plugin-n"));
|
|
31
31
|
const eslint_plugin_perfectionist = __toESM(require("eslint-plugin-perfectionist"));
|
|
32
32
|
const eslint_plugin_unicorn = __toESM(require("eslint-plugin-unicorn"));
|
|
@@ -460,7 +460,7 @@ async function imports(options = {}) {
|
|
|
460
460
|
name: "eslint/imports/rules",
|
|
461
461
|
plugins: {
|
|
462
462
|
antfu: eslint_plugin_antfu.default,
|
|
463
|
-
import:
|
|
463
|
+
import: eslint_plugin_import_lite.default
|
|
464
464
|
},
|
|
465
465
|
rules: {
|
|
466
466
|
"antfu/import-dedupe": "error",
|
|
@@ -471,12 +471,7 @@ async function imports(options = {}) {
|
|
|
471
471
|
"import/no-duplicates": "error",
|
|
472
472
|
"import/no-mutable-exports": "error",
|
|
473
473
|
"import/no-named-default": "error",
|
|
474
|
-
"import/
|
|
475
|
-
"import/no-webpack-loader-syntax": "error",
|
|
476
|
-
...stylistic$1 ? { "import/newline-after-import": ["error", {
|
|
477
|
-
considerComments: true,
|
|
478
|
-
count: 1
|
|
479
|
-
}] } : {},
|
|
474
|
+
...stylistic$1 ? { "import/newline-after-import": ["error", { count: 1 }] } : {},
|
|
480
475
|
...overrides
|
|
481
476
|
}
|
|
482
477
|
}];
|
|
@@ -796,7 +791,7 @@ async function jsonc(options = {}) {
|
|
|
796
791
|
multiline: true
|
|
797
792
|
}],
|
|
798
793
|
"jsonc/object-curly-spacing": ["error", "always"],
|
|
799
|
-
"jsonc/object-property-newline": ["error", {
|
|
794
|
+
"jsonc/object-property-newline": ["error", { allowAllPropertiesOnSameLine: true }],
|
|
800
795
|
"jsonc/quote-props": "error",
|
|
801
796
|
"jsonc/quotes": "error"
|
|
802
797
|
} : {},
|
|
@@ -1092,7 +1087,11 @@ async function react(options = {}) {
|
|
|
1092
1087
|
"links",
|
|
1093
1088
|
"headers",
|
|
1094
1089
|
"loader",
|
|
1095
|
-
"action"
|
|
1090
|
+
"action",
|
|
1091
|
+
"clientLoader",
|
|
1092
|
+
"clientAction",
|
|
1093
|
+
"handle",
|
|
1094
|
+
"shouldRevalidate"
|
|
1096
1095
|
] : []]
|
|
1097
1096
|
}],
|
|
1098
1097
|
"react-web-api/no-leaked-event-listener": "warn",
|
|
@@ -1857,7 +1856,7 @@ async function vue(options = {}) {
|
|
|
1857
1856
|
}],
|
|
1858
1857
|
"vue/object-curly-newline": "off",
|
|
1859
1858
|
"vue/object-curly-spacing": ["error", "always"],
|
|
1860
|
-
"vue/object-property-newline": ["error", {
|
|
1859
|
+
"vue/object-property-newline": ["error", { allowAllPropertiesOnSameLine: true }],
|
|
1861
1860
|
"vue/operator-linebreak": ["error", "before"],
|
|
1862
1861
|
"vue/padding-line-between-blocks": ["error", "always"],
|
|
1863
1862
|
"vue/quote-props": ["error", "consistent-as-needed"],
|
|
@@ -1972,7 +1971,7 @@ const defaultPluginRenaming = {
|
|
|
1972
1971
|
"@eslint-react/naming-convention": "react-naming-convention",
|
|
1973
1972
|
"@stylistic": "style",
|
|
1974
1973
|
"@typescript-eslint": "ts",
|
|
1975
|
-
"import-
|
|
1974
|
+
"import-lite": "import",
|
|
1976
1975
|
"n": "node",
|
|
1977
1976
|
"vitest": "test",
|
|
1978
1977
|
"yml": "yaml"
|
|
@@ -1988,7 +1987,7 @@ const defaultPluginRenaming = {
|
|
|
1988
1987
|
* 合并的 ESLint 配置
|
|
1989
1988
|
*/
|
|
1990
1989
|
function lincy(options = {}, ...userConfigs) {
|
|
1991
|
-
const { autoRenamePlugins = true, componentExts = [], gitignore: enableGitignore = true, ignores: ignoresList = [], jsx: enableJsx = true, overrides = {}, pnpm: enableCatalogs = false, react: enableReact = false, regexp: enableRegexp = true, typescript: enableTypeScript = (0, local_pkg.isPackageExists)("typescript"), unicorn: enableUnicorn = true, unocss: enableUnoCSS = false, vue: enableVue = VuePackages.some((i) => (0, local_pkg.isPackageExists)(i)) } = options;
|
|
1990
|
+
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 = (0, local_pkg.isPackageExists)("typescript"), unicorn: enableUnicorn = true, unocss: enableUnoCSS = false, vue: enableVue = VuePackages.some((i) => (0, local_pkg.isPackageExists)(i)) } = options;
|
|
1992
1991
|
let isInEditor = options.isInEditor;
|
|
1993
1992
|
if (isInEditor == null) {
|
|
1994
1993
|
isInEditor = isInEditorEnv();
|
|
@@ -2021,6 +2020,10 @@ function lincy(options = {}, ...userConfigs) {
|
|
|
2021
2020
|
...enableUnicorn === true ? {} : enableUnicorn,
|
|
2022
2021
|
overrides: overrides.unicorn
|
|
2023
2022
|
}));
|
|
2023
|
+
if (enableImports) configs$1.push(imports({
|
|
2024
|
+
overrides: overrides.imports,
|
|
2025
|
+
stylistic: stylisticOptions
|
|
2026
|
+
}));
|
|
2024
2027
|
if (enableVue) componentExts.push("vue");
|
|
2025
2028
|
if (enableJsx) configs$1.push(jsx());
|
|
2026
2029
|
if (enableTypeScript) configs$1.push(typescript({
|