@shayanthenerd/eslint-config 0.1.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/README.md +25 -9
  2. package/dist/configs/base.js +1 -1
  3. package/dist/configs/commons.js +3 -2
  4. package/dist/configs/importX.js +22 -2
  5. package/dist/configs/oxlintOverrides.js +3 -1
  6. package/dist/configs/tailwind.js +3 -3
  7. package/dist/configs/typescript.js +1 -1
  8. package/dist/prettier.config.d.ts +6 -0
  9. package/dist/prettier.config.js +22 -26
  10. package/dist/rules/importX.js +12 -12
  11. package/dist/rules/vue.js +4 -2
  12. package/dist/types/configOptions/importX.d.ts +16 -7
  13. package/dist/types/eslint-schema.d.ts +475 -1
  14. package/dist/utils/globs.js +3 -2
  15. package/dist/utils/options/defaultOptions.js +2 -1
  16. package/dist/utils/options/enableDetectedConfigs.js +8 -4
  17. package/package.json +30 -37
  18. package/dist/_virtual/rolldown_runtime.cjs +0 -30
  19. package/dist/configs/base.cjs +0 -44
  20. package/dist/configs/commons.cjs +0 -26
  21. package/dist/configs/css.cjs +0 -29
  22. package/dist/configs/cypress.cjs +0 -23
  23. package/dist/configs/html.cjs +0 -23
  24. package/dist/configs/importX.cjs +0 -26
  25. package/dist/configs/nuxtMultiRootTemplate.cjs +0 -14
  26. package/dist/configs/oxlintOverrides.cjs +0 -49
  27. package/dist/configs/perfectionist.cjs +0 -24
  28. package/dist/configs/playwright.cjs +0 -23
  29. package/dist/configs/storybook.cjs +0 -24
  30. package/dist/configs/stylistic.cjs +0 -23
  31. package/dist/configs/tailwind.cjs +0 -43
  32. package/dist/configs/typescript.cjs +0 -31
  33. package/dist/configs/vitest.cjs +0 -23
  34. package/dist/configs/vue.cjs +0 -35
  35. package/dist/configs/vueComponentNames.cjs +0 -19
  36. package/dist/index.cjs +0 -55
  37. package/dist/index.d.cts +0 -16
  38. package/dist/rules/css.cjs +0 -65
  39. package/dist/rules/cypress.cjs +0 -16
  40. package/dist/rules/html.cjs +0 -53
  41. package/dist/rules/importX.cjs +0 -51
  42. package/dist/rules/javascript.cjs +0 -164
  43. package/dist/rules/perfectionist.cjs +0 -73
  44. package/dist/rules/playwright.cjs +0 -28
  45. package/dist/rules/storybook.cjs +0 -16
  46. package/dist/rules/stylistic.cjs +0 -160
  47. package/dist/rules/tailwind.cjs +0 -36
  48. package/dist/rules/typescript.cjs +0 -62
  49. package/dist/rules/vitest.cjs +0 -47
  50. package/dist/rules/vue.cjs +0 -169
  51. package/dist/rules/vueAccessibility.cjs +0 -23
  52. package/dist/types/configOptions/base.d.cts +0 -47
  53. package/dist/types/configOptions/css.d.cts +0 -27
  54. package/dist/types/configOptions/html.d.cts +0 -27
  55. package/dist/types/configOptions/importX.d.cts +0 -20
  56. package/dist/types/configOptions/nuxt.d.cts +0 -42
  57. package/dist/types/configOptions/perfectionist.d.cts +0 -16
  58. package/dist/types/configOptions/stylistic.d.cts +0 -145
  59. package/dist/types/configOptions/tailwind.d.cts +0 -46
  60. package/dist/types/configOptions/test.d.cts +0 -55
  61. package/dist/types/configOptions/typescript.d.cts +0 -36
  62. package/dist/types/configOptions/vue.d.cts +0 -211
  63. package/dist/types/configOptions/vueAccessibility.d.cts +0 -34
  64. package/dist/types/eslint-schema.d.cts +0 -13258
  65. package/dist/types/eslintRules.d.cts +0 -12
  66. package/dist/types/helpers.d.cts +0 -5
  67. package/dist/types/index.d.cts +0 -360
  68. package/dist/utils/globs.cjs +0 -31
  69. package/dist/utils/ignores/defaultIgnorePatterns.cjs +0 -58
  70. package/dist/utils/ignores/getIgnorePatterns.cjs +0 -16
  71. package/dist/utils/ignores/resolveGitignorePatterns.cjs +0 -27
  72. package/dist/utils/isEmptyString.cjs +0 -8
  73. package/dist/utils/isEnabled.cjs +0 -8
  74. package/dist/utils/isPackageDetected.cjs +0 -22
  75. package/dist/utils/options/defaultOptions.cjs +0 -168
  76. package/dist/utils/options/enableDetectedConfigs.cjs +0 -36
  77. package/dist/utils/options/mergeWithDefaults.cjs +0 -22
  78. package/dist/utils/vue/getRestrictedVueElements.cjs +0 -28
  79. package/dist/utils/vue/getRestrictedVueInputs.cjs +0 -24
@@ -16,7 +16,9 @@ declare module 'eslint-flat-config-utils' {
16
16
  'shayanthenerd/base'?: true;
17
17
  'shayanthenerd/base'?: true;
18
18
  'shayanthenerd/commons'?: true;
19
+ 'shayanthenerd/import-x__import/recommended'?: true;
19
20
  'shayanthenerd/import-x__import-x/recommended'?: true;
21
+ 'shayanthenerd/import-x__import/typescript'?: true;
20
22
  'shayanthenerd/import-x__import-x/typescript'?: true;
21
23
  'shayanthenerd/import-x'?: true;
22
24
  'shayanthenerd/stylistic'?: true;
@@ -2149,6 +2151,236 @@ interface ESLintSchema {
2149
2151
  * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/unambiguous.md
2150
2152
  */
2151
2153
  '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<[]>;
2152
2384
  /**
2153
2385
  * Enforce consistent indentation
2154
2386
  * @see https://eslint.org/docs/latest/rules/indent
@@ -7749,6 +7981,7 @@ type AccessorPairs = [] | [{
7749
7981
  getWithoutSet?: boolean;
7750
7982
  setWithoutGet?: boolean;
7751
7983
  enforceForClassMembers?: boolean;
7984
+ enforceForTSTypes?: boolean;
7752
7985
  }];
7753
7986
  // ----- array-bracket-newline -----
7754
7987
  type ArrayBracketNewline = [] | [(("always" | "never" | "consistent") | {
@@ -8526,7 +8759,9 @@ type GetterReturn = [] | [{
8526
8759
  allowImplicit?: boolean;
8527
8760
  }];
8528
8761
  // ----- grouped-accessor-pairs -----
8529
- type GroupedAccessorPairs = [] | [("anyOrder" | "getBeforeSet" | "setBeforeGet")];
8762
+ type GroupedAccessorPairs = [] | [("anyOrder" | "getBeforeSet" | "setBeforeGet")] | [("anyOrder" | "getBeforeSet" | "setBeforeGet"), {
8763
+ enforceForTSTypes?: boolean;
8764
+ }];
8530
8765
  // ----- handle-callback-err -----
8531
8766
  type HandleCallbackErr = [] | [string];
8532
8767
  // ----- id-blacklist -----
@@ -8795,6 +9030,244 @@ type ImportXPreferDefaultExport = [] | [{
8795
9030
  type ImportXPreferNamespaceImport = [] | [{
8796
9031
  patterns?: string[];
8797
9032
  }];
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
+ }];
8798
9271
  // ----- indent -----
8799
9272
  type Indent = [] | [("tab" | number)] | [("tab" | number), {
8800
9273
  SwitchCase?: number;
@@ -9723,6 +10196,7 @@ type NoUnusedVars = [] | [(("all" | "local") | {
9723
10196
  caughtErrorsIgnorePattern?: string;
9724
10197
  destructuredArrayIgnorePattern?: string;
9725
10198
  ignoreClassWithStaticInitBlock?: boolean;
10199
+ ignoreUsingDeclarations?: boolean;
9726
10200
  reportUsedIgnorePattern?: boolean;
9727
10201
  })];
9728
10202
  // ----- no-use-before-define -----
@@ -13,11 +13,12 @@ const commonsFolders = [
13
13
  "repo?(s|sitory|sitories)"
14
14
  ];
15
15
  const globs = {
16
+ css: "**/*.css",
17
+ html: "**/*.html",
18
+ ts: "**/*.?([mc])ts?(x)",
16
19
  src: `**/*.${srcExtensions}`,
17
20
  commons: `**/{${commonsFolders.join(",")}}/**/*.${srcExtensions}`,
18
21
  commonsIgnore: `**/lint-staged.config.${srcExtensions}`,
19
- html: "**/*.html",
20
- css: "**/*.css",
21
22
  vue: `**/*.${vueExtensions}`,
22
23
  vueMultiRootTemplate: `**/pages/**/(_|-)components/**/*.${vueExtensions}`,
23
24
  vueComponentNames: `**/{{app,error},{layouts,pages}/**/*}.${vueExtensions}`,
@@ -73,7 +73,8 @@ const defaultOptions = {
73
73
  overrides: {}
74
74
  },
75
75
  importX: {
76
- requireFileExtension: "always",
76
+ removeUnusedImports: true,
77
+ requireFileExtension: true,
77
78
  overrides: {}
78
79
  },
79
80
  perfectionist: {
@@ -5,10 +5,6 @@ import { isPackageDetected, logDetectedPackages } from "../isPackageDetected.js"
5
5
  function enableDetectedConfigs(options) {
6
6
  options.configs ??= {};
7
7
  options.configs.test ??= {};
8
- options.tsConfig ??= options.configs.typescript ? {
9
- rootDir: ".",
10
- filename: "tsconfig.json"
11
- } : false;
12
8
  options.configs.html ??= false;
13
9
  options.configs.css ??= false;
14
10
  options.configs.tailwind ??= false;
@@ -23,6 +19,14 @@ function enableDetectedConfigs(options) {
23
19
  options.configs.test.storybook ??= isPackageDetected("storybook", options);
24
20
  options.configs.test.playwright ??= isPackageDetected("@playwright/test", options);
25
21
  options.configs.oxlint ??= isPackageDetected("oxlint", options) ? defaultOptions.configs.oxlint : false;
22
+ options.tsConfig ??= options.configs.typescript ? {
23
+ rootDir: ".",
24
+ filename: "tsconfig.json"
25
+ } : false;
26
+ if (options.configs.typescript && options.configs.vue) {
27
+ options.configs.vue = options.configs.vue === true ? {} : options.configs.vue;
28
+ options.configs.vue.blockLang = { script: "ts" };
29
+ }
26
30
  if (options.configs.nuxt) {
27
31
  if (options.configs.nuxt === true) options.configs.nuxt = {};
28
32
  options.configs.nuxt.ui ??= isPackageDetected("@nuxt/ui", options);