@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.cjs CHANGED
@@ -28,8 +28,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
 
30
30
  // src/index.ts
31
- var src_exports = {};
32
- __export(src_exports, {
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
33
  GLOB_ALL_SRC: () => GLOB_ALL_SRC,
34
34
  GLOB_CSS: () => GLOB_CSS,
35
35
  GLOB_EXCLUDE: () => GLOB_EXCLUDE,
@@ -61,7 +61,7 @@ __export(src_exports, {
61
61
  StylisticConfigDefaults: () => StylisticConfigDefaults,
62
62
  combine: () => combine,
63
63
  comments: () => comments,
64
- default: () => src_default,
64
+ default: () => index_default,
65
65
  defaultPluginRenaming: () => defaultPluginRenaming,
66
66
  disables: () => disables,
67
67
  ensurePackages: () => ensurePackages,
@@ -99,9 +99,9 @@ __export(src_exports, {
99
99
  vue: () => vue,
100
100
  yaml: () => yaml
101
101
  });
102
- module.exports = __toCommonJS(src_exports);
102
+ module.exports = __toCommonJS(index_exports);
103
103
 
104
- // node_modules/.pnpm/tsup@8.3.5_jiti@2.4.2_postcss@8.4.49_tsx@4.19.2_typescript@5.7.3_yaml@2.6.1/node_modules/tsup/assets/cjs_shims.js
104
+ // node_modules/.pnpm/tsup@8.3.6_jiti@2.4.2_postcss@8.4.49_tsx@4.19.2_typescript@5.7.3_yaml@2.7.0/node_modules/tsup/assets/cjs_shims.js
105
105
  var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
106
106
  var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
107
107
 
@@ -260,7 +260,7 @@ async function disables() {
260
260
  },
261
261
  {
262
262
  files: [`**/*.config.${GLOB_SRC_EXT}`, `**/*.config.*.${GLOB_SRC_EXT}`],
263
- name: "antfu/disables/config-files",
263
+ name: "eslint/disables/config-files",
264
264
  rules: {
265
265
  "antfu/no-top-level-await": "off",
266
266
  "no-console": "off",
@@ -388,7 +388,6 @@ async function stylistic(options = {}) {
388
388
  } = typeof stylistic2 === "boolean" ? StylisticConfigDefaults : { ...StylisticConfigDefaults, ...stylistic2 };
389
389
  const pluginStylistic = await interopDefault(import("@stylistic/eslint-plugin"));
390
390
  const config = pluginStylistic.configs.customize({
391
- flat: true,
392
391
  indent,
393
392
  jsx: jsx2,
394
393
  pluginName: "style",
@@ -685,6 +684,7 @@ async function imports(options = {}) {
685
684
  "antfu/import-dedupe": "error",
686
685
  "antfu/no-import-dist": "error",
687
686
  "antfu/no-import-node-modules-by-path": "error",
687
+ "import/consistent-type-specifier-style": ["error", "prefer-top-level"],
688
688
  "import/first": "error",
689
689
  "import/no-duplicates": "error",
690
690
  "import/no-mutable-exports": "error",
@@ -839,7 +839,7 @@ async function javascript(options = {}) {
839
839
  allowTaggedTemplates: true,
840
840
  allowTernary: true
841
841
  }],
842
- "no-unused-vars": ["error", {
842
+ "no-unused-vars": ["warn", {
843
843
  args: "none",
844
844
  caughtErrors: "none",
845
845
  ignoreRestSiblings: true,
@@ -872,7 +872,7 @@ async function javascript(options = {}) {
872
872
  }
873
873
  ],
874
874
  "prefer-const": [
875
- "error",
875
+ isInEditor ? "warn" : "error",
876
876
  {
877
877
  destructuring: "all",
878
878
  ignoreReadBeforeAssign: true
@@ -886,7 +886,7 @@ async function javascript(options = {}) {
886
886
  "prefer-template": "error",
887
887
  "symbol-description": "error",
888
888
  "unicode-bom": ["error", "never"],
889
- "unused-imports/no-unused-imports": isInEditor ? "off" : "error",
889
+ "unused-imports/no-unused-imports": isInEditor ? "warn" : "error",
890
890
  "unused-imports/no-unused-vars": [
891
891
  "error",
892
892
  {
@@ -1669,7 +1669,7 @@ async function test(options = {}) {
1669
1669
  "test/consistent-test-it": ["error", { fn: "it", withinDescribe: "it" }],
1670
1670
  "test/no-identical-title": "error",
1671
1671
  "test/no-import-node-test": "error",
1672
- "test/no-only-tests": isInEditor ? "off" : "error",
1672
+ "test/no-only-tests": isInEditor ? "warn" : "error",
1673
1673
  "test/prefer-hooks-in-order": "error",
1674
1674
  "test/prefer-lowercase-title": "error",
1675
1675
  // Disables
@@ -1852,6 +1852,7 @@ async function typescript(options = {}) {
1852
1852
  "ts/consistent-type-definitions": ["error", "interface"],
1853
1853
  "ts/consistent-type-imports": ["error", {
1854
1854
  disallowTypeAnnotations: false,
1855
+ fixStyle: "separate-type-imports",
1855
1856
  prefer: "type-imports"
1856
1857
  }],
1857
1858
  "ts/method-signature-style": ["error", "property"],
@@ -1874,7 +1875,7 @@ async function typescript(options = {}) {
1874
1875
  allowTernary: true
1875
1876
  }],
1876
1877
  "ts/no-unused-vars": [
1877
- "error",
1878
+ "warn",
1878
1879
  {
1879
1880
  args: "all",
1880
1881
  argsIgnorePattern: "^_",
@@ -2127,7 +2128,7 @@ async function vue(options = {}) {
2127
2128
  "vue/no-restricted-v-bind": ["error", "/^v-/"],
2128
2129
  "vue/no-setup-props-reactivity-loss": "off",
2129
2130
  "vue/no-sparse-arrays": "error",
2130
- "vue/no-unused-refs": "error",
2131
+ "vue/no-unused-refs": "warn",
2131
2132
  "vue/no-useless-v-bind": "error",
2132
2133
  "vue/no-v-html": "off",
2133
2134
  "vue/no-v-text-v-html-on-component": "off",
@@ -2459,6 +2460,15 @@ function lincy(options = {}, ...userConfigs) {
2459
2460
  if (autoRenamePlugins) {
2460
2461
  composer = composer.renamePlugins(defaultPluginRenaming);
2461
2462
  }
2463
+ if (isInEditor) {
2464
+ composer = composer.disableRulesFix([
2465
+ "unused-imports/no-unused-imports",
2466
+ "test/no-only-tests",
2467
+ "prefer-const"
2468
+ ], {
2469
+ builtinRules: () => import(["eslint", "use-at-your-own-risk"].join("/")).then((r) => r.builtinRules)
2470
+ });
2471
+ }
2462
2472
  return composer;
2463
2473
  }
2464
2474
  function resolveSubOptions(options, key) {
@@ -2473,7 +2483,7 @@ function getOverrides(options, key) {
2473
2483
  }
2474
2484
 
2475
2485
  // src/index.ts
2476
- var src_default = lincy;
2486
+ var index_default = lincy;
2477
2487
  // Annotate the CommonJS export names for ESM import in node:
2478
2488
  0 && (module.exports = {
2479
2489
  GLOB_ALL_SRC,