@eienjs/eslint-config 1.9.3 → 1.10.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.
@@ -1,11 +1,11 @@
1
1
  //#region src/cli/constants_generated.ts
2
2
  const versionsMap = {
3
3
  "@adonisjs/eslint-plugin": "^2.2.2",
4
- "@nuxt/eslint-plugin": "^1.15.1",
4
+ "@nuxt/eslint-plugin": "^1.15.2",
5
5
  "astro-eslint-parser": "^1.3.0",
6
- "eslint": "^9.39.3",
6
+ "eslint": "^10.0.2",
7
7
  "eslint-plugin-astro": "^1.6.0",
8
- "eslint-plugin-format": "^1.4.0",
8
+ "eslint-plugin-format": "^2.0.1",
9
9
  "prettier-plugin-astro": "^0.14.1"
10
10
  };
11
11
 
@@ -1,6 +1,6 @@
1
1
  import { getEslintConfigContent } from "../utils.mjs";
2
2
  import process from "node:process";
3
- import fsPromises from "node:fs/promises";
3
+ import fsp from "node:fs/promises";
4
4
  import fs from "node:fs";
5
5
  import path from "node:path";
6
6
  import * as p from "@clack/prompts";
@@ -12,13 +12,13 @@ async function updateEslintFiles(result) {
12
12
  const cwd = process.cwd();
13
13
  const pathESLintIgnore = path.join(cwd, ".eslintignore");
14
14
  const pathPackageJSON = path.join(cwd, "package.json");
15
- const pkgContent = await fsPromises.readFile(pathPackageJSON, "utf8");
15
+ const pkgContent = await fsp.readFile(pathPackageJSON, "utf8");
16
16
  const configFileName = JSON.parse(pkgContent).type === "module" ? "eslint.config.js" : "eslint.config.mjs";
17
17
  const pathFlatConfig = path.join(cwd, configFileName);
18
18
  const eslintIgnores = [];
19
19
  if (fs.existsSync(pathESLintIgnore)) {
20
20
  p.log.step(c.cyan`Migrating existing .eslintignore`);
21
- const globs = parse(await fsPromises.readFile(pathESLintIgnore, "utf8")).globs();
21
+ const globs = parse(await fsp.readFile(pathESLintIgnore, "utf8")).globs();
22
22
  for (const glob of globs) if (glob.type === "ignore") eslintIgnores.push(...glob.patterns);
23
23
  else if (glob.type === "unignore") eslintIgnores.push(...glob.patterns.map((pattern) => `!${pattern}`));
24
24
  }
@@ -27,7 +27,7 @@ async function updateEslintFiles(result) {
27
27
  if (result.extra.includes("formatter")) configLines.push("formatters: true,");
28
28
  for (const framework of result.frameworks) configLines.push(`${framework}: true,`);
29
29
  const eslintConfigContent = getEslintConfigContent(configLines.map((i) => ` ${i}`).join("\n"));
30
- await fsPromises.writeFile(pathFlatConfig, eslintConfigContent);
30
+ await fsp.writeFile(pathFlatConfig, eslintConfigContent);
31
31
  p.log.success(c.green`Created ${configFileName}`);
32
32
  const files = fs.readdirSync(cwd);
33
33
  const legacyConfig = [];
@@ -2,7 +2,7 @@ import { version } from "../../package.mjs";
2
2
  import { dependenciesMap } from "../constants.mjs";
3
3
  import { versionsMap } from "../constants_generated.mjs";
4
4
  import process from "node:process";
5
- import fsPromises from "node:fs/promises";
5
+ import fsp from "node:fs/promises";
6
6
  import path from "node:path";
7
7
  import * as p from "@clack/prompts";
8
8
  import c from "ansis";
@@ -12,7 +12,7 @@ async function updatePackageJson(result) {
12
12
  const cwd = process.cwd();
13
13
  const pathPackageJSON = path.join(cwd, "package.json");
14
14
  p.log.step(c.cyan`Bumping @eienjs/eslint-config to v${version}`);
15
- const pkgContent = await fsPromises.readFile(pathPackageJSON, "utf8");
15
+ const pkgContent = await fsp.readFile(pathPackageJSON, "utf8");
16
16
  const pkg = JSON.parse(pkgContent);
17
17
  pkg.devDependencies = pkg.devDependencies ?? {};
18
18
  pkg.devDependencies["@eienjs/eslint-config"] = `^${version}`;
@@ -38,7 +38,7 @@ async function updatePackageJson(result) {
38
38
  }
39
39
  }
40
40
  if (addedPackages.length > 0) p.note(c.dim(addedPackages.join(", ")), "Added packages");
41
- await fsPromises.writeFile(pathPackageJSON, JSON.stringify(pkg, null, 2));
41
+ await fsp.writeFile(pathPackageJSON, JSON.stringify(pkg, null, 2));
42
42
  p.log.success(c.green`Changes wrote to package.json`);
43
43
  }
44
44
 
@@ -1,6 +1,6 @@
1
1
  import { vscodeSettingsString } from "../constants.mjs";
2
2
  import process from "node:process";
3
- import fsPromises from "node:fs/promises";
3
+ import fsp from "node:fs/promises";
4
4
  import fs from "node:fs";
5
5
  import path from "node:path";
6
6
  import * as p from "@clack/prompts";
@@ -12,16 +12,16 @@ async function updateVscodeSettings(result) {
12
12
  if (!result.updateVscodeSettings) return;
13
13
  const dotVscodePath = path.join(cwd, ".vscode");
14
14
  const settingsPath = path.join(dotVscodePath, "settings.json");
15
- if (!fs.existsSync(dotVscodePath)) await fsPromises.mkdir(dotVscodePath, { recursive: true });
15
+ if (!fs.existsSync(dotVscodePath)) await fsp.mkdir(dotVscodePath, { recursive: true });
16
16
  if (fs.existsSync(settingsPath)) {
17
- let settingsContent = await fsPromises.readFile(settingsPath, "utf8");
17
+ let settingsContent = await fsp.readFile(settingsPath, "utf8");
18
18
  settingsContent = settingsContent.trim().replace(/\s*\}$/, "");
19
19
  settingsContent += settingsContent.endsWith(",") || settingsContent.endsWith("{") ? "" : ",";
20
20
  settingsContent += `${vscodeSettingsString}}\n`;
21
- await fsPromises.writeFile(settingsPath, settingsContent, "utf8");
21
+ await fsp.writeFile(settingsPath, settingsContent, "utf8");
22
22
  p.log.success(green`Updated .vscode/settings.json`);
23
23
  } else {
24
- await fsPromises.writeFile(settingsPath, `{${vscodeSettingsString}}\n`, "utf8");
24
+ await fsp.writeFile(settingsPath, `{${vscodeSettingsString}}\n`, "utf8");
25
25
  p.log.success(green`Created .vscode/settings.json`);
26
26
  }
27
27
  }
@@ -45,7 +45,6 @@ function javascript(options = {}) {
45
45
  "default-case-last": "error",
46
46
  "dot-notation": ["error", { allowKeywords: true }],
47
47
  "eqeqeq": ["error", "smart"],
48
- "logical-assignment-operators": ["error", "never"],
49
48
  "new-cap": ["error", {
50
49
  capIsNew: false,
51
50
  newIsCap: true,
@@ -5,9 +5,11 @@ import { interopDefault } from "../utils.mjs";
5
5
  async function jsdoc(options = {}) {
6
6
  const { stylistic = true } = options;
7
7
  return [{
8
+ name: "eienjs/jsdoc/setup",
9
+ plugins: { jsdoc: await interopDefault(import("eslint-plugin-jsdoc")) }
10
+ }, {
8
11
  files: [GLOB_SRC],
9
12
  name: "eienjs/jsdoc/rules",
10
- plugins: { jsdoc: await interopDefault(import("eslint-plugin-jsdoc")) },
11
13
  rules: {
12
14
  "jsdoc/check-access": "warn",
13
15
  "jsdoc/check-param-names": "warn",
@@ -9,13 +9,12 @@ async function jsonc(options = {}) {
9
9
  GLOB_JSONC
10
10
  ], overrides = {}, stylistic = true } = options;
11
11
  const { indent = 2 } = typeof stylistic === "boolean" ? {} : stylistic;
12
- const [pluginJsonc, parserJsonc] = await Promise.all([interopDefault(import("eslint-plugin-jsonc")), interopDefault(import("jsonc-eslint-parser"))]);
13
12
  return [{
14
13
  name: "eienjs/jsonc/setup",
15
- plugins: { jsonc: pluginJsonc }
14
+ plugins: { jsonc: await interopDefault(import("eslint-plugin-jsonc")) }
16
15
  }, {
17
16
  files,
18
- languageOptions: { parser: parserJsonc },
17
+ language: "jsonc/x",
19
18
  name: "eienjs/jsonc/rules",
20
19
  rules: {
21
20
  "jsonc/no-bigint-literals": "error",
@@ -1,6 +1,6 @@
1
- import { OptionsComponentExts, OptionsFiles, OptionsOverrides, TypedFlatConfigItem } from "../types.mjs";
1
+ import { OptionsComponentExts, OptionsFiles, OptionsMarkdown, TypedFlatConfigItem } from "../types.mjs";
2
2
 
3
3
  //#region src/configs/markdown.d.ts
4
- declare function markdown(options?: OptionsFiles & OptionsComponentExts & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
4
+ declare function markdown(options?: OptionsFiles & OptionsComponentExts & OptionsMarkdown): Promise<TypedFlatConfigItem[]>;
5
5
  //#endregion
6
6
  export { markdown };
@@ -1,10 +1,10 @@
1
1
  import { GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN } from "../globs.mjs";
2
- import { interopDefault, parserPlain } from "../utils.mjs";
2
+ import { interopDefault } from "../utils.mjs";
3
3
  import { mergeProcessors, processorPassThrough } from "eslint-merge-processors";
4
4
 
5
5
  //#region src/configs/markdown.ts
6
6
  async function markdown(options = {}) {
7
- const { componentExts = [], files = [GLOB_MARKDOWN], overrides = {} } = options;
7
+ const { componentExts = [], files = [GLOB_MARKDOWN], gfm = true, overrides = {}, overridesMarkdown = {} } = options;
8
8
  const markdown = await interopDefault(import("@eslint/markdown"));
9
9
  return [
10
10
  {
@@ -19,9 +19,33 @@ async function markdown(options = {}) {
19
19
  },
20
20
  {
21
21
  files,
22
- languageOptions: { parser: parserPlain },
22
+ language: gfm ? "markdown/gfm" : "markdown/commonmark",
23
23
  name: "eienjs/markdown/parser"
24
24
  },
25
+ {
26
+ files,
27
+ name: "eienjs/markdown/rules",
28
+ rules: {
29
+ ...markdown.configs.recommended.at(0)?.rules,
30
+ "markdown/no-missing-label-refs": "off",
31
+ ...overridesMarkdown
32
+ }
33
+ },
34
+ {
35
+ files,
36
+ name: "eienjs/markdown/disables/markdown",
37
+ rules: {
38
+ "@stylistic/indent": "off",
39
+ "command/command": "off",
40
+ "no-irregular-whitespace": "off",
41
+ "perfectionist/sort-exports": "off",
42
+ "perfectionist/sort-imports": "off",
43
+ "regexp/no-legacy-features": "off",
44
+ "regexp/no-missing-g-flag": "off",
45
+ "regexp/no-useless-dollar-replacements": "off",
46
+ "regexp/no-useless-flag": "off"
47
+ }
48
+ },
25
49
  {
26
50
  files: [
27
51
  GLOB_MARKDOWN,
@@ -29,7 +53,7 @@ async function markdown(options = {}) {
29
53
  ...componentExts.map((ext) => `${GLOB_MARKDOWN}/**/*.${ext}`)
30
54
  ],
31
55
  languageOptions: { parserOptions: { ecmaFeatures: { impliedStrict: true } } },
32
- name: "eienjs/markdown/disables",
56
+ name: "eienjs/markdown/disables/code",
33
57
  rules: {
34
58
  "@stylistic/comma-dangle": "off",
35
59
  "@stylistic/eol-last": "off",
@@ -4,9 +4,11 @@ import { pluginNode } from "../plugins.mjs";
4
4
  //#region src/configs/node.ts
5
5
  function node() {
6
6
  return [{
7
+ name: "eienjs/node/setup",
8
+ plugins: { n: pluginNode }
9
+ }, {
7
10
  files: [GLOB_SRC],
8
11
  name: "eienjs/node/rules",
9
- plugins: { n: pluginNode },
10
12
  rules: {
11
13
  "n/handle-callback-err": ["error", "^(err|error)$"],
12
14
  "n/no-deprecated-api": "error",
@@ -10,17 +10,16 @@ async function detectCatalogUsage() {
10
10
  return yaml.includes("catalog:") || yaml.includes("catalogs:");
11
11
  }
12
12
  async function pnpm(options) {
13
- const [pluginPnpm, pluginYaml, yamlParser, jsoncParser] = await Promise.all([
13
+ const [pluginPnpm, pluginYaml, yamlParser] = await Promise.all([
14
14
  interopDefault(import("eslint-plugin-pnpm")),
15
15
  interopDefault(import("eslint-plugin-yml")),
16
- interopDefault(import("yaml-eslint-parser")),
17
- interopDefault(import("jsonc-eslint-parser"))
16
+ interopDefault(import("yaml-eslint-parser"))
18
17
  ]);
19
18
  const { catalogs = await detectCatalogUsage(), isInEditor = false, json = true, sort = true, yaml = true } = options;
20
19
  const configs = [];
21
20
  if (json) configs.push({
22
21
  files: ["package.json", "**/package.json"],
23
- languageOptions: { parser: jsoncParser },
22
+ language: "jsonc/x",
24
23
  name: "eienjs/pnpm/package-json",
25
24
  plugins: { pnpm: pluginPnpm },
26
25
  rules: {
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ConfigNames, RuleOptions } from "./typegen.mjs";
2
- import { Awaitable, OptionsAdonisJS, OptionsComponentExts, OptionsConfig, OptionsErasableSyntaxOnly, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsNuxt, OptionsOverrides, OptionsPnpm, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsTypescriptWithErasableSyntaxOnly, OptionsVue, Rules, StylisticConfig, TypedFlatConfigItem } from "./types.mjs";
2
+ import { Awaitable, OptionsAdonisJS, OptionsComponentExts, OptionsConfig, OptionsErasableSyntaxOnly, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsMarkdown, OptionsNuxt, OptionsOverrides, OptionsPnpm, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsTypescriptWithErasableSyntaxOnly, OptionsVue, Rules, StylisticConfig, TypedFlatConfigItem } from "./types.mjs";
3
3
  import { ResolvedOptions, defaultPluginRenaming, eienjs, getOverrides, resolveSubOptions } from "./factory.mjs";
4
4
  import { CONFIG_PRESET_FULL_OFF, CONFIG_PRESET_FULL_ON } from "./config_presets.mjs";
5
5
  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 } from "./globs.mjs";
6
6
  import { combine, ensurePackages, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, parserPlain, toArray } from "./utils.mjs";
7
- export { Awaitable, CONFIG_PRESET_FULL_OFF, CONFIG_PRESET_FULL_ON, ConfigNames, 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, OptionsAdonisJS, OptionsComponentExts, OptionsConfig, OptionsErasableSyntaxOnly, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsNuxt, OptionsOverrides, OptionsPnpm, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsTypescriptWithErasableSyntaxOnly, OptionsVue, ResolvedOptions, RuleOptions, Rules, StylisticConfig, TypedFlatConfigItem, combine, eienjs as default, defaultPluginRenaming, eienjs, ensurePackages, getOverrides, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, parserPlain, resolveSubOptions, toArray };
7
+ export { Awaitable, CONFIG_PRESET_FULL_OFF, CONFIG_PRESET_FULL_ON, ConfigNames, 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, OptionsAdonisJS, OptionsComponentExts, OptionsConfig, OptionsErasableSyntaxOnly, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsMarkdown, OptionsNuxt, OptionsOverrides, OptionsPnpm, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsTypescriptWithErasableSyntaxOnly, OptionsVue, ResolvedOptions, RuleOptions, Rules, StylisticConfig, TypedFlatConfigItem, combine, eienjs as default, defaultPluginRenaming, eienjs, ensurePackages, getOverrides, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, parserPlain, resolveSubOptions, toArray };
@@ -1,5 +1,5 @@
1
1
  import process from "node:process";
2
- import fsPromises from "node:fs/promises";
2
+ import fsp from "node:fs/promises";
3
3
  import { fileURLToPath } from "node:url";
4
4
  import fs from "node:fs";
5
5
  import path from "node:path";
@@ -14,7 +14,7 @@ async function findUp(name, { cwd = process.cwd(), type = "file", stopAt } = {})
14
14
  while (directory) {
15
15
  const filePath = isAbsoluteName ? name : path.join(directory, name);
16
16
  try {
17
- const stats = await fsPromises.stat(filePath);
17
+ const stats = await fsp.stat(filePath);
18
18
  if (type === "file" && stats.isFile() || type === "directory" && stats.isDirectory()) return filePath;
19
19
  } catch {}
20
20
  if (directory === stopAt || directory === root) break;
package/dist/package.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "1.9.3";
2
+ var version = "1.10.0";
3
3
 
4
4
  //#endregion
5
5
  export { version };
@@ -1765,6 +1765,10 @@ interface RuleOptions {
1765
1765
  * Use dprint to format code
1766
1766
  */
1767
1767
  'format/dprint'?: Linter.RuleEntry<FormatDprint>;
1768
+ /**
1769
+ * Use oxfmt to format code
1770
+ */
1771
+ 'format/oxfmt'?: Linter.RuleEntry<FormatOxfmt>;
1768
1772
  /**
1769
1773
  * Use Prettier to format code
1770
1774
  */
@@ -4100,7 +4104,7 @@ interface RuleOptions {
4100
4104
  */
4101
4105
  'quotes'?: Linter.RuleEntry<Quotes>;
4102
4106
  /**
4103
- * Enforce the consistent use of the radix argument when using `parseInt()`
4107
+ * Enforce the use of the radix argument when using `parseInt()`
4104
4108
  * @see https://eslint.org/docs/latest/rules/radix
4105
4109
  */
4106
4110
  'radix'?: Linter.RuleEntry<Radix>;
@@ -5073,11 +5077,21 @@ interface RuleOptions {
5073
5077
  * @see https://ota-meshi.github.io/eslint-plugin-toml/rules/indent.html
5074
5078
  */
5075
5079
  'toml/indent'?: Linter.RuleEntry<TomlIndent>;
5080
+ /**
5081
+ * enforce linebreaks after opening and before closing braces
5082
+ * @see https://ota-meshi.github.io/eslint-plugin-toml/rules/inline-table-curly-newline.html
5083
+ */
5084
+ 'toml/inline-table-curly-newline'?: Linter.RuleEntry<TomlInlineTableCurlyNewline>;
5076
5085
  /**
5077
5086
  * enforce consistent spacing inside braces
5078
5087
  * @see https://ota-meshi.github.io/eslint-plugin-toml/rules/inline-table-curly-spacing.html
5079
5088
  */
5080
5089
  'toml/inline-table-curly-spacing'?: Linter.RuleEntry<TomlInlineTableCurlySpacing>;
5090
+ /**
5091
+ * enforce placing inline table key-value pairs on separate lines
5092
+ * @see https://ota-meshi.github.io/eslint-plugin-toml/rules/inline-table-key-value-newline.html
5093
+ */
5094
+ 'toml/inline-table-key-value-newline'?: Linter.RuleEntry<TomlInlineTableKeyValueNewline>;
5081
5095
  /**
5082
5096
  * enforce consistent spacing between keys and values in key/value pairs
5083
5097
  * @see https://ota-meshi.github.io/eslint-plugin-toml/rules/key-spacing.html
@@ -9573,6 +9587,9 @@ type FormatDprint = [] | [{
9573
9587
  };
9574
9588
  plugins?: unknown[];
9575
9589
  [k: string]: unknown | undefined;
9590
+ }]; // ----- format/oxfmt -----
9591
+ type FormatOxfmt = [] | [{
9592
+ [k: string]: unknown | undefined;
9576
9593
  }]; // ----- format/prettier -----
9577
9594
  type FormatPrettier = [] | [{
9578
9595
  parser: string;
@@ -10365,6 +10382,7 @@ type JsoncObjectCurlyNewline = [] | [((("always" | "never") | {
10365
10382
  type JsoncObjectCurlySpacing = [] | [("always" | "never")] | [("always" | "never"), {
10366
10383
  arraysInObjects?: boolean;
10367
10384
  objectsInObjects?: boolean;
10385
+ emptyObjects?: ("ignore" | "always" | "never");
10368
10386
  }]; // ----- jsonc/object-property-newline -----
10369
10387
  type JsoncObjectPropertyNewline = [] | [{
10370
10388
  allowAllPropertiesOnSameLine?: boolean;
@@ -10974,6 +10992,7 @@ type MaxParams = [] | [(number | {
10974
10992
  maximum?: number;
10975
10993
  max?: number;
10976
10994
  countVoidThis?: boolean;
10995
+ countThis?: ("never" | "except-void" | "always");
10977
10996
  })]; // ----- max-statements -----
10978
10997
  type MaxStatements = [] | [(number | {
10979
10998
  maximum?: number;
@@ -14420,10 +14439,19 @@ type TomlCommaStyle = [] | [("first" | "last")] | [("first" | "last"), {
14420
14439
  type TomlIndent = [] | [("tab" | number)] | [("tab" | number), {
14421
14440
  subTables?: number;
14422
14441
  keyValuePairs?: number;
14423
- }]; // ----- toml/inline-table-curly-spacing -----
14442
+ }]; // ----- toml/inline-table-curly-newline -----
14443
+ type TomlInlineTableCurlyNewline = [] | [(("always" | "never") | {
14444
+ multiline?: boolean;
14445
+ minProperties?: number;
14446
+ consistent?: boolean;
14447
+ })]; // ----- toml/inline-table-curly-spacing -----
14424
14448
  type TomlInlineTableCurlySpacing = [] | [("always" | "never")] | [("always" | "never"), {
14425
14449
  arraysInObjects?: boolean;
14426
14450
  objectsInObjects?: boolean;
14451
+ emptyObjects?: ("ignore" | "always" | "never");
14452
+ }]; // ----- toml/inline-table-key-value-newline -----
14453
+ type TomlInlineTableKeyValueNewline = [] | [{
14454
+ allowAllPropertiesOnSameLine?: boolean;
14427
14455
  }]; // ----- toml/key-spacing -----
14428
14456
  type TomlKeySpacing = [] | [({
14429
14457
  align?: (("equal" | "value") | {
@@ -15819,6 +15847,7 @@ type YamlFlowMappingCurlyNewline = [] | [(("always" | "never") | {
15819
15847
  type YamlFlowMappingCurlySpacing = [] | [("always" | "never")] | [("always" | "never"), {
15820
15848
  arraysInObjects?: boolean;
15821
15849
  objectsInObjects?: boolean;
15850
+ emptyObjects?: ("ignore" | "always" | "never");
15822
15851
  }]; // ----- yaml/flow-sequence-bracket-newline -----
15823
15852
  type YamlFlowSequenceBracketNewline = [] | [(("always" | "never" | "consistent") | {
15824
15853
  multiline?: boolean;
@@ -15989,6 +16018,6 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
15989
16018
  exceptRange?: boolean;
15990
16019
  onlyEquality?: boolean;
15991
16020
  }]; // Names of all the configs
15992
- type ConfigNames = 'eienjs/gitignore' | 'eienjs/ignores' | 'eienjs/javascript/setup' | 'eienjs/javascript/rules' | 'eienjs/eslint-comments/rules' | 'eienjs/command/rules' | 'eienjs/perfectionist/setup' | 'eienjs/node/rules' | 'eienjs/jsdoc/rules' | 'eienjs/imports/rules' | 'eienjs/unicorn/rules' | 'eienjs/unicorn/special-rules' | 'eienjs/typescript/setup' | 'eienjs/typescript/parser' | 'eienjs/typescript/type-aware-parser' | 'eienjs/typescript/rules' | 'eienjs/typescript/rules-type-aware' | 'eienjs/typescript/disables' | 'eienjs/typescript/erasable-syntax-only' | 'eienjs/stylistic/rules' | 'eienjs/regexp/rules' | 'eienjs/test/setup' | 'eienjs/test/rules' | 'eienjs/vue/setup' | 'eienjs/vue/rules' | 'eienjs/vue/composables-disables' | 'eienjs/astro/setup' | 'eienjs/astro/rules' | 'eienjs/adonisjs/rules' | 'eienjs/adonisjs/inertia-rules' | 'eienjs/adonisjs/disables' | 'eienjs/adonisjs/database-disables' | 'eienjs/adonisjs/bin-disables' | 'eienjs/adonisjs/commands-disables' | 'eienjs/adonisjs/middleware-disables' | 'eienjs/adonisjs/transformers-disables' | 'eienjs/adonisjs/exceptions-disables' | 'eienjs/adonisjs/controllers-disables' | 'eienjs/adonisjs/config-disables' | 'eienjs/adonisjs/providers-disables' | 'eienjs/adonisjs/tests-disables' | 'eienjs/adonisjs/types-disables' | 'eienjs/nuxt/setup' | 'eienjs/nuxt/vue/single-root' | 'eienjs/nuxt/rules' | 'eienjs/nuxt/utils-disables' | 'eienjs/nuxt/sort-config' | 'eienjs/nuxt/vue/rules' | 'eienjs/jsonc/setup' | 'eienjs/jsonc/rules' | 'eienjs/sort/package-json' | 'eienjs/sort/tsconfig-json' | 'eienjs/pnpm/package-json' | 'eienjs/pnpm/pnpm-workspace-yaml' | 'eienjs/pnpm/pnpm-workspace-yaml-sort' | 'eienjs/yaml/setup' | 'eienjs/yaml/rules' | 'eienjs/toml/setup' | 'eienjs/toml/rules' | 'eienjs/markdown/setup' | 'eienjs/markdown/processor' | 'eienjs/markdown/parser' | 'eienjs/markdown/disables' | 'eienjs/formatter/setup' | 'eienjs/formatter/css' | 'eienjs/formatter/scss' | 'eienjs/formatter/less' | 'eienjs/formatter/html' | 'eienjs/formatter/xml' | 'eienjs/formatter/svg' | 'eienjs/formatter/markdown' | 'eienjs/formatter/astro' | 'eienjs/formatter/astro/disables' | 'eienjs/disables/scripts' | 'eienjs/disables/cli' | 'eienjs/disables/bin' | 'eienjs/disables/dts' | 'eienjs/disables/cjs' | 'eienjs/disables/config-files' | 'eienjs/disables/json' | 'eienjs/disables/yaml' | 'eienjs/disables/toml' | 'eienjs/disables/astro' | 'eienjs/disables/deploy-tools';
16021
+ type ConfigNames = 'eienjs/gitignore' | 'eienjs/ignores' | 'eienjs/javascript/setup' | 'eienjs/javascript/rules' | 'eienjs/eslint-comments/rules' | 'eienjs/command/rules' | 'eienjs/perfectionist/setup' | 'eienjs/node/setup' | 'eienjs/node/rules' | 'eienjs/jsdoc/setup' | 'eienjs/jsdoc/rules' | 'eienjs/imports/rules' | 'eienjs/unicorn/rules' | 'eienjs/unicorn/special-rules' | 'eienjs/typescript/setup' | 'eienjs/typescript/parser' | 'eienjs/typescript/type-aware-parser' | 'eienjs/typescript/rules' | 'eienjs/typescript/rules-type-aware' | 'eienjs/typescript/disables' | 'eienjs/typescript/erasable-syntax-only' | 'eienjs/stylistic/rules' | 'eienjs/regexp/rules' | 'eienjs/test/setup' | 'eienjs/test/rules' | 'eienjs/vue/setup' | 'eienjs/vue/rules' | 'eienjs/vue/composables-disables' | 'eienjs/astro/setup' | 'eienjs/astro/rules' | 'eienjs/adonisjs/rules' | 'eienjs/adonisjs/inertia-rules' | 'eienjs/adonisjs/disables' | 'eienjs/adonisjs/database-disables' | 'eienjs/adonisjs/bin-disables' | 'eienjs/adonisjs/commands-disables' | 'eienjs/adonisjs/middleware-disables' | 'eienjs/adonisjs/transformers-disables' | 'eienjs/adonisjs/exceptions-disables' | 'eienjs/adonisjs/controllers-disables' | 'eienjs/adonisjs/config-disables' | 'eienjs/adonisjs/providers-disables' | 'eienjs/adonisjs/tests-disables' | 'eienjs/adonisjs/types-disables' | 'eienjs/nuxt/setup' | 'eienjs/nuxt/vue/single-root' | 'eienjs/nuxt/rules' | 'eienjs/nuxt/utils-disables' | 'eienjs/nuxt/sort-config' | 'eienjs/nuxt/vue/rules' | 'eienjs/jsonc/setup' | 'eienjs/jsonc/rules' | 'eienjs/sort/package-json' | 'eienjs/sort/tsconfig-json' | 'eienjs/pnpm/package-json' | 'eienjs/pnpm/pnpm-workspace-yaml' | 'eienjs/pnpm/pnpm-workspace-yaml-sort' | 'eienjs/yaml/setup' | 'eienjs/yaml/rules' | 'eienjs/toml/setup' | 'eienjs/toml/rules' | 'eienjs/markdown/setup' | 'eienjs/markdown/processor' | 'eienjs/markdown/parser' | 'eienjs/markdown/rules' | 'eienjs/markdown/disables/markdown' | 'eienjs/markdown/disables/code' | 'eienjs/formatter/setup' | 'eienjs/formatter/css' | 'eienjs/formatter/scss' | 'eienjs/formatter/less' | 'eienjs/formatter/html' | 'eienjs/formatter/xml' | 'eienjs/formatter/svg' | 'eienjs/formatter/markdown' | 'eienjs/formatter/astro' | 'eienjs/formatter/astro/disables' | 'eienjs/disables/scripts' | 'eienjs/disables/cli' | 'eienjs/disables/bin' | 'eienjs/disables/dts' | 'eienjs/disables/cjs' | 'eienjs/disables/config-files' | 'eienjs/disables/json' | 'eienjs/disables/yaml' | 'eienjs/disables/toml' | 'eienjs/disables/astro' | 'eienjs/disables/deploy-tools';
15993
16022
  //#endregion
15994
16023
  export { ConfigNames, RuleOptions };
package/dist/types.d.mts CHANGED
@@ -220,6 +220,18 @@ interface OptionsComponentExts {
220
220
  */
221
221
  componentExts?: string[];
222
222
  }
223
+ interface OptionsMarkdown extends OptionsOverrides {
224
+ /**
225
+ * Enable GFM (Github Flavored Markdown) support.
226
+ *
227
+ * @default true
228
+ */
229
+ gfm?: boolean;
230
+ /**
231
+ * Override rules for markdown itself.
232
+ */
233
+ overridesMarkdown?: TypedFlatConfigItem['rules'];
234
+ }
223
235
  interface OptionsTypeScriptParserOptions {
224
236
  /**
225
237
  * Additional parser options for TypeScript.
@@ -407,13 +419,13 @@ interface OptionsConfig extends OptionsComponentExts {
407
419
  */
408
420
  astro?: boolean | OptionsOverrides;
409
421
  /**
410
- * Enable linting for **code snippets** in Markdown.
422
+ * Enable linting for **code snippets** in Markdown and the markdown content itself.
411
423
  *
412
424
  * For formatting Markdown content, enable also `formatters.markdown`.
413
425
  *
414
426
  * @default true
415
427
  */
416
- markdown?: boolean | OptionsOverrides;
428
+ markdown?: boolean | OptionsMarkdown;
417
429
  /**
418
430
  * Enable stylistic rules.
419
431
  *
@@ -475,4 +487,4 @@ interface OptionsConfig extends OptionsComponentExts {
475
487
  nuxt?: boolean | OptionsNuxt;
476
488
  }
477
489
  //#endregion
478
- export { Awaitable, OptionsAdonisJS, OptionsComponentExts, OptionsConfig, OptionsErasableSyntaxOnly, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsNuxt, OptionsOverrides, OptionsPnpm, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsTypescriptWithErasableSyntaxOnly, OptionsVue, Rules, StylisticConfig, TypedFlatConfigItem };
490
+ export { Awaitable, OptionsAdonisJS, OptionsComponentExts, OptionsConfig, OptionsErasableSyntaxOnly, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsMarkdown, OptionsNuxt, OptionsOverrides, OptionsPnpm, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsTypescriptWithErasableSyntaxOnly, OptionsVue, Rules, StylisticConfig, TypedFlatConfigItem };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eienjs/eslint-config",
3
3
  "type": "module",
4
- "version": "1.9.3",
4
+ "version": "1.10.0",
5
5
  "description": "EienJS ESLint Config",
6
6
  "author": "Fernando Isidro <luffynando@gmail.com> (https://github.com/luffynando/)",
7
7
  "license": "MIT",
@@ -35,13 +35,13 @@
35
35
  },
36
36
  "peerDependencies": {
37
37
  "@adonisjs/eslint-plugin": "^2.2.2",
38
- "@nuxt/eslint-plugin": "^1.15.1",
38
+ "@nuxt/eslint-plugin": "^1.15.2",
39
39
  "@prettier/plugin-xml": "^3.4.2",
40
40
  "astro-eslint-parser": "^1.3.0",
41
41
  "eslint": "^9.39.2 || ^10.0.1",
42
42
  "eslint-plugin-astro": "^1.6.0",
43
43
  "eslint-plugin-erasable-syntax-only": "^0.4.0",
44
- "eslint-plugin-format": "^1.4.0",
44
+ "eslint-plugin-format": ">=0.1.0",
45
45
  "prettier-plugin-astro": "^0.14.1"
46
46
  },
47
47
  "peerDependenciesMeta": {
@@ -76,8 +76,8 @@
76
76
  "@eslint-community/eslint-plugin-eslint-comments": "^4.6.0",
77
77
  "@eslint/markdown": "^7.5.1",
78
78
  "@stylistic/eslint-plugin": "^5.9.0",
79
- "@typescript-eslint/eslint-plugin": "^8.56.0",
80
- "@typescript-eslint/parser": "^8.56.0",
79
+ "@typescript-eslint/eslint-plugin": "^8.56.1",
80
+ "@typescript-eslint/parser": "^8.56.1",
81
81
  "@vitest/eslint-plugin": "^1.6.9",
82
82
  "ansis": "^4.2.0",
83
83
  "cac": "^6.7.14",
@@ -85,23 +85,22 @@
85
85
  "eslint-flat-config-utils": "^3.0.1",
86
86
  "eslint-merge-processors": "^2.0.0",
87
87
  "eslint-plugin-antfu": "^3.2.2",
88
- "eslint-plugin-command": "^3.4.0",
89
- "eslint-plugin-import-lite": "^0.5.1",
90
- "eslint-plugin-jsdoc": "^62.7.0",
91
- "eslint-plugin-jsonc": "^2.21.1",
88
+ "eslint-plugin-command": "^3.5.2",
89
+ "eslint-plugin-import-lite": "^0.5.2",
90
+ "eslint-plugin-jsdoc": "^62.7.1",
91
+ "eslint-plugin-jsonc": "^3.1.1",
92
92
  "eslint-plugin-n": "^17.24.0",
93
93
  "eslint-plugin-no-only-tests": "^3.3.0",
94
94
  "eslint-plugin-perfectionist": "^5.6.0",
95
- "eslint-plugin-pnpm": "^1.5.0",
95
+ "eslint-plugin-pnpm": "^1.6.0",
96
96
  "eslint-plugin-regexp": "^3.0.0",
97
- "eslint-plugin-toml": "^1.1.1",
97
+ "eslint-plugin-toml": "^1.3.0",
98
98
  "eslint-plugin-unicorn": "^63.0.0",
99
99
  "eslint-plugin-unused-imports": "^4.4.1",
100
100
  "eslint-plugin-vue": "^10.8.0",
101
- "eslint-plugin-yml": "^3.2.1",
101
+ "eslint-plugin-yml": "^3.3.0",
102
102
  "eslint-processor-vue-blocks": "^2.0.0",
103
103
  "globals": "^17.3.0",
104
- "jsonc-eslint-parser": "^2.4.2",
105
104
  "local-pkg": "^1.1.2",
106
105
  "parse-gitignore": "^2.0.0",
107
106
  "pathe": "^2.0.3",
@@ -114,21 +113,21 @@
114
113
  "@commitlint/cli": "^20.4.2",
115
114
  "@commitlint/config-conventional": "^20.4.2",
116
115
  "@eslint/config-inspector": "^1.4.2",
117
- "@nuxt/eslint-plugin": "^1.15.1",
116
+ "@nuxt/eslint-plugin": "^1.15.2",
118
117
  "@prettier/plugin-xml": "^3.4.2",
119
118
  "@types/node": "^25.3.0",
120
119
  "astro-eslint-parser": "^1.3.0",
121
120
  "auto-changelog": "^2.5.0",
122
121
  "baseline-browser-mapping": "^2.10.0",
123
- "eslint": "^9.39.3",
122
+ "eslint": "^10.0.2",
124
123
  "eslint-plugin-astro": "^1.6.0",
125
124
  "eslint-plugin-erasable-syntax-only": "^0.4.0",
126
- "eslint-plugin-format": "^1.4.0",
125
+ "eslint-plugin-format": "^2.0.1",
127
126
  "eslint-typegen": "^2.3.1",
128
127
  "find-up-simple": "^1.0.1",
129
128
  "husky": "^9.1.7",
130
129
  "np": "^11.0.2",
131
- "pnpm-workspace-yaml": "^1.5.0",
130
+ "pnpm-workspace-yaml": "^1.6.0",
132
131
  "prettier-plugin-astro": "^0.14.1",
133
132
  "tsdown": "^0.20.3",
134
133
  "tsx": "^4.21.0",