@eienjs/eslint-config 1.0.2 → 1.1.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/dist/cli/index.js CHANGED
@@ -9,7 +9,7 @@ import parse from "parse-gitignore";
9
9
  import { execSync } from "node:child_process";
10
10
 
11
11
  //#region package.json
12
- var version = "1.0.2";
12
+ var version = "1.1.0";
13
13
 
14
14
  //#endregion
15
15
  //#region src/cli/constants.ts
@@ -131,7 +131,7 @@ async function updateEslintFiles(result) {
131
131
  p.log.success(c.green`Created ${configFileName}`);
132
132
  const files = fs.readdirSync(cwd);
133
133
  const legacyConfig = [];
134
- for (const file of files) if (/eslint|prettier/.test(file) && !/eslint\.config\./.test(file)) legacyConfig.push(file);
134
+ for (const file of files) if (/eslint|prettier/.test(file) && !file.includes("eslint.config.")) legacyConfig.push(file);
135
135
  if (legacyConfig.length > 0) p.note(c.dim(legacyConfig.join(", ")), "You can now remove those files manually");
136
136
  }
137
137
 
@@ -173,7 +173,7 @@ async function updatePackageJson(result) {
173
173
  }
174
174
  for (const framework of result.frameworks) {
175
175
  const deps = dependenciesMap[framework];
176
- if (deps) for (const f of deps) {
176
+ if (deps.length > 0) for (const f of deps) {
177
177
  pkg.devDependencies[f] = versionsMap[f];
178
178
  addedPackages.push(f);
179
179
  }
@@ -208,8 +208,8 @@ async function updateVscodeSettings(result) {
208
208
  //#region src/cli/run.ts
209
209
  async function run(options = {}) {
210
210
  const argSkipPrompt = Boolean(process.env.SKIP_PROMPT) || options.yes;
211
- const argTemplate = options.frameworks?.map((m) => m?.trim()).filter(Boolean);
212
- const argExtra = options.extra?.map((m) => m?.trim()).filter(Boolean);
211
+ const argTemplate = options.frameworks?.map((m) => m.trim()).filter(Boolean);
212
+ const argExtra = options.extra?.map((m) => m.trim()).filter(Boolean);
213
213
  if (fs.existsSync(path.join(process.cwd(), "eslint.config.js"))) {
214
214
  p.log.warn(c.yellow`eslint.config.js already exists, migration wizard exited.`);
215
215
  return process.exit(1);
@@ -223,16 +223,16 @@ async function run(options = {}) {
223
223
  if (!argSkipPrompt) {
224
224
  result = await p.group({
225
225
  uncommittedConfirmed: async () => {
226
- if (argSkipPrompt || isGitClean()) return true;
226
+ if (isGitClean()) return true;
227
227
  return p.confirm({
228
228
  initialValue: false,
229
229
  message: "There are uncommitted changes in the current repository, are you sure to continue?"
230
230
  });
231
231
  },
232
232
  frameworks: async ({ results }) => {
233
- const isArgTemplateValid = typeof argTemplate === "string" && Boolean(frameworks.includes(argTemplate));
233
+ const isArgTemplateValid = typeof argTemplate === "string" && frameworks.includes(argTemplate);
234
234
  if (!results.uncommittedConfirmed || isArgTemplateValid) return;
235
- const message = !isArgTemplateValid && argTemplate ? `"${argTemplate.toString()}" isn't a valid template. Please choose from below: ` : "Select a framework:";
235
+ const message = argTemplate ? `"${argTemplate.toString()}" isn't a valid template. Please choose from below: ` : "Select a framework:";
236
236
  return p.multiselect({
237
237
  message: c.reset(message),
238
238
  options: frameworkOptions,
@@ -242,7 +242,7 @@ async function run(options = {}) {
242
242
  extra: async ({ results }) => {
243
243
  const isArgExtraValid = argExtra?.length && argExtra.filter((element) => !extra.includes(element)).length === 0;
244
244
  if (!results.uncommittedConfirmed || isArgExtraValid) return;
245
- const message = !isArgExtraValid && argExtra ? `"${argExtra.toString()}" isn't a valid extra util. Please choose from below: ` : "Select a extra utils:";
245
+ const message = argExtra ? `"${argExtra.toString()}" isn't a valid extra util. Please choose from below: ` : "Select a extra utils:";
246
246
  return p.multiselect({
247
247
  message: c.reset(message),
248
248
  options: extraOptions,
@@ -1,4 +1,4 @@
1
- import { OptionsAdonisJS, OptionsComponentExts, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsNuxt, OptionsOverrides, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsVue, StylisticConfig, TypedFlatConfigItem } from "../types-Dox_r0zd.js";
1
+ import { OptionsAdonisJS, OptionsComponentExts, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsNuxt, OptionsOverrides, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsVue, StylisticConfig, TypedFlatConfigItem } from "../types-BOQRnHTY.js";
2
2
 
3
3
  //#region src/configs/adonisjs.d.ts
4
4
  declare function adonisjs(options?: OptionsAdonisJS): Promise<TypedFlatConfigItem[]>;
@@ -7,25 +7,25 @@ declare function adonisjs(options?: OptionsAdonisJS): Promise<TypedFlatConfigIte
7
7
  declare function astro(options?: OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<TypedFlatConfigItem[]>;
8
8
  //#endregion
9
9
  //#region src/configs/command.d.ts
10
- declare function command(): Promise<TypedFlatConfigItem[]>;
10
+ declare function command(): TypedFlatConfigItem[];
11
11
  //#endregion
12
12
  //#region src/configs/comments.d.ts
13
- declare function comments(): Promise<TypedFlatConfigItem[]>;
13
+ declare function comments(): TypedFlatConfigItem[];
14
14
  //#endregion
15
15
  //#region src/configs/disables.d.ts
16
- declare function disables(): Promise<TypedFlatConfigItem[]>;
16
+ declare function disables(): TypedFlatConfigItem[];
17
17
  //#endregion
18
18
  //#region src/configs/formatters.d.ts
19
19
  declare function formatters(options?: OptionsFormatters | true, stylistic?: StylisticConfig): Promise<TypedFlatConfigItem[]>;
20
20
  //#endregion
21
21
  //#region src/configs/ignores.d.ts
22
- declare function ignores(userIgnores?: string[]): Promise<TypedFlatConfigItem[]>;
22
+ declare function ignores(userIgnores?: string[]): TypedFlatConfigItem[];
23
23
  //#endregion
24
24
  //#region src/configs/imports.d.ts
25
- declare function imports(options?: OptionsOverrides & OptionsStylistic): Promise<TypedFlatConfigItem[]>;
25
+ declare function imports(options?: OptionsOverrides & OptionsStylistic): TypedFlatConfigItem[];
26
26
  //#endregion
27
27
  //#region src/configs/javascript.d.ts
28
- declare function javascript(options?: OptionsIsInEditor & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
28
+ declare function javascript(options?: OptionsIsInEditor & OptionsOverrides): TypedFlatConfigItem[];
29
29
  //#endregion
30
30
  //#region src/configs/jsdoc.d.ts
31
31
  declare function jsdoc(options?: OptionsStylistic): Promise<TypedFlatConfigItem[]>;
@@ -37,7 +37,7 @@ declare function jsonc(options?: OptionsFiles & OptionsStylistic & OptionsOverri
37
37
  declare function markdown(options?: OptionsFiles & OptionsComponentExts & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
38
38
  //#endregion
39
39
  //#region src/configs/node.d.ts
40
- declare function node(): Promise<TypedFlatConfigItem[]>;
40
+ declare function node(): TypedFlatConfigItem[];
41
41
  //#endregion
42
42
  //#region src/configs/nuxt.d.ts
43
43
  declare function nuxt(options?: OptionsNuxt & OptionsStylistic): Promise<TypedFlatConfigItem[]>;
@@ -48,13 +48,13 @@ declare function nuxt(options?: OptionsNuxt & OptionsStylistic): Promise<TypedFl
48
48
  *
49
49
  * @see https://github.com/azat-io/eslint-plugin-perfectionist
50
50
  */
51
- declare function perfectionist(): Promise<TypedFlatConfigItem[]>;
51
+ declare function perfectionist(): TypedFlatConfigItem[];
52
52
  //#endregion
53
53
  //#region src/configs/pnpm.d.ts
54
54
  declare function pnpm(): Promise<TypedFlatConfigItem[]>;
55
55
  //#endregion
56
56
  //#region src/configs/regexp.d.ts
57
- declare function regexp(options?: OptionsRegExp & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
57
+ declare function regexp(options?: OptionsRegExp & OptionsOverrides): TypedFlatConfigItem[];
58
58
  //#endregion
59
59
  //#region src/configs/sort.d.ts
60
60
  /**
@@ -62,7 +62,7 @@ declare function regexp(options?: OptionsRegExp & OptionsOverrides): Promise<Typ
62
62
  *
63
63
  * Requires `jsonc` config
64
64
  */
65
- declare function sortPackageJson(): Promise<TypedFlatConfigItem[]>;
65
+ declare function sortPackageJson(): TypedFlatConfigItem[];
66
66
  /**
67
67
  * Sort tsconfig.json
68
68
  *
@@ -82,10 +82,10 @@ declare function test(options?: OptionsFiles & OptionsIsInEditor & OptionsOverri
82
82
  declare function toml(options?: OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<TypedFlatConfigItem[]>;
83
83
  //#endregion
84
84
  //#region src/configs/typescript.d.ts
85
- declare function typescript(options?: OptionsFiles & OptionsComponentExts & OptionsOverrides & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions): Promise<TypedFlatConfigItem[]>;
85
+ declare function typescript(options?: OptionsFiles & OptionsComponentExts & OptionsOverrides & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions & OptionsStylistic): Promise<TypedFlatConfigItem[]>;
86
86
  //#endregion
87
87
  //#region src/configs/unicorn.d.ts
88
- declare function unicorn(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
88
+ declare function unicorn(options?: OptionsOverrides): TypedFlatConfigItem[];
89
89
  //#endregion
90
90
  //#region src/configs/vue.d.ts
91
91
  declare function vue(options?: OptionsVue & OptionsHasTypeScript & OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<TypedFlatConfigItem[]>;
@@ -1,3 +1,3 @@
1
- import { StylisticConfigDefaults, adonisjs, astro, command, comments, disables, formatters, ignores, imports, javascript, jsdoc, jsonc, markdown, node, nuxt, perfectionist, pnpm, regexp, sortPackageJson, sortTsconfig, stylistic, test, toml, typescript, unicorn, vue, yaml } from "../configs-2UAjGCgy.js";
1
+ import { StylisticConfigDefaults, adonisjs, astro, command, comments, disables, formatters, ignores, imports, javascript, jsdoc, jsonc, markdown, node, nuxt, perfectionist, pnpm, regexp, sortPackageJson, sortTsconfig, stylistic, test, toml, typescript, unicorn, vue, yaml } from "../configs-CCTIx5kN.js";
2
2
 
3
3
  export { StylisticConfigDefaults, adonisjs, astro, command, comments, disables, formatters, ignores, imports, javascript, jsdoc, jsonc, markdown, node, nuxt, perfectionist, pnpm, regexp, sortPackageJson, sortTsconfig, stylistic, test, toml, typescript, unicorn, vue, yaml };
@@ -142,7 +142,7 @@ function isPackageInScope(name) {
142
142
  return isPackageExists(name, { paths: [scopeUrl] });
143
143
  }
144
144
  async function ensurePackages(packages) {
145
- if (process.env.CI || process.stdout.isTTY === false || isCwdInScope === false) return;
145
+ if (process.env.CI || !process.stdout.isTTY || !isCwdInScope) return;
146
146
  const nonExistingPackages = packages.filter((i) => i && !isPackageInScope(i));
147
147
  if (nonExistingPackages.length === 0) return;
148
148
  const p = await import("@clack/prompts");
@@ -318,7 +318,7 @@ async function astro(options = {}) {
318
318
 
319
319
  //#endregion
320
320
  //#region src/configs/command.ts
321
- async function command() {
321
+ function command() {
322
322
  return [{
323
323
  ...createCommand(),
324
324
  name: "eienjs/command/rules"
@@ -327,7 +327,7 @@ async function command() {
327
327
 
328
328
  //#endregion
329
329
  //#region src/configs/comments.ts
330
- async function comments() {
330
+ function comments() {
331
331
  return [{
332
332
  name: "eienjs/eslint-comments/rules",
333
333
  plugins: { "@eslint-community/eslint-comments": pluginComments },
@@ -343,7 +343,7 @@ async function comments() {
343
343
 
344
344
  //#endregion
345
345
  //#region src/configs/disables.ts
346
- async function disables() {
346
+ function disables() {
347
347
  return [
348
348
  {
349
349
  files: [`**/scripts/${GLOB_SRC}`],
@@ -351,7 +351,8 @@ async function disables() {
351
351
  rules: {
352
352
  "antfu/no-top-level-await": "off",
353
353
  "no-console": "off",
354
- "@typescript-eslint/explicit-function-return-type": "off"
354
+ "@typescript-eslint/explicit-function-return-type": "off",
355
+ "@typescript-eslint/no-deprecated": "off"
355
356
  }
356
357
  },
357
358
  {
@@ -360,7 +361,8 @@ async function disables() {
360
361
  rules: {
361
362
  "antfu/no-top-level-await": "off",
362
363
  "no-console": "off",
363
- "unicorn/no-process-exit": "off"
364
+ "unicorn/no-process-exit": "off",
365
+ "@typescript-eslint/no-unnecessary-condition": "off"
364
366
  }
365
367
  },
366
368
  {
@@ -624,7 +626,7 @@ async function formatters(options = {}, stylistic$1 = {}) {
624
626
 
625
627
  //#endregion
626
628
  //#region src/configs/ignores.ts
627
- async function ignores(userIgnores = []) {
629
+ function ignores(userIgnores = []) {
628
630
  return [{
629
631
  ignores: [...GLOB_EXCLUDE, ...userIgnores],
630
632
  name: "eienjs/ignores"
@@ -633,7 +635,7 @@ async function ignores(userIgnores = []) {
633
635
 
634
636
  //#endregion
635
637
  //#region src/configs/imports.ts
636
- async function imports(options = {}) {
638
+ function imports(options = {}) {
637
639
  const { overrides = {}, stylistic: stylistic$1 = true } = options;
638
640
  return [{
639
641
  name: "eienjs/imports/rules",
@@ -658,23 +660,19 @@ async function imports(options = {}) {
658
660
 
659
661
  //#endregion
660
662
  //#region src/configs/javascript.ts
661
- async function javascript(options = {}) {
663
+ function javascript(options = {}) {
662
664
  const { isInEditor = false, overrides = {} } = options;
663
665
  return [{
664
666
  languageOptions: {
665
- ecmaVersion: 2022,
666
667
  globals: {
667
668
  ...globals.browser,
668
- ...globals.es2021,
669
+ ...globals.es2025,
669
670
  ...globals.node,
670
671
  document: "readonly",
671
672
  navigator: "readonly",
672
673
  window: "readonly"
673
674
  },
674
- parserOptions: {
675
- ecmaVersion: 2022,
676
- sourceType: "module"
677
- },
675
+ parserOptions: { sourceType: "module" },
678
676
  sourceType: "module"
679
677
  },
680
678
  linterOptions: { reportUnusedDisableDirectives: true },
@@ -1106,7 +1104,7 @@ async function markdown(options = {}) {
1106
1104
 
1107
1105
  //#endregion
1108
1106
  //#region src/configs/node.ts
1109
- async function node() {
1107
+ function node() {
1110
1108
  return [{
1111
1109
  name: "eienjs/node/rules",
1112
1110
  plugins: { n: pluginNode },
@@ -1143,9 +1141,9 @@ async function nuxt(options = {}) {
1143
1141
  dirs.utils = dirs.utils ?? dirs.src.map((src) => `${src}/utils`);
1144
1142
  dirs.componentsPrefixed = dirs.componentsPrefixed ?? [];
1145
1143
  const fileSingleRoot = [
1146
- ...dirs.layouts?.map((layoutsDir) => join(layoutsDir, `**/*.${GLOB_EXTS}`)) || [],
1147
- ...dirs.pages?.map((pagesDir) => join(pagesDir, `**/*.${GLOB_EXTS}`)) || [],
1148
- ...dirs.components?.map((componentsDir) => join(componentsDir, `**/*.server.${GLOB_EXTS}`)) || []
1144
+ ...dirs.layouts.map((layoutsDir) => join(layoutsDir, `**/*.${GLOB_EXTS}`)),
1145
+ ...dirs.pages.map((pagesDir) => join(pagesDir, `**/*.${GLOB_EXTS}`)),
1146
+ ...dirs.components.map((componentsDir) => join(componentsDir, `**/*.server.${GLOB_EXTS}`))
1149
1147
  ].sort();
1150
1148
  const INLINE_ELEMENTS = [
1151
1149
  "a",
@@ -1262,7 +1260,7 @@ async function nuxt(options = {}) {
1262
1260
  *
1263
1261
  * @see https://github.com/azat-io/eslint-plugin-perfectionist
1264
1262
  */
1265
- async function perfectionist() {
1263
+ function perfectionist() {
1266
1264
  return [{
1267
1265
  name: "eienjs/perfectionist/setup",
1268
1266
  plugins: { perfectionist: pluginPerfectionist },
@@ -1340,7 +1338,7 @@ async function pnpm() {
1340
1338
 
1341
1339
  //#endregion
1342
1340
  //#region src/configs/regexp.ts
1343
- async function regexp(options = {}) {
1341
+ function regexp(options = {}) {
1344
1342
  const config = configs["flat/recommended"];
1345
1343
  const rules = { ...config.rules };
1346
1344
  if (options.level === "warn") {
@@ -1363,7 +1361,7 @@ async function regexp(options = {}) {
1363
1361
  *
1364
1362
  * Requires `jsonc` config
1365
1363
  */
1366
- async function sortPackageJson() {
1364
+ function sortPackageJson() {
1367
1365
  return [{
1368
1366
  files: ["**/package.json"],
1369
1367
  name: "eienjs/sort/package-json",
@@ -1668,7 +1666,7 @@ async function toml(options = {}) {
1668
1666
  //#endregion
1669
1667
  //#region src/configs/typescript.ts
1670
1668
  async function typescript(options = {}) {
1671
- const { componentExts = [], overrides = {}, overridesTypeAware = {}, parserOptions = {} } = options;
1669
+ const { componentExts = [], overrides = {}, overridesTypeAware = {}, parserOptions = {}, stylistic: stylistic$1 = true } = options;
1672
1670
  const files = options.files ?? [
1673
1671
  GLOB_TS,
1674
1672
  GLOB_TSX,
@@ -1676,7 +1674,7 @@ async function typescript(options = {}) {
1676
1674
  ];
1677
1675
  const filesTypeAware = options.filesTypeAware ?? [GLOB_TS, GLOB_TSX];
1678
1676
  const ignoresTypeAware = options.ignoresTypeAware ?? [`${GLOB_MARKDOWN}/**`, GLOB_ASTRO_TS];
1679
- const tsconfigPath = options?.tsconfigPath ?? void 0;
1677
+ const tsconfigPath = options.tsconfigPath ?? void 0;
1680
1678
  const isTypeAware = Boolean(tsconfigPath);
1681
1679
  const typeAwareRules = {
1682
1680
  "dot-notation": "off",
@@ -1794,8 +1792,9 @@ async function typescript(options = {}) {
1794
1792
  files,
1795
1793
  name: "eienjs/typescript/rules",
1796
1794
  rules: {
1797
- ...pluginTs.configs["eslint-recommended"].overrides[0].rules,
1795
+ ...pluginTs.configs["eslint-recommended"].overrides?.[0].rules,
1798
1796
  ...pluginTs.configs.strict.rules,
1797
+ ...stylistic$1 ? pluginTs.configs.stylistic.rules : {},
1799
1798
  "no-dupe-class-members": "off",
1800
1799
  "no-redeclare": "off",
1801
1800
  "no-use-before-define": "off",
@@ -1843,6 +1842,8 @@ async function typescript(options = {}) {
1843
1842
  ignores: ignoresTypeAware,
1844
1843
  name: "eienjs/typescript/rules-type-aware",
1845
1844
  rules: {
1845
+ ...pluginTs.configs["strict-type-checked"].rules,
1846
+ ...stylistic$1 ? pluginTs.configs["stylistic-type-checked"].rules : {},
1846
1847
  ...typeAwareRules,
1847
1848
  ...overridesTypeAware
1848
1849
  }
@@ -1852,7 +1853,7 @@ async function typescript(options = {}) {
1852
1853
 
1853
1854
  //#endregion
1854
1855
  //#region src/configs/unicorn.ts
1855
- async function unicorn(options = {}) {
1856
+ function unicorn(options = {}) {
1856
1857
  const { overrides = {} } = options;
1857
1858
  return [{
1858
1859
  name: "eienjs/unicorn/rules",
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Awaitable, ConfigNames, OptionsAdonisJS, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsNuxt, OptionsOverrides, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsVue, RuleOptions, Rules, StylisticConfig, TypedFlatConfigItem } from "./types-Dox_r0zd.js";
1
+ import { Awaitable, ConfigNames, OptionsAdonisJS, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsNuxt, OptionsOverrides, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsVue, RuleOptions, Rules, StylisticConfig, TypedFlatConfigItem } from "./types-BOQRnHTY.js";
2
2
  import { FlatConfigComposer } from "eslint-flat-config-utils";
3
3
  import { Linter } from "eslint";
4
4
 
@@ -11,7 +11,7 @@ declare const defaultPluginRenaming: {
11
11
  declare function eienjs(options?: OptionsConfig & Omit<TypedFlatConfigItem, 'files'>): FlatConfigComposer<TypedFlatConfigItem, ConfigNames>;
12
12
  type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
13
13
  declare function resolveSubOptions<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): ResolvedOptions<OptionsConfig[K]>;
14
- declare function getOverrides<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): Partial<Linter.RulesRecord & RuleOptions>;
14
+ declare function getOverrides(options: OptionsConfig, key: keyof OptionsConfig): Partial<Linter.RulesRecord & RuleOptions>;
15
15
  //#endregion
16
16
  //#region src/globs.d.ts
17
17
  declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_EXTS, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, adonisjs, astro, combine, command, comments, disables, ensurePackages, formatters, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, markdown, node, nuxt, parserPlain, perfectionist, pnpm, regexp, sortPackageJson, sortTsconfig, stylistic, test, toArray, toml, typescript, unicorn, vue, yaml } from "./configs-2UAjGCgy.js";
1
+ import { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_EXTS, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, adonisjs, astro, combine, command, comments, disables, ensurePackages, formatters, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, markdown, node, nuxt, parserPlain, perfectionist, pnpm, regexp, sortPackageJson, sortTsconfig, stylistic, test, toArray, toml, typescript, unicorn, vue, yaml } from "./configs-CCTIx5kN.js";
2
2
  import { FlatConfigComposer } from "eslint-flat-config-utils";
3
3
  import { isPackageExists } from "local-pkg";
4
4
 
@@ -54,6 +54,7 @@ function eienjs(options = {}) {
54
54
  if (enableTypeScript) configs.push(typescript({
55
55
  ...typescriptOptions,
56
56
  componentExts,
57
+ stylistic: stylisticOptions,
57
58
  overrides: getOverrides(options, "typescript")
58
59
  }));
59
60
  if (stylisticOptions) configs.push(stylistic({
@@ -11235,10 +11235,17 @@ type NoRestrictedExports = [] | [({
11235
11235
  };
11236
11236
  })];
11237
11237
  // ----- no-restricted-globals -----
11238
- type NoRestrictedGlobals = (string | {
11238
+ type NoRestrictedGlobals = ((string | {
11239
11239
  name: string;
11240
11240
  message?: string;
11241
- })[];
11241
+ })[] | [] | [{
11242
+ globals: (string | {
11243
+ name: string;
11244
+ message?: string;
11245
+ })[];
11246
+ checkGlobalObject?: boolean;
11247
+ globalObjects?: string[];
11248
+ }]);
11242
11249
  // ----- no-restricted-imports -----
11243
11250
  type NoRestrictedImports = ((string | {
11244
11251
  name: string;
@@ -11466,6 +11473,8 @@ type OneVar = [] | [(("always" | "never" | "consecutive") | {
11466
11473
  var?: ("always" | "never" | "consecutive");
11467
11474
  let?: ("always" | "never" | "consecutive");
11468
11475
  const?: ("always" | "never" | "consecutive");
11476
+ using?: ("always" | "never" | "consecutive");
11477
+ awaitUsing?: ("always" | "never" | "consecutive");
11469
11478
  } | {
11470
11479
  initialized?: ("always" | "never" | "consecutive");
11471
11480
  uninitialized?: ("always" | "never" | "consecutive");
@@ -15448,7 +15457,7 @@ interface VendoredPrettierOptionsRequired {
15448
15457
  /**
15449
15458
  * Provide ability to support new languages to prettier.
15450
15459
  */
15451
- plugins: Array<string | unknown>;
15460
+ plugins: unknown[];
15452
15461
  /**
15453
15462
  * How to handle whitespaces in HTML.
15454
15463
  * @default "css"
@@ -15498,7 +15507,7 @@ interface VendoredPrettierOptionsRequired {
15498
15507
  //#endregion
15499
15508
  //#region src/types.d.ts
15500
15509
  type Awaitable<T> = T | Promise<T>;
15501
- type Rules = Record<string, Linter.RuleEntry<any> | undefined> & RuleOptions;
15510
+ type Rules = Record<string, Linter.RuleEntry | undefined> & RuleOptions;
15502
15511
  /**
15503
15512
  * An updated version of ESLint's `Linter.Config`, which provides autocompletion
15504
15513
  * for `rules` and relaxes type limitations for `plugins` and `rules`, because
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eienjs/eslint-config",
3
3
  "type": "module",
4
- "version": "1.0.2",
4
+ "version": "1.1.0",
5
5
  "description": "EienJS ESLint Config",
6
6
  "author": "Fernando Isidro <luffynando@gmail.com> (https://github.com/luffynando/)",
7
7
  "license": "MIT",
@@ -30,7 +30,7 @@
30
30
  "dist"
31
31
  ],
32
32
  "engines": {
33
- "node": ">=20.11"
33
+ "node": ">=20.19"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "@adonisjs/eslint-plugin": "^2.0.1",
@@ -70,7 +70,7 @@
70
70
  "@clack/prompts": "^0.11.0",
71
71
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
72
72
  "@eslint/markdown": "^7.1.0",
73
- "@stylistic/eslint-plugin": "^5.2.2",
73
+ "@stylistic/eslint-plugin": "^5.2.3",
74
74
  "@typescript-eslint/eslint-plugin": "^8.39.0",
75
75
  "@typescript-eslint/parser": "^8.39.0",
76
76
  "@vitest/eslint-plugin": "^1.3.4",
@@ -88,7 +88,7 @@
88
88
  "eslint-plugin-no-only-tests": "^3.3.0",
89
89
  "eslint-plugin-perfectionist": "^4.15.0",
90
90
  "eslint-plugin-pnpm": "^1.1.0",
91
- "eslint-plugin-regexp": "^2.9.1",
91
+ "eslint-plugin-regexp": "^2.10.0",
92
92
  "eslint-plugin-toml": "^0.12.0",
93
93
  "eslint-plugin-unicorn": "^60.0.0",
94
94
  "eslint-plugin-unused-imports": "^4.1.4",
@@ -111,7 +111,7 @@
111
111
  "@eslint/config-inspector": "^1.1.0",
112
112
  "@nuxt/eslint-plugin": "^1.8.0",
113
113
  "@prettier/plugin-xml": "^3.4.2",
114
- "@types/node": "^22.17.0",
114
+ "@types/node": "^22.17.1",
115
115
  "astro-eslint-parser": "^1.2.2",
116
116
  "auto-changelog": "^2.5.0",
117
117
  "eslint": "^9.32.0",
@@ -121,7 +121,7 @@
121
121
  "husky": "^9.1.7",
122
122
  "np": "^10.2.0",
123
123
  "prettier-plugin-astro": "^0.14.1",
124
- "tsdown": "^0.13.3",
124
+ "tsdown": "^0.13.4",
125
125
  "tsx": "^4.20.3",
126
126
  "typescript": "^5.9.2"
127
127
  },