@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.cjs CHANGED
@@ -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",
@@ -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
@@ -1874,7 +1874,7 @@ async function typescript(options = {}) {
1874
1874
  allowTernary: true
1875
1875
  }],
1876
1876
  "ts/no-unused-vars": [
1877
- "error",
1877
+ "warn",
1878
1878
  {
1879
1879
  args: "all",
1880
1880
  argsIgnorePattern: "^_",
@@ -2127,7 +2127,7 @@ async function vue(options = {}) {
2127
2127
  "vue/no-restricted-v-bind": ["error", "/^v-/"],
2128
2128
  "vue/no-setup-props-reactivity-loss": "off",
2129
2129
  "vue/no-sparse-arrays": "error",
2130
- "vue/no-unused-refs": "error",
2130
+ "vue/no-unused-refs": "warn",
2131
2131
  "vue/no-useless-v-bind": "error",
2132
2132
  "vue/no-v-html": "off",
2133
2133
  "vue/no-v-text-v-html-on-component": "off",
@@ -2459,6 +2459,15 @@ function lincy(options = {}, ...userConfigs) {
2459
2459
  if (autoRenamePlugins) {
2460
2460
  composer = composer.renamePlugins(defaultPluginRenaming);
2461
2461
  }
2462
+ if (isInEditor) {
2463
+ composer = composer.disableRulesFix([
2464
+ "unused-imports/no-unused-imports",
2465
+ "test/no-only-tests",
2466
+ "prefer-const"
2467
+ ], {
2468
+ builtinRules: () => import(["eslint", "use-at-your-own-risk"].join("/")).then((r) => r.builtinRules)
2469
+ });
2470
+ }
2462
2471
  return composer;
2463
2472
  }
2464
2473
  function resolveSubOptions(options, key) {