@jimmy.codes/eslint-config 7.4.0 → 7.5.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.
@@ -1,7 +1,6 @@
1
1
  import { GLOB_ASTRO } from "./globs.mjs";
2
- import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
2
+ import { n as extractOptions, t as unwrapDefault } from "./interop-default-BDN5nH8B.mjs";
3
3
  import globals from "globals";
4
-
5
4
  //#region src/configs/astro.ts
6
5
  async function astroConfig(options) {
7
6
  const extractedOptions = extractOptions(options);
@@ -10,7 +9,7 @@ async function astroConfig(options) {
10
9
  import("typescript-eslint"),
11
10
  import("eslint-plugin-astro"),
12
11
  import("astro-eslint-parser"),
13
- interopDefault(import("eslint-plugin-jsx-a11y"))
12
+ unwrapDefault(import("eslint-plugin-jsx-a11y"))
14
13
  ]);
15
14
  return [
16
15
  {
@@ -65,21 +64,5 @@ async function astroConfig(options) {
65
64
  }
66
65
  ];
67
66
  }
68
-
69
67
  //#endregion
70
- //#region src/utils/upwarn.ts
71
- /**
72
- * Converts all ESLint rules set to `"warn"` into `"error"`.
73
- *
74
- * @param rules - A partial set of ESLint rules.
75
- *
76
- * @returns A new rules object with all `"warn"` values changed to `"error"`.
77
- */
78
- const upwarn = (rules = {}) => {
79
- return Object.fromEntries(Object.entries(rules).map(([rule, option]) => {
80
- return [rule, option === "warn" ? "error" : option];
81
- }));
82
- };
83
-
84
- //#endregion
85
- export { astroConfig as default, upwarn as t };
68
+ export { astroConfig as default };
package/dist/globs.mjs CHANGED
@@ -75,6 +75,5 @@ const GLOB_IGNORES = [
75
75
  "**/*.gen.*",
76
76
  "!.storybook"
77
77
  ];
78
-
79
78
  //#endregion
80
- export { GLOB_ASTRO, GLOB_CJS, GLOB_E2E, GLOB_IGNORES, GLOB_JS, GLOB_JSX, GLOB_NEXTJS, GLOB_PLAYWRIGHT, GLOB_TESTS, GLOB_TS, GLOB_TSX, GLOB_TYPE_TESTS };
79
+ export { GLOB_ASTRO, GLOB_CJS, GLOB_E2E, GLOB_IGNORES, GLOB_JS, GLOB_JSX, GLOB_NEXTJS, GLOB_PLAYWRIGHT, GLOB_TESTS, GLOB_TS, GLOB_TSX, GLOB_TYPE_TESTS };
@@ -1,5 +1,4 @@
1
1
  import { isPackageExists } from "local-pkg";
2
-
3
2
  //#region src/utils/has-dependency.ts
4
3
  const hasTypescript = () => {
5
4
  return isPackageExists("typescript");
@@ -34,6 +33,5 @@ const hasNext = () => {
34
33
  const hasVite = () => {
35
34
  return isPackageExists("vite");
36
35
  };
37
-
38
36
  //#endregion
39
- export { hasReact as a, hasTestingLibrary as c, hasVitest as d, hasPlaywright as i, hasTypescript as l, hasJest as n, hasReactQuery as o, hasNext as r, hasStorybook as s, hasAstro as t, hasVite as u };
37
+ export { hasReact as a, hasTestingLibrary as c, hasVitest as d, hasPlaywright as i, hasTypescript as l, hasJest as n, hasReactQuery as o, hasNext as r, hasStorybook as s, hasAstro as t, hasVite as u };
package/dist/index.d.mts CHANGED
@@ -30,6 +30,7 @@ interface RuleOptions {
30
30
  /**
31
31
  * disallow unused `eslint-disable` comments
32
32
  * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-unused-disable.html
33
+ * @deprecated
33
34
  */
34
35
  '@eslint-community/eslint-comments/no-unused-disable'?: Linter.RuleEntry<[]>;
35
36
  /**
@@ -1930,238 +1931,238 @@ interface RuleOptions {
1930
1931
  'implicit-arrow-linebreak'?: Linter.RuleEntry<ImplicitArrowLinebreak>;
1931
1932
  /**
1932
1933
  * Enforce or ban the use of inline type-only markers for named imports.
1933
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/consistent-type-specifier-style.md
1934
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/consistent-type-specifier-style.md
1934
1935
  */
1935
1936
  'import-x/consistent-type-specifier-style'?: Linter.RuleEntry<ImportXConsistentTypeSpecifierStyle>;
1936
1937
  /**
1937
1938
  * Ensure a default export is present, given a default import.
1938
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/default.md
1939
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/default.md
1939
1940
  */
1940
1941
  'import-x/default'?: Linter.RuleEntry<[]>;
1941
1942
  /**
1942
1943
  * Enforce a leading comment with the webpackChunkName for dynamic imports.
1943
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/dynamic-import-chunkname.md
1944
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/dynamic-import-chunkname.md
1944
1945
  */
1945
1946
  'import-x/dynamic-import-chunkname'?: Linter.RuleEntry<ImportXDynamicImportChunkname>;
1946
1947
  /**
1947
1948
  * Forbid any invalid exports, i.e. re-export of the same name.
1948
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/export.md
1949
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/export.md
1949
1950
  */
1950
1951
  'import-x/export'?: Linter.RuleEntry<[]>;
1951
1952
  /**
1952
1953
  * Ensure all exports appear after other statements.
1953
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/exports-last.md
1954
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/exports-last.md
1954
1955
  */
1955
1956
  'import-x/exports-last'?: Linter.RuleEntry<[]>;
1956
1957
  /**
1957
1958
  * Ensure consistent use of file extension within the import path.
1958
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/extensions.md
1959
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/extensions.md
1959
1960
  */
1960
1961
  'import-x/extensions'?: Linter.RuleEntry<ImportXExtensions>;
1961
1962
  /**
1962
1963
  * Ensure all imports appear before other statements.
1963
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/first.md
1964
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/first.md
1964
1965
  */
1965
1966
  'import-x/first'?: Linter.RuleEntry<ImportXFirst>;
1966
1967
  /**
1967
1968
  * Prefer named exports to be grouped together in a single export declaration.
1968
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/group-exports.md
1969
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/group-exports.md
1969
1970
  */
1970
1971
  'import-x/group-exports'?: Linter.RuleEntry<[]>;
1971
1972
  /**
1972
1973
  * Replaced by `import-x/first`.
1973
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/imports-first.md
1974
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/imports-first.md
1974
1975
  * @deprecated
1975
1976
  */
1976
1977
  'import-x/imports-first'?: Linter.RuleEntry<ImportXImportsFirst>;
1977
1978
  /**
1978
1979
  * Enforce the maximum number of dependencies a module can have.
1979
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/max-dependencies.md
1980
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/max-dependencies.md
1980
1981
  */
1981
1982
  'import-x/max-dependencies'?: Linter.RuleEntry<ImportXMaxDependencies>;
1982
1983
  /**
1983
1984
  * Ensure named imports correspond to a named export in the remote file.
1984
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/named.md
1985
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/named.md
1985
1986
  */
1986
1987
  'import-x/named'?: Linter.RuleEntry<ImportXNamed>;
1987
1988
  /**
1988
1989
  * Ensure imported namespaces contain dereferenced properties as they are dereferenced.
1989
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/namespace.md
1990
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/namespace.md
1990
1991
  */
1991
1992
  'import-x/namespace'?: Linter.RuleEntry<ImportXNamespace>;
1992
1993
  /**
1993
1994
  * Enforce a newline after import statements.
1994
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/newline-after-import.md
1995
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/newline-after-import.md
1995
1996
  */
1996
1997
  'import-x/newline-after-import'?: Linter.RuleEntry<ImportXNewlineAfterImport>;
1997
1998
  /**
1998
1999
  * Forbid import of modules using absolute paths.
1999
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-absolute-path.md
2000
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-absolute-path.md
2000
2001
  */
2001
2002
  'import-x/no-absolute-path'?: Linter.RuleEntry<ImportXNoAbsolutePath>;
2002
2003
  /**
2003
2004
  * Forbid AMD `require` and `define` calls.
2004
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-amd.md
2005
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-amd.md
2005
2006
  */
2006
2007
  'import-x/no-amd'?: Linter.RuleEntry<[]>;
2007
2008
  /**
2008
2009
  * Forbid anonymous values as default exports.
2009
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-anonymous-default-export.md
2010
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-anonymous-default-export.md
2010
2011
  */
2011
2012
  'import-x/no-anonymous-default-export'?: Linter.RuleEntry<ImportXNoAnonymousDefaultExport>;
2012
2013
  /**
2013
2014
  * Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
2014
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-commonjs.md
2015
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-commonjs.md
2015
2016
  */
2016
2017
  'import-x/no-commonjs'?: Linter.RuleEntry<ImportXNoCommonjs>;
2017
2018
  /**
2018
2019
  * Forbid a module from importing a module with a dependency path back to itself.
2019
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-cycle.md
2020
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-cycle.md
2020
2021
  */
2021
2022
  'import-x/no-cycle'?: Linter.RuleEntry<ImportXNoCycle>;
2022
2023
  /**
2023
2024
  * Forbid default exports.
2024
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-default-export.md
2025
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-default-export.md
2025
2026
  */
2026
2027
  'import-x/no-default-export'?: Linter.RuleEntry<[]>;
2027
2028
  /**
2028
2029
  * Forbid imported names marked with `@deprecated` documentation tag.
2029
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-deprecated.md
2030
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-deprecated.md
2030
2031
  */
2031
2032
  'import-x/no-deprecated'?: Linter.RuleEntry<[]>;
2032
2033
  /**
2033
2034
  * Forbid repeated import of the same module in multiple places.
2034
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-duplicates.md
2035
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-duplicates.md
2035
2036
  */
2036
2037
  'import-x/no-duplicates'?: Linter.RuleEntry<ImportXNoDuplicates>;
2037
2038
  /**
2038
2039
  * Forbid `require()` calls with expressions.
2039
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-dynamic-require.md
2040
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-dynamic-require.md
2040
2041
  */
2041
2042
  'import-x/no-dynamic-require'?: Linter.RuleEntry<ImportXNoDynamicRequire>;
2042
2043
  /**
2043
2044
  * Forbid empty named import blocks.
2044
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-empty-named-blocks.md
2045
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-empty-named-blocks.md
2045
2046
  */
2046
2047
  'import-x/no-empty-named-blocks'?: Linter.RuleEntry<[]>;
2047
2048
  /**
2048
2049
  * Forbid the use of extraneous packages.
2049
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-extraneous-dependencies.md
2050
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-extraneous-dependencies.md
2050
2051
  */
2051
2052
  'import-x/no-extraneous-dependencies'?: Linter.RuleEntry<ImportXNoExtraneousDependencies>;
2052
2053
  /**
2053
2054
  * Forbid import statements with CommonJS module.exports.
2054
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-import-module-exports.md
2055
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-import-module-exports.md
2055
2056
  */
2056
2057
  'import-x/no-import-module-exports'?: Linter.RuleEntry<ImportXNoImportModuleExports>;
2057
2058
  /**
2058
2059
  * Forbid importing the submodules of other modules.
2059
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-internal-modules.md
2060
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-internal-modules.md
2060
2061
  */
2061
2062
  'import-x/no-internal-modules'?: Linter.RuleEntry<ImportXNoInternalModules>;
2062
2063
  /**
2063
2064
  * Forbid the use of mutable exports with `var` or `let`.
2064
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-mutable-exports.md
2065
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-mutable-exports.md
2065
2066
  */
2066
2067
  'import-x/no-mutable-exports'?: Linter.RuleEntry<[]>;
2067
2068
  /**
2068
2069
  * Forbid use of exported name as identifier of default export.
2069
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-named-as-default.md
2070
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-named-as-default.md
2070
2071
  */
2071
2072
  'import-x/no-named-as-default'?: Linter.RuleEntry<[]>;
2072
2073
  /**
2073
2074
  * Forbid use of exported name as property of default export.
2074
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-named-as-default-member.md
2075
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-named-as-default-member.md
2075
2076
  */
2076
2077
  'import-x/no-named-as-default-member'?: Linter.RuleEntry<[]>;
2077
2078
  /**
2078
2079
  * Forbid named default exports.
2079
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-named-default.md
2080
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-named-default.md
2080
2081
  */
2081
2082
  'import-x/no-named-default'?: Linter.RuleEntry<[]>;
2082
2083
  /**
2083
2084
  * Forbid named exports.
2084
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-named-export.md
2085
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-named-export.md
2085
2086
  */
2086
2087
  'import-x/no-named-export'?: Linter.RuleEntry<[]>;
2087
2088
  /**
2088
2089
  * Forbid namespace (a.k.a. "wildcard" `*`) imports.
2089
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-namespace.md
2090
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-namespace.md
2090
2091
  */
2091
2092
  'import-x/no-namespace'?: Linter.RuleEntry<ImportXNoNamespace>;
2092
2093
  /**
2093
2094
  * Forbid Node.js builtin modules.
2094
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-nodejs-modules.md
2095
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-nodejs-modules.md
2095
2096
  */
2096
2097
  'import-x/no-nodejs-modules'?: Linter.RuleEntry<ImportXNoNodejsModules>;
2097
2098
  /**
2098
2099
  * Forbid importing packages through relative paths.
2099
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-relative-packages.md
2100
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-relative-packages.md
2100
2101
  */
2101
2102
  'import-x/no-relative-packages'?: Linter.RuleEntry<ImportXNoRelativePackages>;
2102
2103
  /**
2103
2104
  * Forbid importing modules from parent directories.
2104
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-relative-parent-imports.md
2105
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-relative-parent-imports.md
2105
2106
  */
2106
2107
  'import-x/no-relative-parent-imports'?: Linter.RuleEntry<ImportXNoRelativeParentImports>;
2107
2108
  /**
2108
2109
  * Forbid importing a default export by a different name.
2109
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-rename-default.md
2110
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-rename-default.md
2110
2111
  */
2111
2112
  'import-x/no-rename-default'?: Linter.RuleEntry<ImportXNoRenameDefault>;
2112
2113
  /**
2113
2114
  * Enforce which files can be imported in a given folder.
2114
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-restricted-paths.md
2115
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-restricted-paths.md
2115
2116
  */
2116
2117
  'import-x/no-restricted-paths'?: Linter.RuleEntry<ImportXNoRestrictedPaths>;
2117
2118
  /**
2118
2119
  * Forbid a module from importing itself.
2119
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-self-import.md
2120
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-self-import.md
2120
2121
  */
2121
2122
  'import-x/no-self-import'?: Linter.RuleEntry<[]>;
2122
2123
  /**
2123
2124
  * Forbid unassigned imports.
2124
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-unassigned-import.md
2125
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-unassigned-import.md
2125
2126
  */
2126
2127
  'import-x/no-unassigned-import'?: Linter.RuleEntry<ImportXNoUnassignedImport>;
2127
2128
  /**
2128
2129
  * Ensure imports point to a file/module that can be resolved.
2129
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-unresolved.md
2130
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-unresolved.md
2130
2131
  */
2131
2132
  'import-x/no-unresolved'?: Linter.RuleEntry<ImportXNoUnresolved>;
2132
2133
  /**
2133
2134
  * Forbid modules without exports, or exports without matching import in another module.
2134
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-unused-modules.md
2135
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-unused-modules.md
2135
2136
  */
2136
2137
  'import-x/no-unused-modules'?: Linter.RuleEntry<ImportXNoUnusedModules>;
2137
2138
  /**
2138
2139
  * Forbid unnecessary path segments in import and require statements.
2139
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-useless-path-segments.md
2140
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-useless-path-segments.md
2140
2141
  */
2141
2142
  'import-x/no-useless-path-segments'?: Linter.RuleEntry<ImportXNoUselessPathSegments>;
2142
2143
  /**
2143
2144
  * Forbid webpack loader syntax in imports.
2144
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-webpack-loader-syntax.md
2145
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/no-webpack-loader-syntax.md
2145
2146
  */
2146
2147
  'import-x/no-webpack-loader-syntax'?: Linter.RuleEntry<[]>;
2147
2148
  /**
2148
2149
  * Enforce a convention in module import order.
2149
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/order.md
2150
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/order.md
2150
2151
  */
2151
2152
  'import-x/order'?: Linter.RuleEntry<ImportXOrder>;
2152
2153
  /**
2153
2154
  * Prefer a default export if module exports a single name or multiple names.
2154
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/prefer-default-export.md
2155
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/prefer-default-export.md
2155
2156
  */
2156
2157
  'import-x/prefer-default-export'?: Linter.RuleEntry<ImportXPreferDefaultExport>;
2157
2158
  /**
2158
2159
  * Enforce using namespace imports for specific modules, like `react`/`react-dom`, etc.
2159
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/prefer-namespace-import.md
2160
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/prefer-namespace-import.md
2160
2161
  */
2161
2162
  'import-x/prefer-namespace-import'?: Linter.RuleEntry<ImportXPreferNamespaceImport>;
2162
2163
  /**
2163
2164
  * Forbid potentially ambiguous parse goal (`script` vs. `module`).
2164
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/unambiguous.md
2165
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.2/docs/rules/unambiguous.md
2165
2166
  */
2166
2167
  'import-x/unambiguous'?: Linter.RuleEntry<[]>;
2167
2168
  /**
@@ -7607,33 +7608,33 @@ type StylisticExpListStyle = [] | [{
7607
7608
  singleLine?: _StylisticExpListStyle_SingleLineConfig;
7608
7609
  multiLine?: _StylisticExpListStyle_MultiLineConfig;
7609
7610
  overrides?: {
7610
- "()"?: _StylisticExpListStyle_BaseConfig;
7611
- "[]"?: _StylisticExpListStyle_BaseConfig;
7612
- "{}"?: _StylisticExpListStyle_BaseConfig;
7613
- "<>"?: _StylisticExpListStyle_BaseConfig;
7614
- ArrayExpression?: _StylisticExpListStyle_BaseConfig;
7615
- ArrayPattern?: _StylisticExpListStyle_BaseConfig;
7616
- ArrowFunctionExpression?: _StylisticExpListStyle_BaseConfig;
7617
- CallExpression?: _StylisticExpListStyle_BaseConfig;
7618
- ExportNamedDeclaration?: _StylisticExpListStyle_BaseConfig;
7619
- FunctionDeclaration?: _StylisticExpListStyle_BaseConfig;
7620
- FunctionExpression?: _StylisticExpListStyle_BaseConfig;
7621
- IfStatement?: _StylisticExpListStyle_BaseConfig;
7622
- ImportAttributes?: _StylisticExpListStyle_BaseConfig;
7623
- ImportDeclaration?: _StylisticExpListStyle_BaseConfig;
7624
- JSONArrayExpression?: _StylisticExpListStyle_BaseConfig;
7625
- JSONObjectExpression?: _StylisticExpListStyle_BaseConfig;
7626
- NewExpression?: _StylisticExpListStyle_BaseConfig;
7627
- ObjectExpression?: _StylisticExpListStyle_BaseConfig;
7628
- ObjectPattern?: _StylisticExpListStyle_BaseConfig;
7629
- TSDeclareFunction?: _StylisticExpListStyle_BaseConfig;
7630
- TSEnumBody?: _StylisticExpListStyle_BaseConfig;
7631
- TSFunctionType?: _StylisticExpListStyle_BaseConfig;
7632
- TSInterfaceBody?: _StylisticExpListStyle_BaseConfig;
7633
- TSTupleType?: _StylisticExpListStyle_BaseConfig;
7634
- TSTypeLiteral?: _StylisticExpListStyle_BaseConfig;
7635
- TSTypeParameterDeclaration?: _StylisticExpListStyle_BaseConfig;
7636
- TSTypeParameterInstantiation?: _StylisticExpListStyle_BaseConfig;
7611
+ "()"?: (_StylisticExpListStyle_BaseConfig | "off");
7612
+ "[]"?: (_StylisticExpListStyle_BaseConfig | "off");
7613
+ "{}"?: (_StylisticExpListStyle_BaseConfig | "off");
7614
+ "<>"?: (_StylisticExpListStyle_BaseConfig | "off");
7615
+ ArrayExpression?: (_StylisticExpListStyle_BaseConfig | "off");
7616
+ ArrayPattern?: (_StylisticExpListStyle_BaseConfig | "off");
7617
+ ArrowFunctionExpression?: (_StylisticExpListStyle_BaseConfig | "off");
7618
+ CallExpression?: (_StylisticExpListStyle_BaseConfig | "off");
7619
+ ExportNamedDeclaration?: (_StylisticExpListStyle_BaseConfig | "off");
7620
+ FunctionDeclaration?: (_StylisticExpListStyle_BaseConfig | "off");
7621
+ FunctionExpression?: (_StylisticExpListStyle_BaseConfig | "off");
7622
+ IfStatement?: (_StylisticExpListStyle_BaseConfig | "off");
7623
+ ImportAttributes?: (_StylisticExpListStyle_BaseConfig | "off");
7624
+ ImportDeclaration?: (_StylisticExpListStyle_BaseConfig | "off");
7625
+ JSONArrayExpression?: (_StylisticExpListStyle_BaseConfig | "off");
7626
+ JSONObjectExpression?: (_StylisticExpListStyle_BaseConfig | "off");
7627
+ NewExpression?: (_StylisticExpListStyle_BaseConfig | "off");
7628
+ ObjectExpression?: (_StylisticExpListStyle_BaseConfig | "off");
7629
+ ObjectPattern?: (_StylisticExpListStyle_BaseConfig | "off");
7630
+ TSDeclareFunction?: (_StylisticExpListStyle_BaseConfig | "off");
7631
+ TSEnumBody?: (_StylisticExpListStyle_BaseConfig | "off");
7632
+ TSFunctionType?: (_StylisticExpListStyle_BaseConfig | "off");
7633
+ TSInterfaceBody?: (_StylisticExpListStyle_BaseConfig | "off");
7634
+ TSTupleType?: (_StylisticExpListStyle_BaseConfig | "off");
7635
+ TSTypeLiteral?: (_StylisticExpListStyle_BaseConfig | "off");
7636
+ TSTypeParameterDeclaration?: (_StylisticExpListStyle_BaseConfig | "off");
7637
+ TSTypeParameterInstantiation?: (_StylisticExpListStyle_BaseConfig | "off");
7637
7638
  };
7638
7639
  }];
7639
7640
  interface _StylisticExpListStyle_SingleLineConfig {
@@ -8494,13 +8495,18 @@ type StylisticPaddedBlocks = [] | [(("always" | "never" | "start" | "end") | {
8494
8495
  allowSingleLineBlocks?: boolean;
8495
8496
  }]; // ----- @stylistic/padding-line-between-statements -----
8496
8497
  type _StylisticPaddingLineBetweenStatementsPaddingType = ("any" | "never" | "always");
8497
- type _StylisticPaddingLineBetweenStatementsStatementOption = (_StylisticPaddingLineBetweenStatementsStatementType | [_StylisticPaddingLineBetweenStatementsStatementType, ...(_StylisticPaddingLineBetweenStatementsStatementType)[]]);
8498
+ type _StylisticPaddingLineBetweenStatementsStatementOption = (_StylisticPaddingLineBetweenStatementsStatementMatcher | [_StylisticPaddingLineBetweenStatementsStatementMatcher, ...(_StylisticPaddingLineBetweenStatementsStatementMatcher)[]]);
8499
+ type _StylisticPaddingLineBetweenStatementsStatementMatcher = (_StylisticPaddingLineBetweenStatementsStatementType | _StylisticPaddingLineBetweenStatements_SelectorOption);
8498
8500
  type _StylisticPaddingLineBetweenStatementsStatementType = ("*" | "exports" | "require" | "directive" | "iife" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "continue" | "debugger" | "default" | "do" | "for" | "if" | "import" | "switch" | "throw" | "try" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "function-overload" | "block-like" | "singleline-block-like" | "multiline-block-like" | "expression" | "singleline-expression" | "multiline-expression" | "return" | "singleline-return" | "multiline-return" | "export" | "singleline-export" | "multiline-export" | "var" | "singleline-var" | "multiline-var" | "let" | "singleline-let" | "multiline-let" | "const" | "singleline-const" | "multiline-const" | "using" | "singleline-using" | "multiline-using" | "type" | "singleline-type" | "multiline-type");
8499
8501
  type StylisticPaddingLineBetweenStatements = {
8500
8502
  blankLine: _StylisticPaddingLineBetweenStatementsPaddingType;
8501
8503
  prev: _StylisticPaddingLineBetweenStatementsStatementOption;
8502
8504
  next: _StylisticPaddingLineBetweenStatementsStatementOption;
8503
- }[]; // ----- @stylistic/quote-props -----
8505
+ }[];
8506
+ interface _StylisticPaddingLineBetweenStatements_SelectorOption {
8507
+ selector: string;
8508
+ lineMode?: ("any" | "singleline" | "multiline");
8509
+ } // ----- @stylistic/quote-props -----
8504
8510
  type StylisticQuoteProps = ([] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [("always" | "as-needed" | "consistent" | "consistent-as-needed"), {
8505
8511
  keywords?: boolean;
8506
8512
  unnecessary?: boolean;
@@ -9358,6 +9364,18 @@ type TypescriptEslintPreferOptionalChain = [] | [{
9358
9364
  requireNullish?: boolean;
9359
9365
  }]; // ----- @typescript-eslint/prefer-promise-reject-errors -----
9360
9366
  type TypescriptEslintPreferPromiseRejectErrors = [] | [{
9367
+ allow?: (string | {
9368
+ from: "file";
9369
+ name: (string | [string, ...(string)[]]);
9370
+ path?: string;
9371
+ } | {
9372
+ from: "lib";
9373
+ name: (string | [string, ...(string)[]]);
9374
+ } | {
9375
+ from: "package";
9376
+ name: (string | [string, ...(string)[]]);
9377
+ package: string;
9378
+ })[];
9361
9379
  allowEmptyReject?: boolean;
9362
9380
  allowThrowingAny?: boolean;
9363
9381
  allowThrowingUnknown?: boolean;
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { GLOB_CJS, GLOB_IGNORES, GLOB_TESTS } from "./globs.mjs";
2
- import { a as hasReact, c as hasTestingLibrary, d as hasVitest, i as hasPlaywright, l as hasTypescript, n as hasJest, o as hasReactQuery, r as hasNext, s as hasStorybook, t as hasAstro } from "./has-dependency-B4KAkcAy.mjs";
2
+ import { a as hasReact, c as hasTestingLibrary, d as hasVitest, i as hasPlaywright, l as hasTypescript, n as hasJest, o as hasReactQuery, r as hasNext, s as hasStorybook, t as hasAstro } from "./has-dependency-BB12gGNt.mjs";
3
3
  import gitignoreConfig from "eslint-config-flat-gitignore";
4
4
  import globals from "globals";
5
5
  import { recommended } from "@eslint-community/eslint-plugin-eslint-comments/configs";
@@ -13,9 +13,9 @@ import jsdocPlugin from "eslint-plugin-jsdoc";
13
13
  import perfectionist, { configs as configs$2 } from "eslint-plugin-perfectionist";
14
14
  import eslintConfigPrettier from "eslint-config-prettier/flat";
15
15
  import * as regexpPlugin from "eslint-plugin-regexp";
16
+ import regexp from "eslint-plugin-regexp";
16
17
  import stylisticPlugin from "@stylistic/eslint-plugin";
17
18
  import eslintPluginUnicorn from "eslint-plugin-unicorn";
18
-
19
19
  //#region src/configs/commonjs.ts
20
20
  const commonjsConfig = () => {
21
21
  return [{
@@ -24,7 +24,6 @@ const commonjsConfig = () => {
24
24
  name: "jimmy.codes/commonjs"
25
25
  }];
26
26
  };
27
-
28
27
  //#endregion
29
28
  //#region src/rules/eslint-comments.ts
30
29
  const eslintCommentsRules = {
@@ -32,7 +31,6 @@ const eslintCommentsRules = {
32
31
  "@eslint-community/eslint-comments/no-unused-disable": "off",
33
32
  "@eslint-community/eslint-comments/require-description": "error"
34
33
  };
35
-
36
34
  //#endregion
37
35
  //#region src/configs/eslint-comments.ts
38
36
  const eslintCommentsConfig = () => {
@@ -42,7 +40,6 @@ const eslintCommentsConfig = () => {
42
40
  rules: eslintCommentsRules
43
41
  }];
44
42
  };
45
-
46
43
  //#endregion
47
44
  //#region src/configs/ignores.ts
48
45
  const ignoresConfig = (ignores) => {
@@ -51,7 +48,6 @@ const ignoresConfig = (ignores) => {
51
48
  name: "jimmy.codes/ignores"
52
49
  }];
53
50
  };
54
-
55
51
  //#endregion
56
52
  //#region src/rules/imports.ts
57
53
  const importsRules = {
@@ -77,7 +73,6 @@ const importsRules = {
77
73
  "import-x/no-unresolved": ["error", { ignore: [String.raw`\.svg$`] }],
78
74
  "import-x/no-useless-path-segments": "error"
79
75
  };
80
-
81
76
  //#endregion
82
77
  //#region src/configs/imports.ts
83
78
  const importsTypescriptConfig = () => {
@@ -103,7 +98,6 @@ const importsConfig = ({ isTypescriptEnabled = false } = {}) => {
103
98
  rules: importsRules
104
99
  }, ...isTypescriptEnabled ? importsTypescriptConfig() : []];
105
100
  };
106
-
107
101
  //#endregion
108
102
  //#region src/rules/javascript.ts
109
103
  const additionalRules = {
@@ -179,7 +173,6 @@ const javascriptRules = {
179
173
  ...additionalRules,
180
174
  ...configs$1.recommended.rules
181
175
  };
182
-
183
176
  //#endregion
184
177
  //#region src/configs/javascript.ts
185
178
  const javascriptConfig = () => {
@@ -197,7 +190,6 @@ const javascriptConfig = () => {
197
190
  rules: { "no-magic-numbers": "off" }
198
191
  }];
199
192
  };
200
-
201
193
  //#endregion
202
194
  //#region src/rules/jsdoc.ts
203
195
  const jsdocRules = () => {
@@ -221,7 +213,6 @@ const jsdocRules = () => {
221
213
  ]
222
214
  };
223
215
  };
224
-
225
216
  //#endregion
226
217
  //#region src/configs/jsdoc.ts
227
218
  const jsdocConfig = () => {
@@ -231,7 +222,6 @@ const jsdocConfig = () => {
231
222
  rules: jsdocRules()
232
223
  }];
233
224
  };
234
-
235
225
  //#endregion
236
226
  //#region src/rules/node.ts
237
227
  const nodeRules = {
@@ -254,7 +244,6 @@ const nodeRules = {
254
244
  "n/prefer-node-protocol": "error",
255
245
  "n/process-exit-as-throw": "error"
256
246
  };
257
-
258
247
  //#endregion
259
248
  //#region src/configs/node.ts
260
249
  const nodeConfig = () => {
@@ -264,7 +253,6 @@ const nodeConfig = () => {
264
253
  rules: nodeRules
265
254
  }];
266
255
  };
267
-
268
256
  //#endregion
269
257
  //#region src/rules/perfectionist.ts
270
258
  const perfectionistRules = {
@@ -319,7 +307,6 @@ const perfectionistRules = {
319
307
  type: "natural"
320
308
  }]
321
309
  };
322
-
323
310
  //#endregion
324
311
  //#region src/configs/perfectionist.ts
325
312
  const perfectionistConfig = () => {
@@ -329,7 +316,6 @@ const perfectionistConfig = () => {
329
316
  rules: perfectionistRules
330
317
  }];
331
318
  };
332
-
333
319
  //#endregion
334
320
  //#region src/configs/prettier.ts
335
321
  const prettierConfig = () => {
@@ -338,7 +324,6 @@ const prettierConfig = () => {
338
324
  name: "jimmy.codes/prettier"
339
325
  }];
340
326
  };
341
-
342
327
  //#endregion
343
328
  //#region src/rules/regexp.ts
344
329
  const regexpRules = {
@@ -350,17 +335,15 @@ const regexpRules = {
350
335
  "regexp/no-useless-flag": "error",
351
336
  "regexp/optimal-lookaround-quantifier": "error"
352
337
  };
353
-
354
338
  //#endregion
355
339
  //#region src/configs/regexp.ts
356
340
  const regexpConfig = () => {
357
341
  return [{
358
342
  name: "jimmy.codes/regexp",
359
- plugins: { regexp: regexpPlugin },
343
+ plugins: { regexp },
360
344
  rules: regexpRules
361
345
  }];
362
346
  };
363
-
364
347
  //#endregion
365
348
  //#region src/rules/stylistic.ts
366
349
  const stylisticRules = {
@@ -461,7 +444,6 @@ const stylisticRules = {
461
444
  }
462
445
  ]
463
446
  };
464
-
465
447
  //#endregion
466
448
  //#region src/configs/stylistic.ts
467
449
  function stylisticConfig() {
@@ -471,7 +453,6 @@ function stylisticConfig() {
471
453
  rules: stylisticRules
472
454
  }];
473
455
  }
474
-
475
456
  //#endregion
476
457
  //#region src/rules/unicorn.ts
477
458
  const unicornRules = {
@@ -488,7 +469,6 @@ const unicornRules = {
488
469
  "unicorn/prefer-node-protocol": "off",
489
470
  "unicorn/prevent-abbreviations": "off"
490
471
  };
491
-
492
472
  //#endregion
493
473
  //#region src/configs/unicorn.ts
494
474
  const unicornConfig = () => {
@@ -498,7 +478,6 @@ const unicornConfig = () => {
498
478
  rules: unicornRules
499
479
  }];
500
480
  };
501
-
502
481
  //#endregion
503
482
  //#region src/utils/create-featured.ts
504
483
  /**
@@ -514,7 +493,6 @@ const createFeatured = (autoDetect) => {
514
493
  return explicit || autoDetect && detector();
515
494
  };
516
495
  };
517
-
518
496
  //#endregion
519
497
  //#region src/utils/unwrap.ts
520
498
  /**
@@ -542,7 +520,6 @@ const unwrap = async (module, ...args) => {
542
520
  if (typeof resolved.default === "function") return resolved.default(...args);
543
521
  return resolved;
544
522
  };
545
-
546
523
  //#endregion
547
524
  //#region src/factory.ts
548
525
  /**
@@ -579,16 +556,16 @@ const defineConfig = async ({ astro = false, autoDetect = true, gitignore = fals
579
556
  stylisticConfig()
580
557
  ];
581
558
  const featureConfigs = await Promise.all([
582
- isTypescriptEnabled && unwrap(import("./typescript-Cae66DX9.mjs"), typescript),
583
- isReactEnabled && unwrap(import("./react-BkGA0owG.mjs"), react),
584
- isTanstackQueryEnabled && unwrap(import("./tanstack-query-CJMINud2.mjs"), tanstackQuery),
585
- isAstroEnabled && unwrap(import("./astro-qFFNUM9D.mjs"), astro),
586
- isJestEnabled && unwrap(import("./jest-BYBtWryE.mjs"), jest),
587
- isVitestEnabled && unwrap(import("./vitest-CHcEa7vN.mjs"), vitest),
588
- isTestingLibraryEnabled && unwrap(import("./testing-library-DAOq7Q2E.mjs"), testingLibrary),
589
- isPlaywrightEnabled && unwrap(import("./playwright-CiUISnDl.mjs"), playwright),
590
- isStorybookEnabled && unwrap(import("./storybook-vSHixqw5.mjs"), storybook),
591
- isNextjsEnabled && unwrap(import("./nextjs-Q8LOBFAI.mjs"), nextjs)
559
+ isTypescriptEnabled && unwrap(import("./typescript-BDNbtOD5.mjs"), typescript),
560
+ isReactEnabled && unwrap(import("./react-C7mZF3Qf.mjs"), react),
561
+ isTanstackQueryEnabled && unwrap(import("./tanstack-query-CfY9r6o6.mjs"), tanstackQuery),
562
+ isAstroEnabled && unwrap(import("./astro-B0kgVZlh.mjs"), astro),
563
+ isJestEnabled && unwrap(import("./jest-W70UkOeC.mjs"), jest),
564
+ isVitestEnabled && unwrap(import("./vitest-BXTl-VRj.mjs"), vitest),
565
+ isTestingLibraryEnabled && unwrap(import("./testing-library-B1I63Phd.mjs"), testingLibrary),
566
+ isPlaywrightEnabled && unwrap(import("./playwright-hse_Mk2B.mjs"), playwright),
567
+ isStorybookEnabled && unwrap(import("./storybook-Cmw5qksj.mjs"), storybook),
568
+ isNextjsEnabled && unwrap(import("./nextjs-DheaBY3h.mjs"), nextjs)
592
569
  ]);
593
570
  return [
594
571
  ...gitignore ? [gitignoreConfig({ strict: false })] : [],
@@ -601,6 +578,5 @@ const defineConfig = async ({ astro = false, autoDetect = true, gitignore = fals
601
578
  moreOverrides
602
579
  ].flat();
603
580
  };
604
-
605
581
  //#endregion
606
- export { defineConfig };
582
+ export { defineConfig };
@@ -9,7 +9,6 @@
9
9
  const extractOptions = (options) => {
10
10
  if (typeof options !== "boolean") return options;
11
11
  };
12
-
13
12
  //#endregion
14
13
  //#region src/utils/interop-default.ts
15
14
  /**
@@ -21,10 +20,9 @@ const extractOptions = (options) => {
21
20
  *
22
21
  * @returns The normalized and awaited default export.
23
22
  */
24
- const interopDefault = async (module) => {
23
+ const unwrapDefault = async (module) => {
25
24
  const resolved = await module;
26
25
  return resolved?.default ?? resolved;
27
26
  };
28
-
29
27
  //#endregion
30
- export { extractOptions as n, interopDefault as t };
28
+ export { extractOptions as n, unwrapDefault as t };
@@ -1,9 +1,8 @@
1
1
  import { GLOB_E2E, GLOB_TESTS } from "./globs.mjs";
2
- import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
3
-
2
+ import { n as extractOptions, t as unwrapDefault } from "./interop-default-BDN5nH8B.mjs";
4
3
  //#region src/rules/jest.ts
5
4
  const jestRules = async (options) => {
6
- const jestPlugin = await interopDefault(import("eslint-plugin-jest"));
5
+ const jestPlugin = await unwrapDefault(import("eslint-plugin-jest"));
7
6
  return {
8
7
  ...jestPlugin.configs["flat/recommended"].rules,
9
8
  ...jestPlugin.configs["flat/style"].rules,
@@ -54,7 +53,6 @@ const jestRules = async (options) => {
54
53
  ...options?.overrides
55
54
  };
56
55
  };
57
-
58
56
  //#endregion
59
57
  //#region src/configs/jest.ts
60
58
  async function jestConfig(options) {
@@ -62,11 +60,10 @@ async function jestConfig(options) {
62
60
  return [{
63
61
  files: GLOB_TESTS,
64
62
  ignores: GLOB_E2E,
65
- ...(await interopDefault(import("eslint-plugin-jest"))).configs["flat/recommended"],
63
+ ...(await unwrapDefault(import("eslint-plugin-jest"))).configs["flat/recommended"],
66
64
  name: "jimmy.codes/jest",
67
65
  rules: await jestRules(extractedOptions)
68
66
  }];
69
67
  }
70
-
71
68
  //#endregion
72
- export { jestConfig as default };
69
+ export { jestConfig as default };
@@ -1,20 +1,18 @@
1
1
  import { GLOB_NEXTJS } from "./globs.mjs";
2
- import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
3
- import { t as upwarn } from "./astro-qFFNUM9D.mjs";
4
-
2
+ import { n as extractOptions, t as unwrapDefault } from "./interop-default-BDN5nH8B.mjs";
3
+ import { t as upwarn } from "./upwarn-Bq0SLcj_.mjs";
5
4
  //#region src/rules/nextjs.ts
6
5
  const nextjsRules = async (options) => {
7
6
  return {
8
- ...upwarn((await interopDefault(import("@next/eslint-plugin-next"))).configs.recommended.rules),
7
+ ...upwarn((await unwrapDefault(import("@next/eslint-plugin-next"))).configs.recommended.rules),
9
8
  ...options?.overrides
10
9
  };
11
10
  };
12
-
13
11
  //#endregion
14
12
  //#region src/configs/nextjs.ts
15
13
  async function nextjsConfig(options) {
16
14
  const extractedOptions = extractOptions(options);
17
- const nextjsPlugin = await interopDefault(import("@next/eslint-plugin-next"));
15
+ const nextjsPlugin = await import("@next/eslint-plugin-next");
18
16
  return [{
19
17
  files: GLOB_NEXTJS,
20
18
  name: "jimmy.codes/nextjs",
@@ -22,6 +20,5 @@ async function nextjsConfig(options) {
22
20
  rules: await nextjsRules(extractedOptions)
23
21
  }];
24
22
  }
25
-
26
23
  //#endregion
27
- export { nextjsConfig as default };
24
+ export { nextjsConfig as default };
@@ -1,17 +1,16 @@
1
1
  import { GLOB_PLAYWRIGHT } from "./globs.mjs";
2
- import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
3
-
2
+ import { n as extractOptions, t as unwrapDefault } from "./interop-default-BDN5nH8B.mjs";
3
+ import { t as upwarn } from "./upwarn-Bq0SLcj_.mjs";
4
4
  //#region src/rules/playwright.ts
5
5
  const playwrightRules = async (options) => {
6
6
  return {
7
- ...(await interopDefault(import("eslint-plugin-playwright"))).configs["flat/recommended"].rules,
7
+ ...upwarn((await unwrapDefault(import("eslint-plugin-playwright"))).configs["flat/recommended"].rules),
8
8
  "playwright/consistent-spacing-between-blocks": "error",
9
9
  "playwright/expect-expect": "error",
10
10
  "playwright/max-nested-describe": "error",
11
11
  "playwright/no-commented-out-tests": "error",
12
12
  "playwright/no-conditional-expect": "error",
13
13
  "playwright/no-conditional-in-test": "error",
14
- "playwright/no-duplicate-slow": "error",
15
14
  "playwright/no-element-handle": "error",
16
15
  "playwright/no-eval": "error",
17
16
  "playwright/no-force-option": "error",
@@ -26,26 +25,22 @@ const playwrightRules = async (options) => {
26
25
  "playwright/prefer-strict-equal": "error",
27
26
  "playwright/prefer-to-be": "error",
28
27
  "playwright/prefer-to-contain": "error",
29
- "playwright/prefer-to-have-count": "error",
30
- "playwright/prefer-to-have-length": "error",
31
28
  "playwright/require-to-pass-timeout": "error",
32
29
  "playwright/require-to-throw-message": "error",
33
30
  "playwright/valid-title": "off",
34
31
  ...options?.overrides
35
32
  };
36
33
  };
37
-
38
34
  //#endregion
39
35
  //#region src/configs/playwright.ts
40
36
  async function playwrightConfig(options) {
41
37
  const extractedOptions = extractOptions(options);
42
38
  return [{
43
- ...(await interopDefault(import("eslint-plugin-playwright"))).configs["flat/recommended"],
39
+ ...(await unwrapDefault(import("eslint-plugin-playwright"))).configs["flat/recommended"],
44
40
  files: GLOB_PLAYWRIGHT,
45
41
  name: "jimmy.codes/playwright",
46
42
  rules: await playwrightRules(extractedOptions)
47
43
  }];
48
44
  }
49
-
50
45
  //#endregion
51
- export { playwrightConfig as default };
46
+ export { playwrightConfig as default };
@@ -1,9 +1,8 @@
1
1
  import { GLOB_JSX, GLOB_TSX } from "./globs.mjs";
2
- import { l as hasTypescript, r as hasNext, u as hasVite } from "./has-dependency-B4KAkcAy.mjs";
3
- import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
4
- import { t as upwarn } from "./astro-qFFNUM9D.mjs";
2
+ import { l as hasTypescript, r as hasNext, u as hasVite } from "./has-dependency-BB12gGNt.mjs";
3
+ import { n as extractOptions, t as unwrapDefault } from "./interop-default-BDN5nH8B.mjs";
4
+ import { t as upwarn } from "./upwarn-Bq0SLcj_.mjs";
5
5
  import globals from "globals";
6
-
7
6
  //#region src/rules/react.ts
8
7
  const nextAllowedExportNames = [
9
8
  "dynamic",
@@ -22,13 +21,13 @@ const nextAllowedExportNames = [
22
21
  ];
23
22
  const reactRules = async (options) => {
24
23
  const [{ configs: reactConfigs }, { flatConfigs: jsxA11yConfigs }, { configs: reactDomConfigs }, { configs: reactHooksExtraConfigs }, { configs: reactWebApiConfigs }, { configs: reactNamingConventionConfigs }, { configs: reactRscConfigs }] = await Promise.all([
25
- interopDefault(import("eslint-plugin-react-x")),
26
- interopDefault(import("eslint-plugin-jsx-a11y")),
27
- interopDefault(import("eslint-plugin-react-dom")),
28
- interopDefault(import("eslint-plugin-react-hooks-extra")),
29
- interopDefault(import("eslint-plugin-react-web-api")),
30
- interopDefault(import("eslint-plugin-react-naming-convention")),
31
- interopDefault(import("eslint-plugin-react-rsc"))
24
+ unwrapDefault(import("eslint-plugin-react-x")),
25
+ unwrapDefault(import("eslint-plugin-jsx-a11y")),
26
+ unwrapDefault(import("eslint-plugin-react-dom")),
27
+ unwrapDefault(import("eslint-plugin-react-hooks-extra")),
28
+ unwrapDefault(import("eslint-plugin-react-web-api")),
29
+ unwrapDefault(import("eslint-plugin-react-naming-convention")),
30
+ unwrapDefault(import("eslint-plugin-react-rsc"))
32
31
  ]);
33
32
  const isUsingNextjs = hasNext();
34
33
  const isUsingVite = hasVite();
@@ -85,22 +84,21 @@ const reactRules = async (options) => {
85
84
  ...options?.overrides
86
85
  };
87
86
  };
88
-
89
87
  //#endregion
90
88
  //#region src/configs/react.ts
91
89
  async function reactConfig(options) {
92
90
  const extractedOptions = extractOptions(options);
93
91
  const [reactPlugin, jsxA11yPlugin, reactHooksPlugin, reactRefreshPlugin, reactCompilerPlugin, reactHooksExtraPlugin, reactDomPlugin, reactWebApiPlugin, reactNamingConventionPlugin, reactRscPlugin] = await Promise.all([
94
- interopDefault(import("eslint-plugin-react-x")),
95
- interopDefault(import("eslint-plugin-jsx-a11y")),
96
- interopDefault(import("eslint-plugin-react-hooks")),
97
- interopDefault(import("eslint-plugin-react-refresh")),
98
- interopDefault(import("eslint-plugin-react-compiler")),
99
- interopDefault(import("eslint-plugin-react-hooks-extra")),
100
- interopDefault(import("eslint-plugin-react-dom")),
101
- interopDefault(import("eslint-plugin-react-web-api")),
102
- interopDefault(import("eslint-plugin-react-naming-convention")),
103
- interopDefault(import("eslint-plugin-react-rsc"))
92
+ unwrapDefault(import("eslint-plugin-react-x")),
93
+ unwrapDefault(import("eslint-plugin-jsx-a11y")),
94
+ unwrapDefault(import("eslint-plugin-react-hooks")),
95
+ unwrapDefault(import("eslint-plugin-react-refresh")),
96
+ unwrapDefault(import("eslint-plugin-react-compiler")),
97
+ unwrapDefault(import("eslint-plugin-react-hooks-extra")),
98
+ unwrapDefault(import("eslint-plugin-react-dom")),
99
+ unwrapDefault(import("eslint-plugin-react-web-api")),
100
+ unwrapDefault(import("eslint-plugin-react-naming-convention")),
101
+ unwrapDefault(import("eslint-plugin-react-rsc"))
104
102
  ]);
105
103
  return [{
106
104
  files: [GLOB_JSX, GLOB_TSX],
@@ -128,6 +126,5 @@ async function reactConfig(options) {
128
126
  settings: { react: { version: "detect" } }
129
127
  }];
130
128
  }
131
-
132
129
  //#endregion
133
- export { reactConfig as default };
130
+ export { reactConfig as default };
@@ -1,10 +1,9 @@
1
- import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
2
- import { t as upwarn } from "./astro-qFFNUM9D.mjs";
3
-
1
+ import { n as extractOptions, t as unwrapDefault } from "./interop-default-BDN5nH8B.mjs";
2
+ import { t as upwarn } from "./upwarn-Bq0SLcj_.mjs";
4
3
  //#region src/configs/storybook.ts
5
4
  async function storybookConfig(options) {
6
5
  const extractedOptions = extractOptions(options);
7
- const { configs } = await interopDefault(import("eslint-plugin-storybook"));
6
+ const { configs } = await unwrapDefault(import("eslint-plugin-storybook"));
8
7
  const [setup, storiesConfig, mainConfig] = configs["flat/recommended"];
9
8
  return [
10
9
  {
@@ -29,6 +28,5 @@ async function storybookConfig(options) {
29
28
  }
30
29
  ];
31
30
  }
32
-
33
31
  //#endregion
34
- export { storybookConfig as default };
32
+ export { storybookConfig as default };
@@ -1,10 +1,9 @@
1
1
  import { GLOB_JSX, GLOB_TSX } from "./globs.mjs";
2
- import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
3
-
2
+ import { n as extractOptions, t as unwrapDefault } from "./interop-default-BDN5nH8B.mjs";
4
3
  //#region src/configs/tanstack-query.ts
5
4
  async function tanstackQueryConfig(options) {
6
5
  const extractedOptions = extractOptions(options);
7
- const queryPlugin = await interopDefault(import("@tanstack/eslint-plugin-query"));
6
+ const queryPlugin = await unwrapDefault(import("@tanstack/eslint-plugin-query"));
8
7
  return [{
9
8
  files: [GLOB_JSX, GLOB_TSX],
10
9
  name: "jimmy.codes/tanstack/react-query",
@@ -21,6 +20,5 @@ async function tanstackQueryConfig(options) {
21
20
  }
22
21
  }];
23
22
  }
24
-
25
23
  //#endregion
26
- export { tanstackQueryConfig as default };
24
+ export { tanstackQueryConfig as default };
@@ -1,9 +1,8 @@
1
1
  import { GLOB_E2E, GLOB_TESTS } from "./globs.mjs";
2
- import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
3
-
2
+ import { n as extractOptions, t as unwrapDefault } from "./interop-default-BDN5nH8B.mjs";
4
3
  //#region src/rules/testing-library.ts
5
4
  const testingLibraryRules = async (options) => {
6
- const [jestDom, testingLibrary] = await Promise.all([import("eslint-plugin-jest-dom"), interopDefault(import("eslint-plugin-testing-library"))]);
5
+ const [jestDom, testingLibrary] = await Promise.all([import("eslint-plugin-jest-dom"), unwrapDefault(import("eslint-plugin-testing-library"))]);
7
6
  return {
8
7
  ...testingLibrary.configs["flat/react"].rules,
9
8
  ...jestDom.configs["flat/recommended"].rules,
@@ -11,12 +10,11 @@ const testingLibraryRules = async (options) => {
11
10
  ...options?.overrides
12
11
  };
13
12
  };
14
-
15
13
  //#endregion
16
14
  //#region src/configs/testing-library.ts
17
15
  async function testingLibraryConfig(options) {
18
16
  const extractedOptions = extractOptions(options);
19
- const [jestDom, testingLibrary] = await Promise.all([import("eslint-plugin-jest-dom"), interopDefault(import("eslint-plugin-testing-library"))]);
17
+ const [jestDom, testingLibrary] = await Promise.all([import("eslint-plugin-jest-dom"), unwrapDefault(import("eslint-plugin-testing-library"))]);
20
18
  return [{
21
19
  files: GLOB_TESTS,
22
20
  ignores: GLOB_E2E,
@@ -28,6 +26,5 @@ async function testingLibraryConfig(options) {
28
26
  rules: await testingLibraryRules(extractedOptions)
29
27
  }];
30
28
  }
31
-
32
29
  //#endregion
33
- export { testingLibraryConfig as default };
30
+ export { testingLibraryConfig as default };
@@ -1,6 +1,5 @@
1
1
  import { GLOB_JS, GLOB_JSX, GLOB_TESTS } from "./globs.mjs";
2
- import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
3
-
2
+ import { n as extractOptions, t as unwrapDefault } from "./interop-default-BDN5nH8B.mjs";
4
3
  //#region src/rules/typescript.ts
5
4
  const disabledEslintRules = {
6
5
  "no-unused-private-class-members": "off",
@@ -36,7 +35,6 @@ const typescriptRules = (options) => {
36
35
  ...options?.overrides
37
36
  };
38
37
  };
39
-
40
38
  //#endregion
41
39
  //#region src/configs/typescript.ts
42
40
  async function typescriptConfig(options) {
@@ -74,7 +72,7 @@ async function typescriptConfig(options) {
74
72
  },
75
73
  ...extractedOptions?.erasableSyntaxOnly ? [{
76
74
  name: "jimmy.codes/typescript/erasable-syntax-only",
77
- plugins: { "erasable-syntax-only": await interopDefault(import("eslint-plugin-erasable-syntax-only")) },
75
+ plugins: { "erasable-syntax-only": await unwrapDefault(import("eslint-plugin-erasable-syntax-only")) },
78
76
  rules: {
79
77
  "erasable-syntax-only/enums": "error",
80
78
  "erasable-syntax-only/import-aliases": "error",
@@ -84,6 +82,5 @@ async function typescriptConfig(options) {
84
82
  }] : []
85
83
  ];
86
84
  }
87
-
88
85
  //#endregion
89
- export { typescriptConfig as default };
86
+ export { typescriptConfig as default };
@@ -0,0 +1,15 @@
1
+ //#region src/utils/upwarn.ts
2
+ /**
3
+ * Converts all ESLint rules set to `"warn"` into `"error"`.
4
+ *
5
+ * @param rules - A partial set of ESLint rules.
6
+ *
7
+ * @returns A new rules object with all `"warn"` values changed to `"error"`.
8
+ */
9
+ const upwarn = (rules = {}) => {
10
+ return Object.fromEntries(Object.entries(rules).map(([rule, option]) => {
11
+ return [rule, option === "warn" ? "error" : option];
12
+ }));
13
+ };
14
+ //#endregion
15
+ export { upwarn as t };
@@ -1,10 +1,9 @@
1
1
  import { GLOB_E2E, GLOB_TESTS, GLOB_TYPE_TESTS } from "./globs.mjs";
2
- import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
3
-
2
+ import { n as extractOptions, t as unwrapDefault } from "./interop-default-BDN5nH8B.mjs";
4
3
  //#region src/rules/vitest.ts
5
4
  const vitestRules = async (options) => {
6
5
  return {
7
- ...(await interopDefault(import("@vitest/eslint-plugin"))).configs.recommended.rules,
6
+ ...(await unwrapDefault(import("@vitest/eslint-plugin"))).configs.recommended.rules,
8
7
  "vitest/consistent-each-for": ["error", {
9
8
  describe: "each",
10
9
  it: "each",
@@ -64,11 +63,10 @@ const vitestRules = async (options) => {
64
63
  ...options?.overrides
65
64
  };
66
65
  };
67
-
68
66
  //#endregion
69
67
  //#region src/configs/vitest.ts
70
68
  async function vitestConfig(options) {
71
- const vitestPlugin = await interopDefault(import("@vitest/eslint-plugin"));
69
+ const vitestPlugin = await unwrapDefault(import("@vitest/eslint-plugin"));
72
70
  const extractedOptions = extractOptions(options);
73
71
  return [{
74
72
  files: [...GLOB_TESTS, ...extractedOptions?.typecheck ? GLOB_TYPE_TESTS : []],
@@ -79,6 +77,5 @@ async function vitestConfig(options) {
79
77
  settings: { vitest: { typecheck: extractedOptions?.typecheck ?? false } }
80
78
  }];
81
79
  }
82
-
83
80
  //#endregion
84
- export { vitestConfig as default };
81
+ export { vitestConfig as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jimmy.codes/eslint-config",
3
- "version": "7.4.0",
3
+ "version": "7.5.1",
4
4
  "description": "A simple, modern ESLint config that covers most use cases.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -39,47 +39,47 @@
39
39
  "dist"
40
40
  ],
41
41
  "dependencies": {
42
- "@eslint-community/eslint-plugin-eslint-comments": "^4.6.0",
43
- "@eslint/js": "^9.39.2",
42
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
43
+ "@eslint/js": "^9.39.4",
44
44
  "@next/eslint-plugin-next": "^16.1.6",
45
- "@stylistic/eslint-plugin": "^5.8.0",
45
+ "@stylistic/eslint-plugin": "^5.10.0",
46
46
  "@tanstack/eslint-plugin-query": "^5.91.4",
47
47
  "@types/eslint": "9.6.1",
48
- "@typescript-eslint/parser": "^8.56.0",
49
- "@typescript-eslint/utils": "^8.56.0",
50
- "@vitest/eslint-plugin": "^1.6.9",
48
+ "@typescript-eslint/parser": "^8.57.0",
49
+ "@typescript-eslint/utils": "^8.57.0",
50
+ "@vitest/eslint-plugin": "^1.6.10",
51
51
  "astro-eslint-parser": "^1.3.0",
52
- "eslint-config-flat-gitignore": "^2.1.0",
52
+ "eslint-config-flat-gitignore": "^2.2.1",
53
53
  "eslint-config-prettier": "^10.1.8",
54
54
  "eslint-import-resolver-typescript": "^4.4.4",
55
55
  "eslint-plugin-arrow-return-style-x": "^1.2.6",
56
56
  "eslint-plugin-astro": "^1.6.0",
57
- "eslint-plugin-de-morgan": "^2.0.0",
57
+ "eslint-plugin-de-morgan": "^2.1.1",
58
58
  "eslint-plugin-erasable-syntax-only": "0.4.0",
59
- "eslint-plugin-import-x": "^4.16.1",
59
+ "eslint-plugin-import-x": "^4.16.2",
60
60
  "eslint-plugin-jest": "^29.15.0",
61
61
  "eslint-plugin-jest-dom": "^5.5.0",
62
- "eslint-plugin-jsdoc": "^62.6.0",
62
+ "eslint-plugin-jsdoc": "^62.7.1",
63
63
  "eslint-plugin-jsx-a11y": "^6.10.2",
64
64
  "eslint-plugin-n": "^17.24.0",
65
65
  "eslint-plugin-perfectionist": "^5.6.0",
66
- "eslint-plugin-playwright": "^2.6.0",
66
+ "eslint-plugin-playwright": "^2.9.0",
67
67
  "eslint-plugin-react-compiler": "19.1.0-rc.2",
68
68
  "eslint-plugin-react-dom": "^2.13.0",
69
69
  "eslint-plugin-react-hooks": "^7.0.1",
70
70
  "eslint-plugin-react-hooks-extra": "^2.13.0",
71
71
  "eslint-plugin-react-naming-convention": "^2.13.0",
72
- "eslint-plugin-react-refresh": "0.5.0",
72
+ "eslint-plugin-react-refresh": "0.5.2",
73
73
  "eslint-plugin-react-rsc": "^2.13.0",
74
74
  "eslint-plugin-react-web-api": "^2.13.0",
75
75
  "eslint-plugin-react-x": "^2.13.0",
76
- "eslint-plugin-regexp": "^3.0.0",
76
+ "eslint-plugin-regexp": "^3.1.0",
77
77
  "eslint-plugin-storybook": "0.12.0",
78
78
  "eslint-plugin-testing-library": "^7.16.0",
79
79
  "eslint-plugin-unicorn": "^63.0.0",
80
- "globals": "^17.3.0",
80
+ "globals": "^17.4.0",
81
81
  "local-pkg": "^1.1.2",
82
- "typescript-eslint": "^8.56.0"
82
+ "typescript-eslint": "^8.57.0"
83
83
  },
84
84
  "peerDependencies": {
85
85
  "eslint": ">=9.38.0"