@shayanthenerd/eslint-config 0.35.0 → 0.36.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.
Files changed (83) hide show
  1. package/dist/configs/astro.mjs +1 -2
  2. package/dist/configs/baseline.mjs +1 -2
  3. package/dist/configs/css.mjs +1 -2
  4. package/dist/configs/cypress.mjs +1 -2
  5. package/dist/configs/html.mjs +1 -2
  6. package/dist/configs/importX.mjs +1 -2
  7. package/dist/configs/javascript.mjs +1 -2
  8. package/dist/configs/markdown.mjs +1 -2
  9. package/dist/configs/next.mjs +1 -2
  10. package/dist/configs/node.mjs +1 -2
  11. package/dist/configs/nuxt.mjs +1 -2
  12. package/dist/configs/packageJson.mjs +1 -2
  13. package/dist/configs/perfectionist.mjs +1 -2
  14. package/dist/configs/playwright.mjs +1 -2
  15. package/dist/configs/promise.mjs +1 -2
  16. package/dist/configs/react.mjs +1 -2
  17. package/dist/configs/storybook.mjs +1 -2
  18. package/dist/configs/stylistic.mjs +1 -2
  19. package/dist/configs/tailwind.mjs +1 -2
  20. package/dist/configs/tanstack.mjs +1 -2
  21. package/dist/configs/typescript.mjs +1 -2
  22. package/dist/configs/unicorn.mjs +1 -2
  23. package/dist/configs/vitest.mjs +1 -2
  24. package/dist/configs/vue.mjs +1 -2
  25. package/dist/configs/zod.mjs +1 -2
  26. package/dist/helpers/globs.mjs +1 -2
  27. package/dist/helpers/ignores/defaultIgnorePatterns.mjs +1 -2
  28. package/dist/helpers/ignores/getIgnorePatterns.mjs +1 -2
  29. package/dist/helpers/ignores/resolveGitignorePatterns.mjs +1 -2
  30. package/dist/helpers/isPackageDetected.mjs +1 -2
  31. package/dist/helpers/options/defaultOptions.mjs +1 -2
  32. package/dist/helpers/options/enableDetectedConfigs.mjs +1 -2
  33. package/dist/helpers/options/mergeWithDefaults.mjs +1 -2
  34. package/dist/helpers/vue/getRestrictedVueElements.mjs +1 -2
  35. package/dist/helpers/vue/getRestrictedVueInputs.mjs +1 -2
  36. package/dist/index.d.mts +0 -2
  37. package/dist/index.mjs +1 -2
  38. package/dist/prettier.config.d.mts +0 -2
  39. package/dist/prettier.config.mjs +1 -2
  40. package/dist/rules/astro.mjs +1 -2
  41. package/dist/rules/baseline.mjs +1 -2
  42. package/dist/rules/css.mjs +5 -2
  43. package/dist/rules/cypress.mjs +1 -2
  44. package/dist/rules/html.mjs +1 -2
  45. package/dist/rules/importX.mjs +1 -2
  46. package/dist/rules/javascript.mjs +1 -2
  47. package/dist/rules/markdown.mjs +1 -2
  48. package/dist/rules/next.mjs +1 -2
  49. package/dist/rules/node.mjs +1 -2
  50. package/dist/rules/nuxt.mjs +1 -2
  51. package/dist/rules/packageJson.mjs +6 -2
  52. package/dist/rules/perfectionist.mjs +1 -2
  53. package/dist/rules/playwright.mjs +1 -2
  54. package/dist/rules/promise.mjs +1 -2
  55. package/dist/rules/react.mjs +1 -2
  56. package/dist/rules/storybook.mjs +1 -2
  57. package/dist/rules/stylistic.mjs +1 -2
  58. package/dist/rules/tailwind.mjs +1 -2
  59. package/dist/rules/tanstack.mjs +1 -2
  60. package/dist/rules/typescript.mjs +2 -3
  61. package/dist/rules/unicorn.mjs +1 -2
  62. package/dist/rules/vitest.mjs +1 -2
  63. package/dist/rules/vue.mjs +1 -2
  64. package/dist/rules/zod.mjs +1 -2
  65. package/dist/types/eslint-schema.d.mts +854 -493
  66. package/dist/types/eslintRules.d.mts +0 -2
  67. package/dist/types/helpers.d.mts +0 -2
  68. package/dist/types/index.d.mts +0 -2
  69. package/dist/types/options/baseline.d.mts +0 -2
  70. package/dist/types/options/markdown.d.mts +0 -2
  71. package/dist/types/options/nuxt.d.mts +0 -2
  72. package/dist/types/options/react.d.mts +0 -2
  73. package/dist/types/options/stylistic.d.mts +0 -2
  74. package/dist/types/options/tailwind.d.mts +0 -2
  75. package/dist/types/options/tanstack.d.mts +0 -2
  76. package/dist/types/options/test.d.mts +0 -2
  77. package/dist/types/options/typescript.d.mts +0 -2
  78. package/dist/types/options/vue.d.mts +0 -2
  79. package/dist/types/options/zod.d.mts +0 -2
  80. package/dist/utils/isEmptyString.mjs +1 -2
  81. package/dist/utils/isEnabled.mjs +1 -2
  82. package/dist/utils/isTruthy.mjs +1 -2
  83. package/package.json +22 -22
@@ -7,7 +7,7 @@ import { mergeConfigs } from "eslint-flat-config-utils";
7
7
  import eslintPluginAstro from "eslint-plugin-astro";
8
8
  import { parser } from "typescript-eslint";
9
9
  import path from "node:path";
10
- //#region src/configs/astro.ts
10
+ // src/configs/astro.ts
11
11
  function getAstroConfig(options) {
12
12
  const { tsConfig, configs: { astro } } = options;
13
13
  const { overrides } = isEnabled(astro) ? astro : defaultOptions.configs.astro;
@@ -33,5 +33,4 @@ function getAstroConfig(options) {
33
33
  };
34
34
  return mergeConfigs(astroConfig, overrides);
35
35
  }
36
- //#endregion
37
36
  export { getAstroConfig };
@@ -3,7 +3,7 @@ import { isEnabled } from "../utils/isEnabled.mjs";
3
3
  import { getBaselineRules } from "../rules/baseline.mjs";
4
4
  import { isTruthy } from "../utils/isTruthy.mjs";
5
5
  import eslintPluginBaselineJs from "eslint-plugin-baseline-js";
6
- //#region src/configs/baseline.ts
6
+ // src/configs/baseline.ts
7
7
  function getBaselineConfig(options) {
8
8
  const { vue, astro } = options.configs;
9
9
  return {
@@ -19,5 +19,4 @@ function getBaselineConfig(options) {
19
19
  rules: getBaselineRules(options)
20
20
  };
21
21
  }
22
- //#endregion
23
22
  export { getBaselineConfig };
@@ -6,7 +6,7 @@ import { mergeConfigs } from "eslint-flat-config-utils";
6
6
  import eslintPluginCssicorn from "eslint-cssicorn";
7
7
  import eslintPluginCss from "@eslint/css";
8
8
  import { tailwind3, tailwind4 } from "tailwind-csstree";
9
- //#region src/configs/css.ts
9
+ // src/configs/css.ts
10
10
  function getCssConfig(options) {
11
11
  const { css, tailwind } = options.configs;
12
12
  const { overrides } = isEnabled(css) ? css : defaultOptions.configs.css;
@@ -27,5 +27,4 @@ function getCssConfig(options) {
27
27
  };
28
28
  return mergeConfigs(cssConfig, overrides);
29
29
  }
30
- //#endregion
31
30
  export { getCssConfig };
@@ -4,7 +4,7 @@ import { isEnabled } from "../utils/isEnabled.mjs";
4
4
  import { getCypressRules } from "../rules/cypress.mjs";
5
5
  import { mergeConfigs } from "eslint-flat-config-utils";
6
6
  import eslintPluginCypress from "eslint-plugin-cypress";
7
- //#region src/configs/cypress.ts
7
+ // src/configs/cypress.ts
8
8
  function getCypressConfig(options) {
9
9
  const { cypress } = options.configs.test;
10
10
  const { overrides } = isEnabled(cypress) ? cypress : defaultOptions.configs.test.cypress;
@@ -17,5 +17,4 @@ function getCypressConfig(options) {
17
17
  };
18
18
  return mergeConfigs(cypressConfig, overrides);
19
19
  }
20
- //#endregion
21
20
  export { getCypressConfig };
@@ -5,7 +5,7 @@ import { getHtmlRules } from "../rules/html.mjs";
5
5
  import { mergeConfigs } from "eslint-flat-config-utils";
6
6
  import eslintPluginUnicorn from "eslint-plugin-unicorn";
7
7
  import eslintPluginHtml from "@html-eslint/eslint-plugin";
8
- //#region src/configs/html.ts
8
+ // src/configs/html.ts
9
9
  function getHtmlConfig(options) {
10
10
  const { html, unicorn } = options.configs;
11
11
  const { overrides } = isEnabled(html) ? html : defaultOptions.configs.html;
@@ -21,5 +21,4 @@ function getHtmlConfig(options) {
21
21
  };
22
22
  return mergeConfigs(htmlConfig, overrides);
23
23
  }
24
- //#endregion
25
24
  export { getHtmlConfig };
@@ -5,7 +5,7 @@ import { isTruthy } from "../utils/isTruthy.mjs";
5
5
  import { getImportXRules } from "../rules/importX.mjs";
6
6
  import { mergeConfigs } from "eslint-flat-config-utils";
7
7
  import eslintPluginImportX from "eslint-plugin-import-x";
8
- //#region src/configs/importX.ts
8
+ // src/configs/importX.ts
9
9
  function getImportXConfig(options) {
10
10
  const { vue, astro, importX, typescript } = options.configs;
11
11
  const { overrides } = isEnabled(importX) ? importX : defaultOptions.configs.importX;
@@ -23,5 +23,4 @@ function getImportXConfig(options) {
23
23
  };
24
24
  return mergeConfigs(importXConfig, overrides);
25
25
  }
26
- //#endregion
27
26
  export { getImportXConfig };
@@ -5,7 +5,7 @@ import { getJavaScriptRules } from "../rules/javascript.mjs";
5
5
  import { mergeConfigs } from "eslint-flat-config-utils";
6
6
  import { parser } from "typescript-eslint";
7
7
  import globals from "globals";
8
- //#region src/configs/javascript.ts
8
+ // src/configs/javascript.ts
9
9
  function getJavascriptConfig(options) {
10
10
  const { env, configs: { vue, astro, javascript: { overrides } }, project: { globals: { bun, node, deno, vitest, worker, browser, commonjs, nodeBuiltin, audioWorklet, webextension, sharedWorker, serviceworker, vue: vueGlobals, astro: astroGlobals, custom: userGlobals } } } = options;
11
11
  const baseConfig = {
@@ -49,5 +49,4 @@ function getJavascriptConfig(options) {
49
49
  };
50
50
  return mergeConfigs(baseConfig, overrides);
51
51
  }
52
- //#endregion
53
52
  export { getJavascriptConfig };
@@ -5,7 +5,7 @@ import { getMarkdownRules } from "../rules/markdown.mjs";
5
5
  import { mergeConfigs } from "eslint-flat-config-utils";
6
6
  import eslintPluginUnicorn from "eslint-plugin-unicorn";
7
7
  import eslintPluginMarkdown from "@eslint/markdown";
8
- //#region src/configs/markdown.ts
8
+ // src/configs/markdown.ts
9
9
  function getMarkdownConfig(options) {
10
10
  const { unicorn, markdown } = options.configs;
11
11
  const { language, frontmatter, overrides } = isEnabled(markdown) ? markdown : defaultOptions.configs.markdown;
@@ -25,5 +25,4 @@ function getMarkdownConfig(options) {
25
25
  };
26
26
  return mergeConfigs(markdownConfig, overrides);
27
27
  }
28
- //#endregion
29
28
  export { getMarkdownConfig };
@@ -4,7 +4,7 @@ import { isEnabled } from "../utils/isEnabled.mjs";
4
4
  import { getNextRules } from "../rules/next.mjs";
5
5
  import { mergeConfigs } from "eslint-flat-config-utils";
6
6
  import eslintPluginNext from "@next/eslint-plugin-next";
7
- //#region src/configs/next.ts
7
+ // src/configs/next.ts
8
8
  function getNextConfig(options) {
9
9
  const { packageDir, configs: { next } } = options;
10
10
  const { overrides } = isEnabled(next) ? next : defaultOptions.configs.next;
@@ -17,5 +17,4 @@ function getNextConfig(options) {
17
17
  };
18
18
  return mergeConfigs(nextConfig, overrides);
19
19
  }
20
- //#endregion
21
20
  export { getNextConfig };
@@ -6,7 +6,7 @@ import { getNodeRules } from "../rules/node.mjs";
6
6
  import { mergeConfigs } from "eslint-flat-config-utils";
7
7
  import path from "node:path";
8
8
  import eslintPluginNode from "eslint-plugin-n";
9
- //#region src/configs/node.ts
9
+ // src/configs/node.ts
10
10
  function getNodeConfig(options) {
11
11
  const { tsConfig, configs: { vue, node, astro } } = options;
12
12
  const { overrides } = isEnabled(node) ? node : defaultOptions.configs.node;
@@ -25,5 +25,4 @@ function getNodeConfig(options) {
25
25
  };
26
26
  return mergeConfigs(nodeConfig, overrides);
27
27
  }
28
- //#endregion
29
28
  export { getNodeConfig };
@@ -7,7 +7,7 @@ import { parser } from "typescript-eslint";
7
7
  import eslintPluginVue from "eslint-plugin-vue";
8
8
  import eslintPluginNuxtLinkChecker from "nuxt-link-checker/eslint";
9
9
  import eslintPluginNuxt from "@nuxt/eslint-plugin";
10
- //#region src/configs/nuxt.ts
10
+ // src/configs/nuxt.ts
11
11
  const baseVueConfig = eslintPluginVue.configs["flat/base"].find((config) => config.languageOptions?.parser);
12
12
  const middlewaresConfig = {
13
13
  name: "shayanthenerd/nuxt/middlewares",
@@ -61,5 +61,4 @@ function getNuxtConfigs(options) {
61
61
  serverComponentsConfig
62
62
  ];
63
63
  }
64
- //#endregion
65
64
  export { getNuxtConfigs };
@@ -4,7 +4,7 @@ import { isEnabled } from "../utils/isEnabled.mjs";
4
4
  import { getPackageJsonRules } from "../rules/packageJson.mjs";
5
5
  import { mergeConfigs } from "eslint-flat-config-utils";
6
6
  import eslintPluginPackageJson from "eslint-plugin-package-json";
7
- //#region src/configs/packageJson.ts
7
+ // src/configs/packageJson.ts
8
8
  function getPackageJsonConfig(options) {
9
9
  const { packageJson } = options.configs;
10
10
  const { overrides } = isEnabled(packageJson) ? packageJson : defaultOptions.configs.packageJson;
@@ -17,5 +17,4 @@ function getPackageJsonConfig(options) {
17
17
  };
18
18
  return mergeConfigs(packageJsonConfig, overrides);
19
19
  }
20
- //#endregion
21
20
  export { getPackageJsonConfig };
@@ -5,7 +5,7 @@ import { isTruthy } from "../utils/isTruthy.mjs";
5
5
  import { getPerfectionistRules } from "../rules/perfectionist.mjs";
6
6
  import { mergeConfigs } from "eslint-flat-config-utils";
7
7
  import eslintPluginPerfectionist from "eslint-plugin-perfectionist";
8
- //#region src/configs/perfectionist.ts
8
+ // src/configs/perfectionist.ts
9
9
  function getPerfectionistConfig(options) {
10
10
  const { vue, astro, perfectionist } = options.configs;
11
11
  const { sortType, overrides } = isEnabled(perfectionist) ? perfectionist : defaultOptions.configs.perfectionist;
@@ -30,5 +30,4 @@ function getPerfectionistConfig(options) {
30
30
  };
31
31
  return mergeConfigs(perfectionistConfig, overrides);
32
32
  }
33
- //#endregion
34
33
  export { getPerfectionistConfig };
@@ -4,7 +4,7 @@ import { isEnabled } from "../utils/isEnabled.mjs";
4
4
  import { getPlaywrightRules } from "../rules/playwright.mjs";
5
5
  import { mergeConfigs } from "eslint-flat-config-utils";
6
6
  import eslintPluginPlaywright from "eslint-plugin-playwright";
7
- //#region src/configs/playwright.ts
7
+ // src/configs/playwright.ts
8
8
  function getPlaywrightConfig(options) {
9
9
  const { playwright } = options.configs.test;
10
10
  const { overrides } = isEnabled(playwright) ? playwright : defaultOptions.configs.test.playwright;
@@ -17,5 +17,4 @@ function getPlaywrightConfig(options) {
17
17
  };
18
18
  return mergeConfigs(playwrightConfig, overrides);
19
19
  }
20
- //#endregion
21
20
  export { getPlaywrightConfig };
@@ -5,7 +5,7 @@ import { isTruthy } from "../utils/isTruthy.mjs";
5
5
  import { getPromiseRules } from "../rules/promise.mjs";
6
6
  import { mergeConfigs } from "eslint-flat-config-utils";
7
7
  import eslintPluginPromise from "eslint-plugin-promise";
8
- //#region src/configs/promise.ts
8
+ // src/configs/promise.ts
9
9
  function getPromiseConfig(options) {
10
10
  const { vue, astro, promise } = options.configs;
11
11
  const { overrides } = isEnabled(promise) ? promise : defaultOptions.configs.promise;
@@ -22,5 +22,4 @@ function getPromiseConfig(options) {
22
22
  };
23
23
  return mergeConfigs(promiseConfig, overrides);
24
24
  }
25
- //#endregion
26
25
  export { getPromiseConfig };
@@ -7,7 +7,7 @@ import eslintPluginUnicorn from "eslint-plugin-unicorn";
7
7
  import eslintPluginJsxA11yX from "eslint-plugin-jsx-a11y-x";
8
8
  import eslintPluginReact from "@eslint-react/eslint-plugin";
9
9
  import eslintPluginHtmlReact from "@html-eslint/eslint-plugin-react";
10
- //#region src/configs/react.ts
10
+ // src/configs/react.ts
11
11
  function getReactConfig(options) {
12
12
  const { react, unicorn } = options.configs;
13
13
  const { overrides, accessibility } = isEnabled(react) ? react : defaultOptions.configs.react;
@@ -24,5 +24,4 @@ function getReactConfig(options) {
24
24
  };
25
25
  return mergeConfigs(reactConfig, overrides);
26
26
  }
27
- //#endregion
28
27
  export { getReactConfig };
@@ -4,7 +4,7 @@ import { isEnabled } from "../utils/isEnabled.mjs";
4
4
  import { getStorybookRules } from "../rules/storybook.mjs";
5
5
  import { mergeConfigs } from "eslint-flat-config-utils";
6
6
  import eslintPluginStorybook from "eslint-plugin-storybook";
7
- //#region src/configs/storybook.ts
7
+ // src/configs/storybook.ts
8
8
  function getStorybookConfig(options) {
9
9
  const { storybook } = options.configs.test;
10
10
  const { overrides } = isEnabled(storybook) ? storybook : defaultOptions.configs.test.storybook;
@@ -16,5 +16,4 @@ function getStorybookConfig(options) {
16
16
  };
17
17
  return mergeConfigs(storybookConfig, overrides);
18
18
  }
19
- //#endregion
20
19
  export { getStorybookConfig };
@@ -5,7 +5,7 @@ import { isTruthy } from "../utils/isTruthy.mjs";
5
5
  import { getStylisticRules } from "../rules/stylistic.mjs";
6
6
  import { mergeConfigs } from "eslint-flat-config-utils";
7
7
  import eslintPluginStylistic from "@stylistic/eslint-plugin";
8
- //#region src/configs/stylistic.ts
8
+ // src/configs/stylistic.ts
9
9
  function getStylisticConfig(options) {
10
10
  const { vue, astro, stylistic } = options.configs;
11
11
  const { overrides } = isEnabled(stylistic) ? stylistic : defaultOptions.configs.stylistic;
@@ -22,5 +22,4 @@ function getStylisticConfig(options) {
22
22
  };
23
23
  return mergeConfigs(stylisticConfig, overrides);
24
24
  }
25
- //#endregion
26
25
  export { getStylisticConfig };
@@ -8,7 +8,7 @@ import path from "node:path";
8
8
  import eslintPluginTailwind from "eslint-plugin-better-tailwindcss";
9
9
  import { getDefaultSelectors } from "eslint-plugin-better-tailwindcss/defaults";
10
10
  import { MatcherType, SelectorKind } from "eslint-plugin-better-tailwindcss/types";
11
- //#region src/configs/tailwind.ts
11
+ // src/configs/tailwind.ts
12
12
  const astroAttributes = {
13
13
  kind: SelectorKind.Attribute,
14
14
  name: "^class:list$",
@@ -82,5 +82,4 @@ function getTailwindConfig(options) {
82
82
  };
83
83
  return mergeConfigs(tailwindConfig, overrides);
84
84
  }
85
- //#endregion
86
85
  export { getTailwindConfig };
@@ -6,7 +6,7 @@ import { mergeConfigs } from "eslint-flat-config-utils";
6
6
  import eslintPluginTanstackQuery from "@tanstack/eslint-plugin-query";
7
7
  import eslintPluginTanstackRouter from "@tanstack/eslint-plugin-router";
8
8
  import eslintPluginTanstackStart from "@tanstack/eslint-plugin-start";
9
- //#region src/configs/tanstack.ts
9
+ // src/configs/tanstack.ts
10
10
  function getTanstackConfig(options) {
11
11
  const { tanstack } = options.configs;
12
12
  const { overrides } = isEnabled(tanstack) ? tanstack : defaultOptions.configs.tanstack;
@@ -22,5 +22,4 @@ function getTanstackConfig(options) {
22
22
  };
23
23
  return mergeConfigs(tanstackConfig, overrides);
24
24
  }
25
- //#endregion
26
25
  export { getTanstackConfig };
@@ -6,7 +6,7 @@ import { getTypescriptRules } from "../rules/typescript.mjs";
6
6
  import { mergeConfigs } from "eslint-flat-config-utils";
7
7
  import { parser, plugin } from "typescript-eslint";
8
8
  import path from "node:path";
9
- //#region src/configs/typescript.ts
9
+ // src/configs/typescript.ts
10
10
  function getTypescriptConfig(options) {
11
11
  const { tsConfig, configs: { vue, typescript } } = options;
12
12
  const { allowedDefaultProjects: userAllowedDefaultProjects } = isEnabled(typescript) ? typescript : defaultOptions.configs.typescript;
@@ -33,5 +33,4 @@ function getTypescriptConfig(options) {
33
33
  };
34
34
  return mergeConfigs(typescriptConfig, overrides);
35
35
  }
36
- //#endregion
37
36
  export { getTypescriptConfig };
@@ -5,7 +5,7 @@ import { isTruthy } from "../utils/isTruthy.mjs";
5
5
  import { getUnicornRules } from "../rules/unicorn.mjs";
6
6
  import { mergeConfigs } from "eslint-flat-config-utils";
7
7
  import eslintPluginUnicorn from "eslint-plugin-unicorn";
8
- //#region src/configs/unicorn.ts
8
+ // src/configs/unicorn.ts
9
9
  function getUnicornConfig(options) {
10
10
  const { vue, astro, unicorn } = options.configs;
11
11
  const { overrides } = isEnabled(unicorn) ? unicorn : defaultOptions.configs.unicorn;
@@ -22,5 +22,4 @@ function getUnicornConfig(options) {
22
22
  };
23
23
  return mergeConfigs(astroConfig, overrides);
24
24
  }
25
- //#endregion
26
25
  export { getUnicornConfig };
@@ -4,7 +4,7 @@ import { isEnabled } from "../utils/isEnabled.mjs";
4
4
  import { getVitestRules } from "../rules/vitest.mjs";
5
5
  import { mergeConfigs } from "eslint-flat-config-utils";
6
6
  import eslintPluginVitest from "@vitest/eslint-plugin";
7
- //#region src/configs/vitest.ts
7
+ // src/configs/vitest.ts
8
8
  function getVitestConfig(options) {
9
9
  const { vitest } = options.configs.test;
10
10
  const { overrides } = isEnabled(vitest) ? vitest : defaultOptions.configs.test.vitest;
@@ -16,5 +16,4 @@ function getVitestConfig(options) {
16
16
  };
17
17
  return mergeConfigs(vitestConfig, overrides);
18
18
  }
19
- //#endregion
20
19
  export { getVitestConfig };
@@ -6,7 +6,7 @@ import { mergeConfigs } from "eslint-flat-config-utils";
6
6
  import { parser } from "typescript-eslint";
7
7
  import eslintPluginVue from "eslint-plugin-vue";
8
8
  import eslintPluginVueAccessibility from "eslint-plugin-vuejs-accessibility";
9
- //#region src/configs/vue.ts
9
+ // src/configs/vue.ts
10
10
  const baseVueConfig = eslintPluginVue.configs["flat/base"].find((config) => config.languageOptions?.parser);
11
11
  function getVueConfig(options) {
12
12
  const { vue } = options.configs;
@@ -37,5 +37,4 @@ function getVueConfig(options) {
37
37
  };
38
38
  return mergeConfigs(vueConfig, overrides);
39
39
  }
40
- //#endregion
41
40
  export { getVueConfig };
@@ -6,7 +6,7 @@ import { getZodRules } from "../rules/zod.mjs";
6
6
  import { mergeConfigs } from "eslint-flat-config-utils";
7
7
  import eslintPluginZod from "eslint-plugin-zod";
8
8
  import eslintPluginZodMini from "eslint-plugin-zod-mini";
9
- //#region src/configs/zod.ts
9
+ // src/configs/zod.ts
10
10
  function getZodConfig(options) {
11
11
  const { zod, vue, astro } = options.configs;
12
12
  const { mini, overrides } = isEnabled(zod) ? zod : defaultOptions.configs.zod;
@@ -23,5 +23,4 @@ function getZodConfig(options) {
23
23
  };
24
24
  return mergeConfigs(zodConfig, overrides);
25
25
  }
26
- //#endregion
27
26
  export { getZodConfig };
@@ -1,4 +1,4 @@
1
- //#region src/helpers/globs.ts
1
+ // src/helpers/globs.ts
2
2
  const sourceExtensions = "?([mc])[jt]s";
3
3
  const jsxTsxExtensions = "[jt]sx";
4
4
  const vueSourceExtensions = `{vue,${sourceExtensions},${jsxTsxExtensions}}`;
@@ -18,5 +18,4 @@ const globs = {
18
18
  test: `**/{__tests__/*,*.{test,spec,cy,bench?(mark)}.${sourceExtensions}`,
19
19
  coverage: "**/coverage/**"
20
20
  };
21
- //#endregion
22
21
  export { globs };
@@ -1,4 +1,4 @@
1
- //#region src/helpers/ignores/defaultIgnorePatterns.ts
1
+ // src/helpers/ignores/defaultIgnorePatterns.ts
2
2
  const defaultIgnorePatterns = [
3
3
  "**/jspm_packages",
4
4
  "**/pnpm-lock.yaml",
@@ -51,5 +51,4 @@ const defaultIgnorePatterns = [
51
51
  "**/CODEOWNERS.md",
52
52
  "**/CODE_OF_CONDUCT.md"
53
53
  ];
54
- //#endregion
55
54
  export { defaultIgnorePatterns };
@@ -1,6 +1,6 @@
1
1
  import { defaultIgnorePatterns } from "./defaultIgnorePatterns.mjs";
2
2
  import { resolveGitignorePatterns } from "./resolveGitignorePatterns.mjs";
3
- //#region src/helpers/ignores/getIgnorePatterns.ts
3
+ // src/helpers/ignores/getIgnorePatterns.ts
4
4
  function getIgnorePatterns({ patterns, gitignore }) {
5
5
  if (gitignore) {
6
6
  const gitignorePatterns = resolveGitignorePatterns(gitignore);
@@ -9,5 +9,4 @@ function getIgnorePatterns({ patterns, gitignore }) {
9
9
  if (patterns.length > 0) defaultIgnorePatterns.push(...patterns);
10
10
  return [...new Set(defaultIgnorePatterns)];
11
11
  }
12
- //#endregion
13
12
  export { getIgnorePatterns };
@@ -2,7 +2,7 @@ import { includeIgnoreFile } from "eslint/config";
2
2
  import path from "node:path";
3
3
  import fs from "node:fs";
4
4
  import { styleText } from "node:util";
5
- //#region src/helpers/ignores/resolveGitignorePatterns.ts
5
+ // src/helpers/ignores/resolveGitignorePatterns.ts
6
6
  const warningMessage = styleText("yellow", "⚠ Warning:");
7
7
  const fallbackMessage = `Falling back to default ignore patterns. You can suppress this warning by setting ${styleText("bgBlack", " gitignore: false ")} in the config.`;
8
8
  function resolveGitignorePatterns(gitignorePath) {
@@ -19,5 +19,4 @@ function resolveGitignorePatterns(gitignorePath) {
19
19
  else console.warn(warningMessage, `No patterns found in .gitignore file at "${styledGitignorePath}".`, fallbackMessage);
20
20
  return gitignorePatterns;
21
21
  }
22
- //#endregion
23
22
  export { resolveGitignorePatterns };
@@ -2,7 +2,7 @@ import { defaultOptions } from "./options/defaultOptions.mjs";
2
2
  import path from "node:path";
3
3
  import { styleText } from "node:util";
4
4
  import { isPackageExists } from "local-pkg";
5
- //#region src/helpers/isPackageDetected.ts
5
+ // src/helpers/isPackageDetected.ts
6
6
  const detectedPackages = [];
7
7
  function logDetectedPackages(disabledConfigs) {
8
8
  const nonDisabledDetectedPackages = detectedPackages.filter((packageName) => !disabledConfigs[packageName]);
@@ -18,5 +18,4 @@ function isPackageDetected(packageName, options) {
18
18
  if (autoDetectDeps === "verbose" && isPackageInstalled) detectedPackages.push(packageName);
19
19
  return isPackageInstalled;
20
20
  }
21
- //#endregion
22
21
  export { isPackageDetected, logDetectedPackages };
@@ -1,4 +1,4 @@
1
- //#region src/helpers/options/defaultOptions.ts
1
+ // src/helpers/options/defaultOptions.ts
2
2
  const defaultOptions = {
3
3
  autoDetectDeps: true,
4
4
  env: "browser",
@@ -249,5 +249,4 @@ const defaultOptions = {
249
249
  }
250
250
  }
251
251
  };
252
- //#endregion
253
252
  export { defaultOptions };
@@ -1,7 +1,7 @@
1
1
  import { defaultOptions } from "./defaultOptions.mjs";
2
2
  import { isEnabled } from "../../utils/isEnabled.mjs";
3
3
  import { isPackageDetected, logDetectedPackages } from "../isPackageDetected.mjs";
4
- //#region src/helpers/options/enableDetectedConfigs.ts
4
+ // src/helpers/options/enableDetectedConfigs.ts
5
5
  function enableDetectedConfigs(options) {
6
6
  const explicitlyDisabledConfigs = {
7
7
  "typescript": options.configs?.typescript === false,
@@ -107,5 +107,4 @@ function enableDetectedConfigs(options) {
107
107
  if (options.autoDetectDeps === "verbose") logDetectedPackages(explicitlyDisabledConfigs);
108
108
  return options;
109
109
  }
110
- //#endregion
111
110
  export { enableDetectedConfigs };
@@ -2,7 +2,7 @@ import { defaultOptions } from "./defaultOptions.mjs";
2
2
  import { enableDetectedConfigs } from "./enableDetectedConfigs.mjs";
3
3
  import { isEmptyString } from "../../utils/isEmptyString.mjs";
4
4
  import { createDefu } from "defu";
5
- //#region src/helpers/options/mergeWithDefaults.ts
5
+ // src/helpers/options/mergeWithDefaults.ts
6
6
  const mergeOptions = createDefu((object, key, value) => {
7
7
  if ([
8
8
  "allowedRelativeFontUnits",
@@ -21,5 +21,4 @@ function mergeWithDefaults(options) {
21
21
  const optionsWithDetectedConfigs = enableDetectedConfigs(options);
22
22
  return mergeOptions(optionsWithDetectedConfigs, defaultOptions);
23
23
  }
24
- //#endregion
25
24
  export { mergeWithDefaults };
@@ -1,4 +1,4 @@
1
- //#region src/helpers/vue/getRestrictedVueElements.ts
1
+ // src/helpers/vue/getRestrictedVueElements.ts
2
2
  const alternativeComponentPairs = Object.entries({
3
3
  kbd: "Kbd",
4
4
  form: "Form",
@@ -21,5 +21,4 @@ function getRestrictedVueElements(prefix) {
21
21
  });
22
22
  return restrictedElements;
23
23
  }
24
- //#endregion
25
24
  export { getRestrictedVueElements };
@@ -1,4 +1,4 @@
1
- //#region src/helpers/vue/getRestrictedVueInputs.ts
1
+ // src/helpers/vue/getRestrictedVueInputs.ts
2
2
  const alternativeComponentPairs = Object.entries({
3
3
  range: "Slider",
4
4
  date: "Calendar",
@@ -17,5 +17,4 @@ function getRestrictedVueInputs(prefix) {
17
17
  });
18
18
  return restrictedInputs;
19
19
  }
20
- //#endregion
21
20
  export { getRestrictedVueInputs };
package/dist/index.d.mts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { Options } from "./types/index.mjs";
2
2
  import { Linter } from "eslint";
3
- //#region src/index.d.ts
4
3
  /**
5
4
  * Define your ESLint configuration based on the provided options and/or custom Flat Config Objects.
6
5
  *
@@ -39,5 +38,4 @@ declare function defineConfig(): Linter.Config[];
39
38
  declare function defineConfig(options: Options): Linter.Config[];
40
39
  declare function defineConfig(configs: Linter.Config[]): Linter.Config[];
41
40
  declare function defineConfig(options: Options, configs: Linter.Config[]): Linter.Config[];
42
- //#endregion
43
41
  export { defineConfig };
package/dist/index.mjs CHANGED
@@ -28,7 +28,7 @@ import { getZodConfig } from "./configs/zod.mjs";
28
28
  import { getIgnorePatterns } from "./helpers/ignores/getIgnorePatterns.mjs";
29
29
  import { mergeWithDefaults } from "./helpers/options/mergeWithDefaults.mjs";
30
30
  import { defineConfig as defineConfig$1, globalIgnores } from "eslint/config";
31
- //#region src/index.ts
31
+ // src/index.ts
32
32
  function defineConfig(...args) {
33
33
  let options = {};
34
34
  let userConfigs = [];
@@ -81,5 +81,4 @@ function defineConfig(...args) {
81
81
  ].filter(isTruthy);
82
82
  return defineConfig$1(configObjects);
83
83
  }
84
- //#endregion
85
84
  export { defineConfig };
@@ -1,5 +1,3 @@
1
1
  import { Config } from "prettier";
2
- //#region src/prettier.config.d.ts
3
2
  declare const prettierConfig: Config;
4
- //#endregion
5
3
  export { prettierConfig as default };
@@ -1,4 +1,4 @@
1
- //#region src/prettier.config.ts
1
+ // src/prettier.config.ts
2
2
  const prettierConfig = {
3
3
  arrowParens: "always",
4
4
  bracketSameLine: false,
@@ -32,5 +32,4 @@ const prettierConfig = {
32
32
  options: { parser: "html" }
33
33
  }]
34
34
  };
35
- //#endregion
36
35
  export { prettierConfig as default };
@@ -1,6 +1,6 @@
1
1
  import { defaultOptions } from "../helpers/options/defaultOptions.mjs";
2
2
  import { isEnabled } from "../utils/isEnabled.mjs";
3
- //#region src/rules/astro.ts
3
+ // src/rules/astro.ts
4
4
  function getAstroRules(options) {
5
5
  const { astro, importX, stylistic } = options.configs;
6
6
  const { semi } = isEnabled(stylistic) ? stylistic : defaultOptions.configs.stylistic;
@@ -66,5 +66,4 @@ function getAstroRules(options) {
66
66
  if (isEnabled(stylistic)) astroRules["@stylistic/jsx-one-expression-per-line"] = "off";
67
67
  return astroRules;
68
68
  }
69
- //#endregion
70
69
  export { getAstroRules };
@@ -1,6 +1,6 @@
1
1
  import { defaultOptions } from "../helpers/options/defaultOptions.mjs";
2
2
  import { isEnabled } from "../utils/isEnabled.mjs";
3
- //#region src/rules/baseline.ts
3
+ // src/rules/baseline.ts
4
4
  function getBaselineRules(options) {
5
5
  const baselineOption = options.configs.baseline;
6
6
  const { baseline, javascript: { ignoredFeatures: userIgnoredFeatures, ignoredNodeTypes: userIgnoredNodeTypes } } = isEnabled(baselineOption) ? baselineOption : defaultOptions.configs.baseline;
@@ -19,5 +19,4 @@ function getBaselineRules(options) {
19
19
  }]
20
20
  };
21
21
  }
22
- //#endregion
23
22
  export { getBaselineRules };