@shayanthenerd/eslint-config 0.4.6 → 0.5.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 CHANGED
@@ -400,7 +400,6 @@ interface options {
400
400
  },
401
401
  importX?: boolean | {
402
402
  removeUnusedImports?: boolean,
403
- requireFileExtension?: boolean,
404
403
  overrides?: {},
405
404
  },
406
405
  perfectionist?: boolean | {
@@ -3,39 +3,18 @@ import { isEnabled } from "../utils/isEnabled.js";
3
3
  import { defaultOptions } from "../utils/options/defaultOptions.js";
4
4
  import { getImportXRules } from "../rules/importX.js";
5
5
  import { mergeConfigs } from "eslint-flat-config-utils";
6
- import eslintPluginImport from "eslint-plugin-import";
7
6
  import eslintPluginImportX from "eslint-plugin-import-x";
8
7
  import eslintPluginUnusedImports from "eslint-plugin-unused-imports";
9
8
 
10
9
  //#region src/configs/importX.ts
11
- eslintPluginImport.flatConfigs.recommended.rules = {};
12
10
  function getImportXConfig(options) {
13
11
  const { vue, importX, typescript } = options.configs;
14
12
  const { overrides } = isEnabled(importX) ? importX : defaultOptions.configs.importX;
15
13
  const importXConfig = {
16
14
  name: "shayanthenerd/import-x",
17
15
  files: [globs.src, vue ? globs.vue : ""],
18
- extends: [
19
- eslintPluginImport.flatConfigs.recommended,
20
- eslintPluginImportX.flatConfigs.recommended,
21
- typescript ? eslintPluginImport.flatConfigs.typescript : {},
22
- typescript ? eslintPluginImportX.flatConfigs.typescript : {}
23
- ],
16
+ extends: [eslintPluginImportX.flatConfigs.recommended, typescript ? eslintPluginImportX.flatConfigs.typescript : {}],
24
17
  plugins: { "unused-imports": eslintPluginUnusedImports },
25
- settings: {
26
- "import/resolver": { typescript: true },
27
- "import/extensions": [
28
- ".js",
29
- ".cjs",
30
- ".mjs",
31
- ".jsx",
32
- ".ts",
33
- ".cts",
34
- ".mts",
35
- ".tsx",
36
- ".vue"
37
- ]
38
- },
39
18
  rules: getImportXRules(options)
40
19
  };
41
20
  return mergeConfigs(importXConfig, overrides);
@@ -2,7 +2,6 @@ import { globs } from "../utils/globs.js";
2
2
  import { isEnabled } from "../utils/isEnabled.js";
3
3
  import { getJavaScriptRules } from "../rules/javascript.js";
4
4
  import { getVitestRules } from "../rules/vitest.js";
5
- import { getImportXRules } from "../rules/importX.js";
6
5
  import { getPlaywrightRules } from "../rules/playwright.js";
7
6
  import { getTypeScriptRules } from "../rules/typescript.js";
8
7
  import typescriptESLint from "typescript-eslint";
@@ -12,9 +11,8 @@ import eslintPluginPlaywright from "eslint-plugin-playwright";
12
11
 
13
12
  //#region src/configs/oxlintOverrides.ts
14
13
  function getOXLintOverridesConfig(options) {
15
- const { vue, importX, typescript, test: { vitest, playwright } } = options.configs;
14
+ const { vue, typescript, test: { vitest, playwright } } = options.configs;
16
15
  const vitestRules = getVitestRules(options);
17
- const importXRules = getImportXRules(options);
18
16
  const javascriptRules = getJavaScriptRules(options);
19
17
  const typescriptRules = getTypeScriptRules(options);
20
18
  const playwrightRules = getPlaywrightRules(options);
@@ -22,7 +20,6 @@ function getOXLintOverridesConfig(options) {
22
20
  name: "shayanthenerd/oxlint/overrides",
23
21
  files: [
24
22
  globs.src,
25
- globs.commons,
26
23
  vue ? globs.vue : "",
27
24
  vitest || playwright ? globs.test : ""
28
25
  ],
@@ -36,8 +33,8 @@ function getOXLintOverridesConfig(options) {
36
33
  "max-depth": javascriptRules["max-depth"],
37
34
  "func-style": javascriptRules["func-style"],
38
35
  "max-nested-callbacks": javascriptRules["max-nested-callbacks"],
36
+ "@typescript-eslint/explicit-module-boundary-types": typescriptRules["@typescript-eslint/explicit-module-boundary-types"],
39
37
  "@typescript-eslint/consistent-type-definitions": isEnabled(typescript) ? typescriptRules["@typescript-eslint/consistent-type-definitions"] : "off",
40
- "import-x/extensions": isEnabled(importX) ? importXRules["import-x/extensions"] : "off",
41
38
  "playwright/max-nested-describe": isEnabled(playwright) ? playwrightRules["playwright/max-nested-describe"] : "off",
42
39
  "vitest/consistent-test-it": isEnabled(vitest) ? vitestRules["vitest/consistent-test-it"] : "off",
43
40
  "vitest/max-nested-describe": isEnabled(vitest) ? vitestRules["vitest/max-nested-describe"] : "off"
@@ -0,0 +1,19 @@
1
+ import { globs } from "../utils/globs.js";
2
+
3
+ //#region src/configs/restrictedExports.ts
4
+ function getRestrictedExports() {
5
+ const restrictedExportsConfig = {
6
+ name: "shayanthenerd/restricted-exports",
7
+ files: [globs.restrictedExports],
8
+ rules: { "no-restricted-exports": ["error", { restrictDefaultExports: {
9
+ named: true,
10
+ direct: true,
11
+ namedFrom: true,
12
+ namespaceFrom: true
13
+ } }] }
14
+ };
15
+ return restrictedExportsConfig;
16
+ }
17
+
18
+ //#endregion
19
+ export { getRestrictedExports };
package/dist/index.js CHANGED
@@ -5,7 +5,6 @@ import { getVueConfig } from "./configs/vue.js";
5
5
  import { getBaseConfig } from "./configs/base.js";
6
6
  import { getHTMLConfig } from "./configs/html.js";
7
7
  import { getVitestConfig } from "./configs/vitest.js";
8
- import { getCommonsConfig } from "./configs/commons.js";
9
8
  import { getCypressConfig } from "./configs/cypress.js";
10
9
  import { getImportXConfig } from "./configs/importX.js";
11
10
  import { getTailwindConfig } from "./configs/tailwind.js";
@@ -14,6 +13,7 @@ import { getStylisticConfig } from "./configs/stylistic.js";
14
13
  import { getPlaywrightConfig } from "./configs/playwright.js";
15
14
  import { getTypeScriptConfig } from "./configs/typescript.js";
16
15
  import { getPerfectionistConfig } from "./configs/perfectionist.js";
16
+ import { getRestrictedExports } from "./configs/restrictedExports.js";
17
17
  import { getOXLintOverridesConfig } from "./configs/oxlintOverrides.js";
18
18
  import { getIgnorePatterns } from "./utils/ignores/getIgnorePatterns.js";
19
19
  import { mergeWithDefaults } from "./utils/options/mergeWithDefaults.js";
@@ -35,7 +35,7 @@ import path from "node:path";
35
35
  */
36
36
  function defineConfig(options = {}, ...configs) {
37
37
  const mergedOptions = mergeWithDefaults(options);
38
- const { gitignore, global: { rules, ignores, settings, linterOptions }, configs: { vue, css, nuxt, html, oxlint, importX, tailwind, stylistic, typescript, perfectionist, test: { vitest, cypress, storybook, playwright } } } = mergedOptions;
38
+ const { gitignore, global: { rules, ignores, settings, linterOptions }, configs: { vue, css, nuxt, html, oxlint, importX, tailwind, stylistic, typescript, perfectionist, base: { preferNamedExports }, test: { vitest, cypress, storybook, playwright } } } = mergedOptions;
39
39
  const ignorePatterns = getIgnorePatterns({
40
40
  gitignore,
41
41
  patterns: ignores
@@ -46,7 +46,7 @@ function defineConfig(options = {}, ...configs) {
46
46
  linterOptions,
47
47
  settings,
48
48
  rules
49
- }, globalIgnores(ignorePatterns, "shayanthenerd/ignores"), getBaseConfig(mergedOptions), getCommonsConfig(mergedOptions), isEnabled(importX) ? getImportXConfig(mergedOptions) : {}, isEnabled(stylistic) ? getStylisticConfig(mergedOptions) : {}, isEnabled(perfectionist) ? getPerfectionistConfig(mergedOptions) : {}, isEnabled(typescript) ? getTypeScriptConfig(mergedOptions) : {}, isEnabled(html) ? getHTMLConfig(mergedOptions) : {}, isEnabled(css) ? getCSSConfig(mergedOptions) : {}, isEnabled(tailwind) ? getTailwindConfig(mergedOptions) : {}, isEnabled(vue) ? getVueConfig(mergedOptions) : {}, isEnabled(vue) ? getVueComponentNamesConfig() : {}, isEnabled(vue) && isEnabled(nuxt) ? getNuxtMultiRootTemplateConfig() : {}, isEnabled(storybook) ? getStorybookConfig(mergedOptions) : {}, isEnabled(vitest) ? getVitestConfig(mergedOptions) : {}, isEnabled(playwright) ? getPlaywrightConfig(mergedOptions) : {}, isEnabled(cypress) ? getCypressConfig(mergedOptions) : {}, ...oxlint ? eslintPluginOXLint.buildFromOxlintConfigFile(oxlintConfigPath) : [], oxlint ? getOXLintOverridesConfig(mergedOptions) : {}, ...configs);
49
+ }, globalIgnores(ignorePatterns, "shayanthenerd/ignores"), getBaseConfig(mergedOptions), preferNamedExports ? getRestrictedExports() : {}, isEnabled(importX) ? getImportXConfig(mergedOptions) : {}, isEnabled(stylistic) ? getStylisticConfig(mergedOptions) : {}, isEnabled(perfectionist) ? getPerfectionistConfig(mergedOptions) : {}, isEnabled(typescript) ? getTypeScriptConfig(mergedOptions) : {}, isEnabled(html) ? getHTMLConfig(mergedOptions) : {}, isEnabled(css) ? getCSSConfig(mergedOptions) : {}, isEnabled(tailwind) ? getTailwindConfig(mergedOptions) : {}, isEnabled(vue) ? getVueConfig(mergedOptions) : {}, isEnabled(vue) ? getVueComponentNamesConfig() : {}, isEnabled(vue) && isEnabled(nuxt) ? getNuxtMultiRootTemplateConfig() : {}, isEnabled(storybook) ? getStorybookConfig(mergedOptions) : {}, isEnabled(vitest) ? getVitestConfig(mergedOptions) : {}, isEnabled(playwright) ? getPlaywrightConfig(mergedOptions) : {}, isEnabled(cypress) ? getCypressConfig(mergedOptions) : {}, ...oxlint ? eslintPluginOXLint.buildFromOxlintConfigFile(oxlintConfigPath) : [], oxlint ? getOXLintOverridesConfig(mergedOptions) : {}, ...configs);
50
50
  return eslintConfig;
51
51
  }
52
52
 
@@ -66,9 +66,11 @@
66
66
  /*** TypeScript ***/
67
67
  "typescript/triple-slash-reference": "off",
68
68
  "typescript/explicit-function-return-type": "off",
69
+ "typescript/explicit-module-boundary-types": "off",
69
70
  "typescript/consistent-indexed-object-style": ["warn", "record"],
70
71
 
71
72
  /*** Import ***/
73
+ "import/extensions": "off",
72
74
  "import/unambiguous": "off",
73
75
  "import/no-namespace": "off",
74
76
  "import/exports-last": "off",
@@ -99,7 +101,6 @@
99
101
  "eslint/func-style": "off",
100
102
  "eslint/max-nested-callbacks": "off",
101
103
  "typescript/consistent-type-definitions": "off",
102
- "import/extensions": "off",
103
104
  "vitest/consistent-test-it": "off",
104
105
  "jest/max-nested-describe": "off"
105
106
  },
@@ -110,14 +111,6 @@
110
111
  "rules": {
111
112
  "eslint/no-undef": "off"
112
113
  }
113
- },
114
- {
115
- "files": [
116
- "**/{shared,dto,dtos,model,models,helper,helpers,module,modules,@type,@types,types,util,utils,utilities,composable,composables,repo,repos,repository,repositories}/**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx}"
117
- ],
118
- "rules": {
119
- "typescript/explicit-function-return-type": "error"
120
- }
121
114
  }
122
115
  ],
123
116
 
@@ -4,22 +4,13 @@ import path from "node:path";
4
4
 
5
5
  //#region src/rules/importX.ts
6
6
  function getImportXRules(options) {
7
- const { packageDir, configs: { importX } } = options;
8
- const { removeUnusedImports, requireFileExtension } = isEnabled(importX) ? importX : defaultOptions.configs.importX;
7
+ const { packageDir, configs: { importX, typescript } } = options;
8
+ const { removeUnusedImports } = isEnabled(importX) ? importX : defaultOptions.configs.importX;
9
9
  const importXRules = {
10
10
  "unused-imports/no-unused-imports": removeUnusedImports ? "warn" : "off",
11
- "import-x/extensions": "off",
12
- "import/extensions": [
13
- requireFileExtension ? "warn" : "off",
14
- "always",
15
- {
16
- ignorePackages: true,
17
- checkTypeImports: true
18
- }
19
- ],
20
11
  "import-x/no-amd": "error",
21
- "import-x/exports-last": "warn",
22
12
  "import-x/no-commonjs": "error",
13
+ "import-x/exports-last": "warn",
23
14
  "import-x/no-deprecated": "warn",
24
15
  "import-x/group-exports": "warn",
25
16
  "import-x/no-self-import": "error",
@@ -27,11 +18,15 @@ function getImportXRules(options) {
27
18
  "import-x/no-named-default": "error",
28
19
  "import-x/no-mutable-exports": "error",
29
20
  "import-x/no-empty-named-blocks": "error",
30
- "import-x/no-named-as-default-member": "off",
31
21
  "import-x/no-import-module-exports": "error",
32
22
  "import-x/no-useless-path-segments": "error",
23
+ "import-x/no-named-as-default-member": "off",
24
+ "import-x/named": typescript ? "off" : "error",
25
+ "import-x/export": typescript ? "off" : "error",
26
+ "import-x/default": typescript ? "off" : "error",
33
27
  "import-x/consistent-type-specifier-style": "warn",
34
28
  "import-x/first": ["warn", "disable-absolute-first"],
29
+ "import-x/no-unresolved": typescript ? "off" : "error",
35
30
  "import-x/namespace": ["error", { allowComputed: true }],
36
31
  "import-x/no-duplicates": ["error", { considerQueryString: true }],
37
32
  "import-x/no-cycle": ["error", {
@@ -8,7 +8,6 @@ function getTailwindRules(options) {
8
8
  const { indent, useTabs, maxLineLength } = isEnabled(stylistic) ? stylistic : defaultOptions.configs.stylistic;
9
9
  const isTailwindV4 = isEnabled(tailwind) && tailwind.entryPoint;
10
10
  const tailwindRules = {
11
- "vue/max-len": "off",
12
11
  "@stylistic/max-len": "off",
13
12
  "css/no-duplicate-imports": "off",
14
13
  "better-tailwindcss/no-duplicate-classes": "error",
@@ -22,6 +22,7 @@ function getTypeScriptRules(options) {
22
22
  "@typescript-eslint/prefer-enum-initializers": "error",
23
23
  "@typescript-eslint/no-unnecessary-qualifier": "error",
24
24
  "@typescript-eslint/switch-exhaustiveness-check": "warn",
25
+ "@typescript-eslint/explicit-module-boundary-types": "warn",
25
26
  "@typescript-eslint/no-unnecessary-parameter-property-assignment": "warn",
26
27
  "@typescript-eslint/method-signature-style": ["error", methodSignatureStyle],
27
28
  "@typescript-eslint/consistent-type-definitions": ["warn", typeDefinitionStyle],
package/dist/rules/vue.js CHANGED
@@ -5,9 +5,9 @@ import { getRestrictedVueElements } from "../utils/vue/getRestrictedVueElements.
5
5
 
6
6
  //#region src/rules/vue.ts
7
7
  function getVueRules(options) {
8
- const { typescript, stylistic, vue, nuxt } = options.configs;
8
+ const { typescript, stylistic, tailwind, vue, nuxt } = options.configs;
9
9
  const { indent, useTabs, trailingComma, maxLineLength, maxAttributesPerLine, maxConsecutiveEmptyLines, selfCloseVoidHTMLElements } = isEnabled(stylistic) ? stylistic : defaultOptions.configs.stylistic;
10
- const { blockLang, blocksOrder, macrosOrder, attributesOrder, vOnHandlerStyle, destructureProps, vForDelimiterStyle, attributeHyphenation, allowedStyleAttributes, preferVBindTrueShorthand, componentNameCaseInTemplate, preferVBindSameNameShorthand, restrictedElements: userRestrictedElements, ignoredUndefinedComponents: userIgnoredUndefinedComponents, restrictedStaticAttributes: userRestrictedStaticAttributes } = isEnabled(vue) ? vue : defaultOptions.configs.vue;
10
+ const { blockLang, blocksOrder, macrosOrder, attributesOrder, destructureProps, vForDelimiterStyle, attributeHyphenation, allowedStyleAttributes, preferVBindTrueShorthand, componentNameCaseInTemplate, preferVBindSameNameShorthand, restrictedElements: userRestrictedElements, ignoredUndefinedComponents: userIgnoredUndefinedComponents, restrictedStaticAttributes: userRestrictedStaticAttributes } = isEnabled(vue) ? vue : defaultOptions.configs.vue;
11
11
  const nuxtImage = isEnabled(nuxt) ? nuxt.image : void 0;
12
12
  const nuxtUI = isEnabled(nuxt) ? nuxt.ui : void 0;
13
13
  const nuxtUIPrefix = isEnabled(nuxt) && isEnabled(nuxt.ui) ? nuxt.ui.prefix : void 0;
@@ -17,6 +17,7 @@ function getVueRules(options) {
17
17
  "no-undef": "off",
18
18
  "no-useless-assignment": "off",
19
19
  "import-x/default": "off",
20
+ "import-x/no-unresolved": "off",
20
21
  "vue/comment-directive": ["error", { reportUnusedDisableDirectives: true }],
21
22
  "vue/html-closing-bracket-newline": "warn",
22
23
  "vue/singleline-html-element-content-newline": "off",
@@ -73,7 +74,6 @@ function getVueRules(options) {
73
74
  "vue/prefer-prop-type-boolean-first": "warn",
74
75
  "vue/no-setup-props-reactivity-loss": "error",
75
76
  "vue/block-order": ["warn", { order: blocksOrder }],
76
- "vue/v-on-handler-style": ["error", vOnHandlerStyle],
77
77
  "vue/v-for-delimiter-style": ["warn", vForDelimiterStyle],
78
78
  "vue/require-typed-ref": isScriptLangTS ? "error" : "off",
79
79
  "vue/define-macros-order": ["warn", { order: macrosOrder }],
@@ -86,7 +86,7 @@ function getVueRules(options) {
86
86
  "vue/define-props-destructuring": ["warn", { destructure: destructureProps }],
87
87
  "vue/define-emits-declaration": ["warn", isScriptLangTS ? "type-based" : "runtime"],
88
88
  "vue/define-props-declaration": ["error", isScriptLangTS ? "type-based" : "runtime"],
89
- "vue/max-len": ["warn", {
89
+ "vue/max-len": [tailwind ? "off" : "warn", {
90
90
  tabWidth: indent,
91
91
  code: maxLineLength,
92
92
  template: Infinity,
@@ -161,7 +161,10 @@ function getVueRules(options) {
161
161
  "vue/component-name-in-template-casing": [
162
162
  "warn",
163
163
  componentNameCaseInTemplate,
164
- { registeredComponentsOnly: false }
164
+ {
165
+ ignores: ["*.*"],
166
+ registeredComponentsOnly: false
167
+ }
165
168
  ]
166
169
  };
167
170
  return vueRules;
@@ -17,7 +17,15 @@ interface BaseOptions extends ConfigWithOverrides {
17
17
  functionStyle?: RuleOptions<'func-style'>;
18
18
 
19
19
  /**
20
- * Prefer named exports instead of default exports.
20
+ * Enforce named exports in the following directories:
21
+ * - 'shared'
22
+ * - 'dto', 'dtos'
23
+ * - 'model', 'models'
24
+ * - 'helper', 'helpers'
25
+ * - 'module', 'modules'
26
+ * - 'util', 'utils', 'utilities'
27
+ * - 'composable', 'composables'
28
+ * - 'repo', 'repos', 'repository', 'repositories'
21
29
  *
22
30
  * @default true
23
31
  *
@@ -1,7 +1,6 @@
1
1
  import { ConfigWithOverrides } from "../index.js";
2
2
 
3
3
  //#region src/types/configOptions/importX.d.ts
4
-
5
4
  interface ImportXOptions extends ConfigWithOverrides {
6
5
  /**
7
6
  * Automatically remove unused imports.
@@ -11,19 +10,6 @@ interface ImportXOptions extends ConfigWithOverrides {
11
10
  * @see [unused-imports/no-unused-imports](https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-imports.md)
12
11
  */
13
12
  removeUnusedImports?: boolean;
14
-
15
- /**
16
- * Require file extensions within the import path.
17
- *
18
- * Imports from third-party packages are ignored.
19
- *
20
- * `import-x/extensions` rule is currently broken, so `import/extensions` is used as a temporary replacement.
21
- *
22
- * @default true
23
- *
24
- * @see [import/extensions](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/extensions.md)
25
- */
26
- requireFileExtension?: boolean;
27
13
  }
28
14
  //#endregion
29
15
  export { type ImportXOptions };
@@ -144,6 +144,8 @@ interface VueOptions extends ConfigWithOverrides {
144
144
  /**
145
145
  * Enforce consistent casing for component names in `<template>` blocks.
146
146
  *
147
+ * Compound components (e.g., `<motion.div>`) are ignored by default.
148
+ *
147
149
  * @default 'PascalCase'
148
150
  *
149
151
  * @see [vue/component-name-in-template-casing](https://eslint.vuejs.org/rules/component-name-in-template-casing)
@@ -159,14 +161,15 @@ interface VueOptions extends ConfigWithOverrides {
159
161
  */
160
162
  vForDelimiterStyle?: RuleOptions<'vue/v-for-delimiter-style'>;
161
163
 
162
- /**
163
- * Enforce a consistent handler style in `v-on` directives.
164
- *
165
- * @default ['method', 'inline-function']
166
- *
167
- * @see [vue/v-on-handler-style](https://eslint.vuejs.org/rules/v-on-handler-style)
168
- */
169
- vOnHandlerStyle?: RuleOptions<'vue/v-on-handler-style'>;
164
+ /* https://github.com/vuejs/eslint-plugin-vue/issues/2571 */
165
+ // /**
166
+ // * Enforce a consistent handler style in `v-on` directives.
167
+ // *
168
+ // * @default ['method', 'inline-function']
169
+ // *
170
+ // * @see [vue/v-on-handler-style](https://eslint.vuejs.org/rules/v-on-handler-style)
171
+ // */
172
+ // vOnHandlerStyle?: RuleOptions<'vue/v-on-handler-style'>,
170
173
 
171
174
  /**
172
175
  * Disallow certain elements and components.
@@ -15,10 +15,8 @@ declare module 'eslint-flat-config-utils' {
15
15
  'shayanthenerd/ignores'?: true;
16
16
  'shayanthenerd/base'?: true;
17
17
  'shayanthenerd/base'?: true;
18
- 'shayanthenerd/commons'?: true;
19
- 'shayanthenerd/import-x__import/recommended'?: true;
18
+ 'shayanthenerd/restricted-exports'?: true;
20
19
  'shayanthenerd/import-x__import-x/recommended'?: true;
21
- 'shayanthenerd/import-x__import/typescript'?: true;
22
20
  'shayanthenerd/import-x__import-x/typescript'?: true;
23
21
  'shayanthenerd/import-x'?: true;
24
22
  'shayanthenerd/stylistic'?: true;
@@ -59,7 +57,6 @@ declare module 'eslint-flat-config-utils' {
59
57
  'oxlint/from-oxlint-config'?: true;
60
58
  'oxlint/vue-svelte-exceptions'?: true;
61
59
  'oxlint/from-oxlint-config-override-0'?: true;
62
- 'oxlint/from-oxlint-config-override-1'?: true;
63
60
  'shayanthenerd/oxlint/overrides'?: true;
64
61
  }
65
62
  }
@@ -2151,236 +2148,6 @@ interface ESLintSchema {
2151
2148
  * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/unambiguous.md
2152
2149
  */
2153
2150
  'import-x/unambiguous'?: Linter.RuleEntry<[]>;
2154
- /**
2155
- * Enforce or ban the use of inline type-only markers for named imports.
2156
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/consistent-type-specifier-style.md
2157
- */
2158
- 'import/consistent-type-specifier-style'?: Linter.RuleEntry<ImportConsistentTypeSpecifierStyle>;
2159
- /**
2160
- * Ensure a default export is present, given a default import.
2161
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/default.md
2162
- */
2163
- 'import/default'?: Linter.RuleEntry<[]>;
2164
- /**
2165
- * Enforce a leading comment with the webpackChunkName for dynamic imports.
2166
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/dynamic-import-chunkname.md
2167
- */
2168
- 'import/dynamic-import-chunkname'?: Linter.RuleEntry<ImportDynamicImportChunkname>;
2169
- /**
2170
- * Enforce either using, or omitting, the `node:` protocol when importing Node.js builtin modules.
2171
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/enforce-node-protocol-usage.md
2172
- */
2173
- 'import/enforce-node-protocol-usage'?: Linter.RuleEntry<ImportEnforceNodeProtocolUsage>;
2174
- /**
2175
- * Forbid any invalid exports, i.e. re-export of the same name.
2176
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/export.md
2177
- */
2178
- 'import/export'?: Linter.RuleEntry<[]>;
2179
- /**
2180
- * Ensure all exports appear after other statements.
2181
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/exports-last.md
2182
- */
2183
- 'import/exports-last'?: Linter.RuleEntry<[]>;
2184
- /**
2185
- * Ensure consistent use of file extension within the import path.
2186
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/extensions.md
2187
- */
2188
- 'import/extensions'?: Linter.RuleEntry<ImportExtensions>;
2189
- /**
2190
- * Ensure all imports appear before other statements.
2191
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/first.md
2192
- */
2193
- 'import/first'?: Linter.RuleEntry<ImportFirst>;
2194
- /**
2195
- * Prefer named exports to be grouped together in a single export declaration
2196
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/group-exports.md
2197
- */
2198
- 'import/group-exports'?: Linter.RuleEntry<[]>;
2199
- /**
2200
- * Replaced by `import/first`.
2201
- * @see https://github.com/import-js/eslint-plugin-import/blob/7b25c1cb95ee18acc1531002fd343e1e6031f9ed/docs/rules/imports-first.md
2202
- * @deprecated
2203
- */
2204
- 'import/imports-first'?: Linter.RuleEntry<ImportImportsFirst>;
2205
- /**
2206
- * Enforce the maximum number of dependencies a module can have.
2207
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/max-dependencies.md
2208
- */
2209
- 'import/max-dependencies'?: Linter.RuleEntry<ImportMaxDependencies>;
2210
- /**
2211
- * Ensure named imports correspond to a named export in the remote file.
2212
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/named.md
2213
- */
2214
- 'import/named'?: Linter.RuleEntry<ImportNamed>;
2215
- /**
2216
- * Ensure imported namespaces contain dereferenced properties as they are dereferenced.
2217
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/namespace.md
2218
- */
2219
- 'import/namespace'?: Linter.RuleEntry<ImportNamespace>;
2220
- /**
2221
- * Enforce a newline after import statements.
2222
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/newline-after-import.md
2223
- */
2224
- 'import/newline-after-import'?: Linter.RuleEntry<ImportNewlineAfterImport>;
2225
- /**
2226
- * Forbid import of modules using absolute paths.
2227
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-absolute-path.md
2228
- */
2229
- 'import/no-absolute-path'?: Linter.RuleEntry<ImportNoAbsolutePath>;
2230
- /**
2231
- * Forbid AMD `require` and `define` calls.
2232
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-amd.md
2233
- */
2234
- 'import/no-amd'?: Linter.RuleEntry<[]>;
2235
- /**
2236
- * Forbid anonymous values as default exports.
2237
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-anonymous-default-export.md
2238
- */
2239
- 'import/no-anonymous-default-export'?: Linter.RuleEntry<ImportNoAnonymousDefaultExport>;
2240
- /**
2241
- * Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
2242
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-commonjs.md
2243
- */
2244
- 'import/no-commonjs'?: Linter.RuleEntry<ImportNoCommonjs>;
2245
- /**
2246
- * Forbid a module from importing a module with a dependency path back to itself.
2247
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-cycle.md
2248
- */
2249
- 'import/no-cycle'?: Linter.RuleEntry<ImportNoCycle>;
2250
- /**
2251
- * Forbid default exports.
2252
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-default-export.md
2253
- */
2254
- 'import/no-default-export'?: Linter.RuleEntry<[]>;
2255
- /**
2256
- * Forbid imported names marked with `@deprecated` documentation tag.
2257
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-deprecated.md
2258
- */
2259
- 'import/no-deprecated'?: Linter.RuleEntry<[]>;
2260
- /**
2261
- * Forbid repeated import of the same module in multiple places.
2262
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-duplicates.md
2263
- */
2264
- 'import/no-duplicates'?: Linter.RuleEntry<ImportNoDuplicates>;
2265
- /**
2266
- * Forbid `require()` calls with expressions.
2267
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-dynamic-require.md
2268
- */
2269
- 'import/no-dynamic-require'?: Linter.RuleEntry<ImportNoDynamicRequire>;
2270
- /**
2271
- * Forbid empty named import blocks.
2272
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-empty-named-blocks.md
2273
- */
2274
- 'import/no-empty-named-blocks'?: Linter.RuleEntry<[]>;
2275
- /**
2276
- * Forbid the use of extraneous packages.
2277
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-extraneous-dependencies.md
2278
- */
2279
- 'import/no-extraneous-dependencies'?: Linter.RuleEntry<ImportNoExtraneousDependencies>;
2280
- /**
2281
- * Forbid import statements with CommonJS module.exports.
2282
- */
2283
- 'import/no-import-module-exports'?: Linter.RuleEntry<ImportNoImportModuleExports>;
2284
- /**
2285
- * Forbid importing the submodules of other modules.
2286
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-internal-modules.md
2287
- */
2288
- 'import/no-internal-modules'?: Linter.RuleEntry<ImportNoInternalModules>;
2289
- /**
2290
- * Forbid the use of mutable exports with `var` or `let`.
2291
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-mutable-exports.md
2292
- */
2293
- 'import/no-mutable-exports'?: Linter.RuleEntry<[]>;
2294
- /**
2295
- * Forbid use of exported name as identifier of default export.
2296
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-named-as-default.md
2297
- */
2298
- 'import/no-named-as-default'?: Linter.RuleEntry<[]>;
2299
- /**
2300
- * Forbid use of exported name as property of default export.
2301
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-named-as-default-member.md
2302
- */
2303
- 'import/no-named-as-default-member'?: Linter.RuleEntry<[]>;
2304
- /**
2305
- * Forbid named default exports.
2306
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-named-default.md
2307
- */
2308
- 'import/no-named-default'?: Linter.RuleEntry<[]>;
2309
- /**
2310
- * Forbid named exports.
2311
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-named-export.md
2312
- */
2313
- 'import/no-named-export'?: Linter.RuleEntry<[]>;
2314
- /**
2315
- * Forbid namespace (a.k.a. "wildcard" `*`) imports.
2316
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-namespace.md
2317
- */
2318
- 'import/no-namespace'?: Linter.RuleEntry<ImportNoNamespace>;
2319
- /**
2320
- * Forbid Node.js builtin modules.
2321
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-nodejs-modules.md
2322
- */
2323
- 'import/no-nodejs-modules'?: Linter.RuleEntry<ImportNoNodejsModules>;
2324
- /**
2325
- * Forbid importing packages through relative paths.
2326
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-relative-packages.md
2327
- */
2328
- 'import/no-relative-packages'?: Linter.RuleEntry<ImportNoRelativePackages>;
2329
- /**
2330
- * Forbid importing modules from parent directories.
2331
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-relative-parent-imports.md
2332
- */
2333
- 'import/no-relative-parent-imports'?: Linter.RuleEntry<ImportNoRelativeParentImports>;
2334
- /**
2335
- * Enforce which files can be imported in a given folder.
2336
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-restricted-paths.md
2337
- */
2338
- 'import/no-restricted-paths'?: Linter.RuleEntry<ImportNoRestrictedPaths>;
2339
- /**
2340
- * Forbid a module from importing itself.
2341
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-self-import.md
2342
- */
2343
- 'import/no-self-import'?: Linter.RuleEntry<[]>;
2344
- /**
2345
- * Forbid unassigned imports
2346
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-unassigned-import.md
2347
- */
2348
- 'import/no-unassigned-import'?: Linter.RuleEntry<ImportNoUnassignedImport>;
2349
- /**
2350
- * Ensure imports point to a file/module that can be resolved.
2351
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-unresolved.md
2352
- */
2353
- 'import/no-unresolved'?: Linter.RuleEntry<ImportNoUnresolved>;
2354
- /**
2355
- * Forbid modules without exports, or exports without matching import in another module.
2356
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-unused-modules.md
2357
- */
2358
- 'import/no-unused-modules'?: Linter.RuleEntry<ImportNoUnusedModules>;
2359
- /**
2360
- * Forbid unnecessary path segments in import and require statements.
2361
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-useless-path-segments.md
2362
- */
2363
- 'import/no-useless-path-segments'?: Linter.RuleEntry<ImportNoUselessPathSegments>;
2364
- /**
2365
- * Forbid webpack loader syntax in imports.
2366
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-webpack-loader-syntax.md
2367
- */
2368
- 'import/no-webpack-loader-syntax'?: Linter.RuleEntry<[]>;
2369
- /**
2370
- * Enforce a convention in module import order.
2371
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/order.md
2372
- */
2373
- 'import/order'?: Linter.RuleEntry<ImportOrder>;
2374
- /**
2375
- * Prefer a default export if module exports a single name or multiple names.
2376
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/prefer-default-export.md
2377
- */
2378
- 'import/prefer-default-export'?: Linter.RuleEntry<ImportPreferDefaultExport>;
2379
- /**
2380
- * Forbid potentially ambiguous parse goal (`script` vs. `module`).
2381
- * @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/unambiguous.md
2382
- */
2383
- 'import/unambiguous'?: Linter.RuleEntry<[]>;
2384
2151
  /**
2385
2152
  * Enforce consistent indentation
2386
2153
  * @see https://eslint.org/docs/latest/rules/indent
@@ -3624,7 +3391,7 @@ interface ESLintSchema {
3624
3391
  */
3625
3392
  'playwright/no-standalone-expect'?: Linter.RuleEntry<[]>;
3626
3393
  /**
3627
- * Prevent unsafe variable references in page.evaluate()
3394
+ * Prevent unsafe variable references in page.evaluate() and page.addInitScript()
3628
3395
  * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-unsafe-references.md
3629
3396
  */
3630
3397
  'playwright/no-unsafe-references'?: Linter.RuleEntry<[]>;
@@ -3638,6 +3405,11 @@ interface ESLintSchema {
3638
3405
  * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-useless-not.md
3639
3406
  */
3640
3407
  'playwright/no-useless-not'?: Linter.RuleEntry<[]>;
3408
+ /**
3409
+ * Prevent usage of page.waitForNavigation()
3410
+ * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-wait-for-navigation.md
3411
+ */
3412
+ 'playwright/no-wait-for-navigation'?: Linter.RuleEntry<[]>;
3641
3413
  /**
3642
3414
  * Prevent usage of page.waitForSelector()
3643
3415
  * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/no-wait-for-selector.md
@@ -3748,6 +3520,10 @@ interface ESLintSchema {
3748
3520
  * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/valid-expect-in-promise.md
3749
3521
  */
3750
3522
  'playwright/valid-expect-in-promise'?: Linter.RuleEntry<[]>;
3523
+ /**
3524
+ * Enforce valid tag format in Playwright test blocks
3525
+ */
3526
+ 'playwright/valid-test-tags'?: Linter.RuleEntry<PlaywrightValidTestTags>;
3751
3527
  /**
3752
3528
  * Enforce valid titles
3753
3529
  * @see https://github.com/playwright-community/eslint-plugin-playwright/tree/main/docs/rules/valid-title.md
@@ -9030,244 +8806,6 @@ type ImportXPreferDefaultExport = [] | [{
9030
8806
  type ImportXPreferNamespaceImport = [] | [{
9031
8807
  patterns?: string[];
9032
8808
  }];
9033
- // ----- import/consistent-type-specifier-style -----
9034
- type ImportConsistentTypeSpecifierStyle = [] | [("prefer-inline" | "prefer-top-level")];
9035
- // ----- import/dynamic-import-chunkname -----
9036
- type ImportDynamicImportChunkname = [] | [{
9037
- importFunctions?: string[];
9038
- allowEmpty?: boolean;
9039
- webpackChunknameFormat?: string;
9040
- [k: string]: unknown | undefined;
9041
- }];
9042
- // ----- import/enforce-node-protocol-usage -----
9043
- type ImportEnforceNodeProtocolUsage = [("always" | "never")];
9044
- // ----- import/extensions -----
9045
- type ImportExtensions = ([] | [("always" | "ignorePackages" | "never")] | [] | [("always" | "ignorePackages" | "never")] | [("always" | "ignorePackages" | "never"), {
9046
- pattern?: {
9047
- [k: string]: ("always" | "ignorePackages" | "never");
9048
- };
9049
- checkTypeImports?: boolean;
9050
- ignorePackages?: boolean;
9051
- pathGroupOverrides?: {
9052
- pattern: string;
9053
- patternOptions?: {
9054
- [k: string]: unknown | undefined;
9055
- };
9056
- action: ("enforce" | "ignore");
9057
- }[];
9058
- [k: string]: unknown | undefined;
9059
- }] | [] | [{
9060
- pattern?: {
9061
- [k: string]: ("always" | "ignorePackages" | "never");
9062
- };
9063
- checkTypeImports?: boolean;
9064
- ignorePackages?: boolean;
9065
- pathGroupOverrides?: {
9066
- pattern: string;
9067
- patternOptions?: {
9068
- [k: string]: unknown | undefined;
9069
- };
9070
- action: ("enforce" | "ignore");
9071
- }[];
9072
- [k: string]: unknown | undefined;
9073
- }] | [] | [{
9074
- [k: string]: ("always" | "ignorePackages" | "never");
9075
- }] | [] | [("always" | "ignorePackages" | "never")] | [("always" | "ignorePackages" | "never"), {
9076
- [k: string]: ("always" | "ignorePackages" | "never");
9077
- }]);
9078
- // ----- import/first -----
9079
- type ImportFirst = [] | [("absolute-first" | "disable-absolute-first")];
9080
- // ----- import/imports-first -----
9081
- type ImportImportsFirst = [] | [("absolute-first" | "disable-absolute-first")];
9082
- // ----- import/max-dependencies -----
9083
- type ImportMaxDependencies = [] | [{
9084
- max?: number;
9085
- ignoreTypeImports?: boolean;
9086
- }];
9087
- // ----- import/named -----
9088
- type ImportNamed = [] | [{
9089
- commonjs?: boolean;
9090
- }];
9091
- // ----- import/namespace -----
9092
- type ImportNamespace = [] | [{
9093
- allowComputed?: boolean;
9094
- }];
9095
- // ----- import/newline-after-import -----
9096
- type ImportNewlineAfterImport = [] | [{
9097
- count?: number;
9098
- exactCount?: boolean;
9099
- considerComments?: boolean;
9100
- }];
9101
- // ----- import/no-absolute-path -----
9102
- type ImportNoAbsolutePath = [] | [{
9103
- commonjs?: boolean;
9104
- amd?: boolean;
9105
- esmodule?: boolean;
9106
- ignore?: [string, ...(string)[]];
9107
- }];
9108
- // ----- import/no-anonymous-default-export -----
9109
- type ImportNoAnonymousDefaultExport = [] | [{
9110
- allowArray?: boolean;
9111
- allowArrowFunction?: boolean;
9112
- allowCallExpression?: boolean;
9113
- allowAnonymousClass?: boolean;
9114
- allowAnonymousFunction?: boolean;
9115
- allowLiteral?: boolean;
9116
- allowObject?: boolean;
9117
- allowNew?: boolean;
9118
- }];
9119
- // ----- import/no-commonjs -----
9120
- type ImportNoCommonjs = ([] | ["allow-primitive-modules"] | [] | [{
9121
- allowPrimitiveModules?: boolean;
9122
- allowRequire?: boolean;
9123
- allowConditionalRequire?: boolean;
9124
- }]);
9125
- // ----- import/no-cycle -----
9126
- type ImportNoCycle = [] | [{
9127
- commonjs?: boolean;
9128
- amd?: boolean;
9129
- esmodule?: boolean;
9130
- ignore?: [string, ...(string)[]];
9131
- maxDepth?: (number | "∞");
9132
- ignoreExternal?: boolean;
9133
- allowUnsafeDynamicCyclicDependency?: boolean;
9134
- disableScc?: boolean;
9135
- }];
9136
- // ----- import/no-duplicates -----
9137
- type ImportNoDuplicates = [] | [{
9138
- considerQueryString?: boolean;
9139
- "prefer-inline"?: boolean;
9140
- }];
9141
- // ----- import/no-dynamic-require -----
9142
- type ImportNoDynamicRequire = [] | [{
9143
- esmodule?: boolean;
9144
- }];
9145
- // ----- import/no-extraneous-dependencies -----
9146
- type ImportNoExtraneousDependencies = [] | [{
9147
- devDependencies?: (boolean | unknown[]);
9148
- optionalDependencies?: (boolean | unknown[]);
9149
- peerDependencies?: (boolean | unknown[]);
9150
- bundledDependencies?: (boolean | unknown[]);
9151
- packageDir?: (string | unknown[]);
9152
- includeInternal?: boolean;
9153
- includeTypes?: boolean;
9154
- }];
9155
- // ----- import/no-import-module-exports -----
9156
- type ImportNoImportModuleExports = [] | [{
9157
- exceptions?: unknown[];
9158
- }];
9159
- // ----- import/no-internal-modules -----
9160
- type ImportNoInternalModules = [] | [({
9161
- allow?: string[];
9162
- } | {
9163
- forbid?: string[];
9164
- })];
9165
- // ----- import/no-namespace -----
9166
- type ImportNoNamespace = [] | [{
9167
- ignore?: string[];
9168
- [k: string]: unknown | undefined;
9169
- }];
9170
- // ----- import/no-nodejs-modules -----
9171
- type ImportNoNodejsModules = [] | [{
9172
- allow?: string[];
9173
- }];
9174
- // ----- import/no-relative-packages -----
9175
- type ImportNoRelativePackages = [] | [{
9176
- commonjs?: boolean;
9177
- amd?: boolean;
9178
- esmodule?: boolean;
9179
- ignore?: [string, ...(string)[]];
9180
- }];
9181
- // ----- import/no-relative-parent-imports -----
9182
- type ImportNoRelativeParentImports = [] | [{
9183
- commonjs?: boolean;
9184
- amd?: boolean;
9185
- esmodule?: boolean;
9186
- ignore?: [string, ...(string)[]];
9187
- }];
9188
- // ----- import/no-restricted-paths -----
9189
- type ImportNoRestrictedPaths = [] | [{
9190
- zones?: [{
9191
- target?: (string | string[]);
9192
- from?: (string | string[]);
9193
- except?: string[];
9194
- message?: string;
9195
- }, ...({
9196
- target?: (string | string[]);
9197
- from?: (string | string[]);
9198
- except?: string[];
9199
- message?: string;
9200
- })[]];
9201
- basePath?: string;
9202
- }];
9203
- // ----- import/no-unassigned-import -----
9204
- type ImportNoUnassignedImport = [] | [{
9205
- devDependencies?: (boolean | unknown[]);
9206
- optionalDependencies?: (boolean | unknown[]);
9207
- peerDependencies?: (boolean | unknown[]);
9208
- allow?: string[];
9209
- }];
9210
- // ----- import/no-unresolved -----
9211
- type ImportNoUnresolved = [] | [{
9212
- commonjs?: boolean;
9213
- amd?: boolean;
9214
- esmodule?: boolean;
9215
- ignore?: [string, ...(string)[]];
9216
- caseSensitive?: boolean;
9217
- caseSensitiveStrict?: boolean;
9218
- }];
9219
- // ----- import/no-unused-modules -----
9220
- type ImportNoUnusedModules = [] | [({
9221
- unusedExports: true;
9222
- src?: {
9223
- [k: string]: unknown | undefined;
9224
- };
9225
- [k: string]: unknown | undefined;
9226
- } | {
9227
- missingExports: true;
9228
- [k: string]: unknown | undefined;
9229
- })];
9230
- // ----- import/no-useless-path-segments -----
9231
- type ImportNoUselessPathSegments = [] | [{
9232
- commonjs?: boolean;
9233
- noUselessIndex?: boolean;
9234
- }];
9235
- // ----- import/order -----
9236
- type ImportOrder = [] | [{
9237
- groups?: (("builtin" | "external" | "internal" | "unknown" | "parent" | "sibling" | "index" | "object" | "type") | ("builtin" | "external" | "internal" | "unknown" | "parent" | "sibling" | "index" | "object" | "type")[])[];
9238
- pathGroupsExcludedImportTypes?: unknown[];
9239
- distinctGroup?: boolean;
9240
- pathGroups?: {
9241
- pattern: string;
9242
- patternOptions?: {
9243
- [k: string]: unknown | undefined;
9244
- };
9245
- group: ("builtin" | "external" | "internal" | "unknown" | "parent" | "sibling" | "index" | "object" | "type");
9246
- position?: ("after" | "before");
9247
- }[];
9248
- "newlines-between"?: ("ignore" | "always" | "always-and-inside-groups" | "never");
9249
- "newlines-between-types"?: ("ignore" | "always" | "always-and-inside-groups" | "never");
9250
- consolidateIslands?: ("inside-groups" | "never");
9251
- sortTypesGroup?: boolean;
9252
- named?: (boolean | {
9253
- enabled?: boolean;
9254
- import?: boolean;
9255
- export?: boolean;
9256
- require?: boolean;
9257
- cjsExports?: boolean;
9258
- types?: ("mixed" | "types-first" | "types-last");
9259
- });
9260
- alphabetize?: {
9261
- caseInsensitive?: boolean;
9262
- order?: ("ignore" | "asc" | "desc");
9263
- orderImportKind?: ("ignore" | "asc" | "desc");
9264
- };
9265
- warnOnUnassignedImports?: boolean;
9266
- }];
9267
- // ----- import/prefer-default-export -----
9268
- type ImportPreferDefaultExport = [] | [{
9269
- target?: ("single" | "any");
9270
- }];
9271
8809
  // ----- indent -----
9272
8810
  type Indent = [] | [("tab" | number)] | [("tab" | number), {
9273
8811
  SwitchCase?: number;
@@ -12101,6 +11639,17 @@ type PlaywrightValidExpect = [] | [{
12101
11639
  maxArgs?: number;
12102
11640
  minArgs?: number;
12103
11641
  }];
11642
+ // ----- playwright/valid-test-tags -----
11643
+ type PlaywrightValidTestTags = [] | [{
11644
+ allowedTags?: (string | {
11645
+ source?: string;
11646
+ [k: string]: unknown | undefined;
11647
+ })[];
11648
+ disallowedTags?: (string | {
11649
+ source?: string;
11650
+ [k: string]: unknown | undefined;
11651
+ })[];
11652
+ }];
12104
11653
  // ----- playwright/valid-title -----
12105
11654
  type PlaywrightValidTitle = [] | [{
12106
11655
  disallowedWords?: string[];
@@ -1,13 +1,12 @@
1
1
  //#region src/utils/globs.ts
2
2
  const srcExtensions = "?([mc])[jt]s?(x)";
3
3
  const vueExtensions = `{vue,${srcExtensions}}`;
4
- const commonsFolders = [
4
+ const restrictedExportsFolders = [
5
5
  "shared",
6
6
  "dto?(s)",
7
7
  "model?(s)",
8
8
  "helper?(s)",
9
9
  "module?(s)",
10
- "?(@)type?(s)",
11
10
  "util?(s|ities)",
12
11
  "composable?(s)",
13
12
  "repo?(s|sitory|sitories)"
@@ -17,8 +16,7 @@ const globs = {
17
16
  html: "**/*.html",
18
17
  ts: "**/*.?([mc])ts?(x)",
19
18
  src: `**/*.${srcExtensions}`,
20
- commons: `**/{${commonsFolders.join(",")}}/**/*.${srcExtensions}`,
21
- commonsIgnore: `**/lint-staged.config.${srcExtensions}`,
19
+ restrictedExports: `**/{${restrictedExportsFolders.join(",")}}/**/*.${srcExtensions}`,
22
20
  vue: `**/*.${vueExtensions}`,
23
21
  vueMultiRootTemplate: `**/pages/**/(_|-)components/**/*.${vueExtensions}`,
24
22
  vueComponentNames: `**/{{app,error},{layouts,pages}/**/*}.${vueExtensions}`,
@@ -74,7 +74,6 @@ const defaultOptions = {
74
74
  },
75
75
  importX: {
76
76
  removeUnusedImports: true,
77
- requireFileExtension: true,
78
77
  overrides: {}
79
78
  },
80
79
  perfectionist: {
@@ -143,7 +142,6 @@ const defaultOptions = {
143
142
  destructureProps: "always",
144
143
  componentNameCaseInTemplate: "PascalCase",
145
144
  vForDelimiterStyle: "in",
146
- vOnHandlerStyle: ["method", "inline-function"],
147
145
  restrictedElements: [],
148
146
  restrictedStaticAttributes: [],
149
147
  ignoredUndefinedComponents: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shayanthenerd/eslint-config",
3
- "version": "0.4.6",
3
+ "version": "0.5.0",
4
4
  "license": "MIT",
5
5
  "description": "A modern, flexible ESLint configuration for enforcing best practices and maintaining a consistent coding style",
6
6
  "keywords": [
@@ -90,22 +90,21 @@
90
90
  "@vitest/eslint-plugin": "1.3.4",
91
91
  "defu": "6.1.4",
92
92
  "eslint": "9.32.0",
93
- "eslint-flat-config-utils": "2.1.0",
93
+ "eslint-flat-config-utils": "2.1.1",
94
94
  "eslint-import-resolver-typescript": "4.4.4",
95
95
  "eslint-plugin-better-tailwindcss": "3.7.2",
96
96
  "eslint-plugin-cypress": "5.1.0",
97
- "eslint-plugin-import": "2.32.0",
98
97
  "eslint-plugin-import-x": "4.16.1",
99
- "eslint-plugin-oxlint": "1.8.0",
98
+ "eslint-plugin-oxlint": "1.9.0",
100
99
  "eslint-plugin-perfectionist": "4.15.0",
101
- "eslint-plugin-playwright": "2.2.0",
100
+ "eslint-plugin-playwright": "2.2.1",
102
101
  "eslint-plugin-storybook": "9.0.18",
103
102
  "eslint-plugin-unused-imports": "4.1.4",
104
103
  "eslint-plugin-vue": "10.3.0",
105
104
  "eslint-plugin-vuejs-accessibility": "2.4.1",
106
105
  "globals": "16.3.0",
107
106
  "local-pkg": "1.1.1",
108
- "oxlint": "1.8.0",
107
+ "oxlint": "1.9.0",
109
108
  "tailwind-csstree": "0.1.2",
110
109
  "typescript-eslint": "8.38.0"
111
110
  },
@@ -1,26 +0,0 @@
1
- import { globs } from "../utils/globs.js";
2
- import typescriptESLint from "typescript-eslint";
3
-
4
- //#region src/configs/commons.ts
5
- function getCommonsConfig(options) {
6
- const { typescript, base: { preferNamedExports } } = options.configs;
7
- const commonsConfig = {
8
- name: "shayanthenerd/commons",
9
- files: [globs.commons],
10
- ignores: [globs.commonsIgnore],
11
- plugins: { "@typescript-eslint": typescriptESLint.plugin },
12
- rules: {
13
- "@typescript-eslint/explicit-function-return-type": typescript ? "error" : "off",
14
- "no-restricted-exports": [preferNamedExports ? "error" : "off", { restrictDefaultExports: {
15
- named: true,
16
- direct: true,
17
- namedFrom: true,
18
- namespaceFrom: true
19
- } }]
20
- }
21
- };
22
- return commonsConfig;
23
- }
24
-
25
- //#endregion
26
- export { getCommonsConfig };