@eienjs/eslint-config 0.3.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.
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 = "0.3.0";
12
+ var version = "0.4.0";
13
13
 
14
14
  //#endregion
15
15
  //#region src/cli/constants.ts
@@ -60,6 +60,10 @@ const frameworkOptions = [
60
60
  {
61
61
  label: c.blueBright("AdonisJS"),
62
62
  value: "adonisjs"
63
+ },
64
+ {
65
+ label: c.greenBright("Nuxt"),
66
+ value: "nuxt"
63
67
  }
64
68
  ];
65
69
  const frameworks = frameworkOptions.map(({ value }) => value);
@@ -74,7 +78,8 @@ const dependenciesMap = {
74
78
  formatter: ["eslint-plugin-format"],
75
79
  formatterAstro: ["prettier-plugin-astro"],
76
80
  vue: [],
77
- adonisjs: ["@adonisjs/eslint-plugin"]
81
+ adonisjs: ["@adonisjs/eslint-plugin"],
82
+ nuxt: ["@nuxt/eslint-plugin"]
78
83
  };
79
84
 
80
85
  //#endregion
@@ -134,6 +139,7 @@ async function updateEslintFiles(result) {
134
139
  //#region src/cli/constants_generated.ts
135
140
  const versionsMap = {
136
141
  "@adonisjs/eslint-plugin": "^2.0.0",
142
+ "@nuxt/eslint-plugin": "^1.7.1",
137
143
  "astro-eslint-parser": "^1.2.2",
138
144
  "eslint": "^9.32.0",
139
145
  "eslint-plugin-astro": "^1.3.1",
@@ -1,4 +1,4 @@
1
- import { OptionsAdonisJS, OptionsComponentExts, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsOverrides, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsVue, StylisticConfig, TypedFlatConfigItem } from "../types-B-BVuwa4.js";
1
+ import { OptionsAdonisJS, OptionsComponentExts, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsNuxt, OptionsOverrides, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsVue, StylisticConfig, TypedFlatConfigItem } from "../types-Cd5vIRtv.js";
2
2
 
3
3
  //#region src/configs/adonisjs.d.ts
4
4
  declare function adonisjs(options?: OptionsAdonisJS): Promise<TypedFlatConfigItem[]>;
@@ -39,6 +39,9 @@ declare function markdown(options?: OptionsFiles & OptionsComponentExts & Option
39
39
  //#region src/configs/node.d.ts
40
40
  declare function node(): Promise<TypedFlatConfigItem[]>;
41
41
  //#endregion
42
+ //#region src/configs/nuxt.d.ts
43
+ declare function nuxt(options?: OptionsNuxt & OptionsStylistic): Promise<TypedFlatConfigItem[]>;
44
+ //#endregion
42
45
  //#region src/configs/perfectionist.d.ts
43
46
  /**
44
47
  * Perfectionist plugin for props and items sorting.
@@ -90,4 +93,4 @@ declare function vue(options?: OptionsVue & OptionsHasTypeScript & OptionsOverri
90
93
  //#region src/configs/yaml.d.ts
91
94
  declare function yaml(options?: OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<TypedFlatConfigItem[]>;
92
95
  //#endregion
93
- export { StylisticConfigDefaults, StylisticOptions, adonisjs, astro, command, comments, disables, formatters, ignores, imports, javascript, jsdoc, jsonc, markdown, node, perfectionist, pnpm, regexp, sortPackageJson, sortTsconfig, stylistic, test, toml, typescript, unicorn, vue, yaml };
96
+ export { StylisticConfigDefaults, StylisticOptions, 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 };
@@ -1,3 +1,3 @@
1
- import { StylisticConfigDefaults, adonisjs, astro, command, comments, disables, formatters, ignores, imports, javascript, jsdoc, jsonc, markdown, node, perfectionist, pnpm, regexp, sortPackageJson, sortTsconfig, stylistic, test, toml, typescript, unicorn, vue, yaml } from "../configs-BA3UU5JJ.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-CIPkS6TK.js";
2
2
 
3
- export { StylisticConfigDefaults, adonisjs, astro, command, comments, disables, formatters, ignores, imports, javascript, jsdoc, jsonc, markdown, node, perfectionist, pnpm, regexp, sortPackageJson, sortTsconfig, stylistic, test, toml, typescript, unicorn, vue, yaml };
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 };
@@ -39,6 +39,7 @@ const GLOB_SVG = "**/*.svg";
39
39
  const GLOB_HTML = "**/*.htm?(l)";
40
40
  const GLOB_ASTRO = "**/*.astro";
41
41
  const GLOB_ASTRO_TS = "**/*.astro/*.ts";
42
+ const GLOB_EXTS = "{js,ts,jsx,tsx,vue}";
42
43
  const GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
43
44
  const GLOB_TESTS = [
44
45
  `**/__tests__/**/*.${GLOB_SRC_EXT}`,
@@ -1099,6 +1100,132 @@ async function node() {
1099
1100
  }];
1100
1101
  }
1101
1102
 
1103
+ //#endregion
1104
+ //#region src/configs/nuxt.ts
1105
+ async function nuxt(options = {}) {
1106
+ const { overrides = {}, dirs = {}, version = 4, stylistic: stylistic$1 = true } = options;
1107
+ const { sortConfigKeys = Boolean(stylistic$1) } = options;
1108
+ await ensurePackages(["@nuxt/eslint-plugin"]);
1109
+ const pluginNuxt = await interopDefault(import("@nuxt/eslint-plugin"));
1110
+ dirs.root = dirs.root ?? [version === 4 ? "./app" : "."];
1111
+ dirs.src = dirs.src ?? dirs.root;
1112
+ dirs.pages = dirs.pages ?? dirs.src.map((src) => `${src}/pages`);
1113
+ dirs.layouts = dirs.layouts ?? dirs.src.map((src) => `${src}/layouts`);
1114
+ dirs.components = dirs.components ?? dirs.src.map((src) => `${src}/components`);
1115
+ dirs.composables = dirs.composables ?? dirs.src.map((src) => `${src}/composables`);
1116
+ dirs.plugins = dirs.plugins ?? dirs.src.map((src) => `${src}/plugins`);
1117
+ dirs.modules = dirs.modules ?? dirs.src.map((src) => `${src}/modules`);
1118
+ dirs.middleware = dirs.middleware ?? dirs.src.map((src) => `${src}/middleware`);
1119
+ dirs.servers = dirs.servers ?? dirs.src.map((src) => `${src}/servers`);
1120
+ dirs.componentsPrefixed = dirs.componentsPrefixed ?? [];
1121
+ const fileSingleRoot = [
1122
+ ...dirs.layouts?.map((layoutsDir) => join(layoutsDir, `**/*.${GLOB_EXTS}`)) || [],
1123
+ ...dirs.pages?.map((pagesDir) => join(pagesDir, `**/*.${GLOB_EXTS}`)) || [],
1124
+ ...dirs.components?.map((componentsDir) => join(componentsDir, `**/*.server.${GLOB_EXTS}`)) || []
1125
+ ].sort();
1126
+ const INLINE_ELEMENTS = [
1127
+ "a",
1128
+ "abbr",
1129
+ "audio",
1130
+ "b",
1131
+ "bdi",
1132
+ "bdo",
1133
+ "canvas",
1134
+ "cite",
1135
+ "code",
1136
+ "data",
1137
+ "del",
1138
+ "dfn",
1139
+ "em",
1140
+ "i",
1141
+ "iframe",
1142
+ "ins",
1143
+ "kbd",
1144
+ "label",
1145
+ "map",
1146
+ "mark",
1147
+ "noscript",
1148
+ "object",
1149
+ "output",
1150
+ "picture",
1151
+ "q",
1152
+ "ruby",
1153
+ "s",
1154
+ "samp",
1155
+ "small",
1156
+ "span",
1157
+ "strong",
1158
+ "sub",
1159
+ "sup",
1160
+ "svg",
1161
+ "time",
1162
+ "u",
1163
+ "var",
1164
+ "video"
1165
+ ];
1166
+ return [
1167
+ {
1168
+ name: "eienjs/nuxt/setup",
1169
+ plugins: { nuxt: pluginNuxt },
1170
+ languageOptions: { globals: { $fetch: "readonly" } }
1171
+ },
1172
+ ...fileSingleRoot.length > 0 ? [{
1173
+ files: fileSingleRoot,
1174
+ name: "eienjs/nuxt/vue/single-root",
1175
+ rules: { "vue/no-multiple-template-root": "error" }
1176
+ }] : [],
1177
+ {
1178
+ name: "eienjs/nuxt/rules",
1179
+ rules: {
1180
+ "nuxt/prefer-import-meta": "error",
1181
+ ...overrides
1182
+ }
1183
+ },
1184
+ ...sortConfigKeys ? [{
1185
+ files: ["**/nuxt.config.?([cm])[jt]s?(x)"],
1186
+ name: "eienjs/nuxt/sort-config",
1187
+ rules: { "nuxt/nuxt-config-keys-order": "error" }
1188
+ }] : [],
1189
+ ...stylistic$1 ? [{
1190
+ files: [GLOB_VUE],
1191
+ name: "eienjs/nuxt/vue/rules",
1192
+ rules: {
1193
+ "vue/multiline-html-element-content-newline": ["error", {
1194
+ ignoreWhenEmpty: true,
1195
+ ignores: [
1196
+ "pre",
1197
+ "textarea",
1198
+ "router-link",
1199
+ "RouterLink",
1200
+ "nuxt-link",
1201
+ "NuxtLink",
1202
+ "u-link",
1203
+ "ULink",
1204
+ ...INLINE_ELEMENTS
1205
+ ],
1206
+ allowEmptyLines: false
1207
+ }],
1208
+ "vue/singleline-html-element-content-newline": ["error", {
1209
+ ignoreWhenNoAttributes: true,
1210
+ ignoreWhenEmpty: true,
1211
+ ignores: [
1212
+ "pre",
1213
+ "textarea",
1214
+ "router-link",
1215
+ "RouterLink",
1216
+ "nuxt-link",
1217
+ "NuxtLink",
1218
+ "u-link",
1219
+ "ULink",
1220
+ ...INLINE_ELEMENTS
1221
+ ],
1222
+ externalIgnores: []
1223
+ }]
1224
+ }
1225
+ }] : []
1226
+ ];
1227
+ }
1228
+
1102
1229
  //#endregion
1103
1230
  //#region src/configs/perfectionist.ts
1104
1231
  /**
@@ -1999,4 +2126,4 @@ async function yaml(options = {}) {
1999
2126
  }
2000
2127
 
2001
2128
  //#endregion
2002
- export { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, 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, StylisticConfigDefaults, adonisjs, astro, combine, command, comments, disables, ensurePackages, formatters, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, markdown, node, parserPlain, perfectionist, pnpm, regexp, sortPackageJson, sortTsconfig, stylistic, test, toArray, toml, typescript, unicorn, vue, yaml };
2129
+ export { 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, StylisticConfigDefaults, 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 };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Awaitable, ConfigNames, OptionsAdonisJS, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsOverrides, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsVue, RuleOptions, Rules, StylisticConfig, TypedFlatConfigItem } from "./types-B-BVuwa4.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-Cd5vIRtv.js";
2
2
  import { FlatConfigComposer } from "eslint-flat-config-utils";
3
3
  import { Linter } from "eslint";
4
4
 
@@ -38,6 +38,7 @@ declare const GLOB_SVG = "**/*.svg";
38
38
  declare const GLOB_HTML = "**/*.htm?(l)";
39
39
  declare const GLOB_ASTRO = "**/*.astro";
40
40
  declare const GLOB_ASTRO_TS = "**/*.astro/*.ts";
41
+ declare const GLOB_EXTS = "{js,ts,jsx,tsx,vue}";
41
42
  declare const GLOB_MARKDOWN_CODE = "**/*.md/**/*.?([cm])[jt]s?(x)";
42
43
  declare const GLOB_TESTS: string[];
43
44
  declare const GLOB_ALL_SRC: string[];
@@ -82,4 +83,4 @@ declare function ensurePackages(packages: (string | undefined)[]): Promise<void>
82
83
  declare function isInEditorEnv(): boolean;
83
84
  declare function isInGitHooksOrLintStaged(): boolean;
84
85
  //#endregion
85
- export { Awaitable, ConfigNames, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, 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, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsOverrides, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsVue, ResolvedOptions, Rules, StylisticConfig, TypedFlatConfigItem, combine, eienjs as default, defaultPluginRenaming, eienjs, ensurePackages, getOverrides, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, parserPlain, resolveSubOptions, toArray };
86
+ export { Awaitable, 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, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsNuxt, OptionsOverrides, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsVue, ResolvedOptions, Rules, StylisticConfig, TypedFlatConfigItem, combine, eienjs as default, defaultPluginRenaming, eienjs, ensurePackages, getOverrides, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, parserPlain, resolveSubOptions, toArray };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, 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, parserPlain, perfectionist, pnpm, regexp, sortPackageJson, sortTsconfig, stylistic, test, toArray, toml, typescript, unicorn, vue, yaml } from "./configs-BA3UU5JJ.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-CIPkS6TK.js";
2
2
  import { FlatConfigComposer } from "eslint-flat-config-utils";
3
3
  import { isPackageExists } from "local-pkg";
4
4
 
@@ -24,7 +24,7 @@ const defaultPluginRenaming = {
24
24
  "yml": "yaml"
25
25
  };
26
26
  function eienjs(options = {}) {
27
- const { astro: enableAstro = false, componentExts = [], gitignore: enableGitignore = true, imports: enableImports = true, pnpm: enableCatalogs = false, regexp: enableRegexp = true, typescript: enableTypeScript = isPackageExists("typescript"), unicorn: enableUnicorn = true, vue: enableVue = VuePackages.some((i) => isPackageExists(i)), adonisjs: enableAdonisjs = false } = options;
27
+ const { astro: enableAstro = false, componentExts = [], gitignore: enableGitignore = true, imports: enableImports = true, pnpm: enableCatalogs = false, regexp: enableRegexp = true, typescript: enableTypeScript = isPackageExists("typescript"), unicorn: enableUnicorn = true, vue: enableVue = VuePackages.some((i) => isPackageExists(i)), adonisjs: enableAdonisjs = false, nuxt: enableNuxt = false } = options;
28
28
  let { isInEditor } = options;
29
29
  if (isInEditor == null) {
30
30
  isInEditor = isInEditorEnv();
@@ -79,6 +79,11 @@ function eienjs(options = {}) {
79
79
  ...resolveSubOptions(options, "adonisjs"),
80
80
  overrides: getOverrides(options, "adonisjs")
81
81
  }));
82
+ if (enableNuxt) configs.push(nuxt({
83
+ ...resolveSubOptions(options, "nuxt"),
84
+ overrides: getOverrides(options, "nuxt"),
85
+ stylistic: stylisticOptions
86
+ }));
82
87
  if (options.jsonc ?? true) configs.push(jsonc({
83
88
  overrides: getOverrides(options, "jsonc"),
84
89
  stylistic: stylisticOptions
@@ -130,4 +135,4 @@ function getOverrides(options, key) {
130
135
  var src_default = eienjs;
131
136
 
132
137
  //#endregion
133
- export { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, 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, combine, src_default as default, defaultPluginRenaming, eienjs, ensurePackages, getOverrides, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, parserPlain, resolveSubOptions, toArray };
138
+ export { 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, combine, src_default as default, defaultPluginRenaming, eienjs, ensurePackages, getOverrides, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, parserPlain, resolveSubOptions, toArray };
@@ -3601,6 +3601,16 @@ interface RuleOptions {
3601
3601
  * @deprecated
3602
3602
  */
3603
3603
  'nonblock-statement-body-position'?: Linter.RuleEntry<NonblockStatementBodyPosition>;
3604
+ /**
3605
+ * Prefer recommended order of Nuxt config properties
3606
+ * @see https://eslint.nuxt.com/packages/plugin#nuxtnuxt-config-keys-order
3607
+ */
3608
+ 'nuxt/nuxt-config-keys-order'?: Linter.RuleEntry<[]>;
3609
+ /**
3610
+ * Prefer using `import.meta.*` over `process.*`
3611
+ * @see https://eslint.nuxt.com/packages/plugin#nuxtprefer-import-meta
3612
+ */
3613
+ 'nuxt/prefer-import-meta'?: Linter.RuleEntry<[]>;
3604
3614
  /**
3605
3615
  * Enforce consistent line breaks after opening and before closing braces
3606
3616
  * @see https://eslint.org/docs/latest/rules/object-curly-newline
@@ -15364,7 +15374,7 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
15364
15374
  onlyEquality?: boolean;
15365
15375
  }];
15366
15376
  // Names of all the configs
15367
- type ConfigNames = 'eienjs/adonisjs/rules' | 'eienjs/adonisjs/disables' | 'eienjs/adonisjs/database-disables' | 'eienjs/adonisjs/bin-disables' | 'eienjs/adonisjs/commands-disables' | 'eienjs/adonisjs/middleware-disables' | 'eienjs/adonisjs/exceptions-disables' | 'eienjs/adonisjs/controllers-disables' | 'eienjs/adonisjs/config-disables' | 'eienjs/adonisjs/providers-disables' | 'eienjs/adonisjs/tests-disables' | 'eienjs/astro/setup' | 'eienjs/astro/rules' | 'eienjs/eslint-comments/rules' | 'eienjs/formatter/setup' | 'eienjs/imports/rules' | 'eienjs/javascript/setup' | 'eienjs/javascript/rules' | 'eienjs/jsdoc/rules' | 'eienjs/jsonc/setup' | 'eienjs/jsonc/rules' | 'eienjs/markdown/setup' | 'eienjs/markdown/processor' | 'eienjs/markdown/parser' | 'eienjs/markdown/disables' | 'eienjs/node/rules' | 'eienjs/perfectionist/setup' | 'eienjs/sort/package-json' | 'eienjs/stylistic/rules' | 'eienjs/test/setup' | 'eienjs/test/rules' | 'eienjs/toml/setup' | 'eienjs/toml/rules' | 'eienjs/regexp/rules' | 'eienjs/typescript/setup' | 'eienjs/typescript/parser' | 'eienjs/typescript/rules' | 'eienjs/unicorn/rules' | 'eienjs/vue/setup' | 'eienjs/vue/rules' | 'eienjs/yaml/setup' | 'eienjs/yaml/rules' | 'eienjs/yaml/pnpm-workspace';
15377
+ type ConfigNames = 'eienjs/adonisjs/rules' | 'eienjs/adonisjs/disables' | 'eienjs/adonisjs/database-disables' | 'eienjs/adonisjs/bin-disables' | 'eienjs/adonisjs/commands-disables' | 'eienjs/adonisjs/middleware-disables' | 'eienjs/adonisjs/exceptions-disables' | 'eienjs/adonisjs/controllers-disables' | 'eienjs/adonisjs/config-disables' | 'eienjs/adonisjs/providers-disables' | 'eienjs/adonisjs/tests-disables' | 'eienjs/astro/setup' | 'eienjs/astro/rules' | 'eienjs/eslint-comments/rules' | 'eienjs/formatter/setup' | 'eienjs/imports/rules' | 'eienjs/javascript/setup' | 'eienjs/javascript/rules' | 'eienjs/jsdoc/rules' | 'eienjs/jsonc/setup' | 'eienjs/jsonc/rules' | 'eienjs/markdown/setup' | 'eienjs/markdown/processor' | 'eienjs/markdown/parser' | 'eienjs/markdown/disables' | 'eienjs/node/rules' | 'eienjs/nuxt/setup' | 'eienjs/nuxt/vue/single-root' | 'eienjs/nuxt/rules' | 'eienjs/nuxt/sort-config' | 'eienjs/nuxt/vue/rules' | 'eienjs/perfectionist/setup' | 'eienjs/sort/package-json' | 'eienjs/stylistic/rules' | 'eienjs/test/setup' | 'eienjs/test/rules' | 'eienjs/toml/setup' | 'eienjs/toml/rules' | 'eienjs/regexp/rules' | 'eienjs/typescript/setup' | 'eienjs/typescript/parser' | 'eienjs/typescript/rules' | 'eienjs/unicorn/rules' | 'eienjs/vue/setup' | 'eienjs/vue/rules' | 'eienjs/yaml/setup' | 'eienjs/yaml/rules' | 'eienjs/yaml/pnpm-workspace';
15368
15378
  //#endregion
15369
15379
  //#region src/vendored/prettier_types.d.ts
15370
15380
  /**
@@ -15508,6 +15518,67 @@ type TypedFlatConfigItem = Omit<Linter.Config, 'plugins' | 'rules'> & {
15508
15518
  */
15509
15519
  rules?: Rules;
15510
15520
  };
15521
+ interface OptionsNuxt extends OptionsOverrides {
15522
+ /**
15523
+ * Version of Nuxt
15524
+ *
15525
+ * @default 4
15526
+ */
15527
+ version?: 3 | 4;
15528
+ /**
15529
+ * Sort keys in nuxt.config to maintain a consistent order
15530
+ *
15531
+ * @default true when `stylistic` is enabled
15532
+ */
15533
+ sortConfigKeys?: boolean;
15534
+ dirs?: {
15535
+ /**
15536
+ * Nuxt source directory
15537
+ */
15538
+ src?: string[];
15539
+ /**
15540
+ * Root directory for nuxt project
15541
+ */
15542
+ root?: string[];
15543
+ /**
15544
+ * Directory for pages
15545
+ */
15546
+ pages?: string[];
15547
+ /**
15548
+ * Directory for layouts
15549
+ */
15550
+ layouts?: string[];
15551
+ /**
15552
+ * Directory for components
15553
+ */
15554
+ components?: string[];
15555
+ /**
15556
+ * Directory for components with prefix
15557
+ * Ignore `vue/multi-word-component-names`
15558
+ */
15559
+ componentsPrefixed?: string[];
15560
+ /**
15561
+ * Directory for composobles
15562
+ */
15563
+ composables?: string[];
15564
+ /**
15565
+ * Directory for plugins
15566
+ */
15567
+ plugins?: string[];
15568
+ /**
15569
+ * Directory for modules
15570
+ */
15571
+ modules?: string[];
15572
+ /**
15573
+ * Directory for middleware
15574
+ */
15575
+ middleware?: string[];
15576
+ /**
15577
+ * Directory for server
15578
+ */
15579
+ servers?: string[];
15580
+ };
15581
+ }
15511
15582
  interface OptionsAdonisJS extends OptionsOverrides {
15512
15583
  /**
15513
15584
  * Override the `dirs` option to provide custom directories of adonisjs app.
@@ -15787,6 +15858,15 @@ interface OptionsConfig extends OptionsComponentExts {
15787
15858
  * @default false
15788
15859
  */
15789
15860
  adonisjs?: boolean | OptionsAdonisJS;
15861
+ /**
15862
+ * Enable Nuxt support.
15863
+ *
15864
+ * Requires installing:
15865
+ * - `@nuxt/eslint-plugin`
15866
+ *
15867
+ * @default false
15868
+ */
15869
+ nuxt?: boolean | OptionsNuxt;
15790
15870
  }
15791
15871
  //#endregion
15792
- export { Awaitable, type ConfigNames, OptionsAdonisJS, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsOverrides, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsVue, RuleOptions, Rules, StylisticConfig, TypedFlatConfigItem };
15872
+ export { Awaitable, type ConfigNames, OptionsAdonisJS, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsNuxt, OptionsOverrides, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsVue, RuleOptions, 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": "0.3.0",
4
+ "version": "0.4.0",
5
5
  "description": "EienJS ESLint Config",
6
6
  "author": "Fernando Isidro <luffynando@gmail.com> (https://github.com/luffynando/)",
7
7
  "license": "MIT",
@@ -34,6 +34,7 @@
34
34
  },
35
35
  "peerDependencies": {
36
36
  "@adonisjs/eslint-plugin": "^2.0.0",
37
+ "@nuxt/eslint-plugin": " ^1.7.1",
37
38
  "@prettier/plugin-xml": "^3.4.2",
38
39
  "astro-eslint-parser": "^1.2.2",
39
40
  "eslint": "^9.32.0",
@@ -45,6 +46,9 @@
45
46
  "@adonisjs/eslint-plugin": {
46
47
  "optional": true
47
48
  },
49
+ "@nuxt/eslint-plugin": {
50
+ "optional": true
51
+ },
48
52
  "@prettier/plugin-xml": {
49
53
  "optional": true
50
54
  },
@@ -84,7 +88,7 @@
84
88
  "eslint-plugin-no-only-tests": "^3.3.0",
85
89
  "eslint-plugin-perfectionist": "^4.15.0",
86
90
  "eslint-plugin-pnpm": "^1.1.0",
87
- "eslint-plugin-regexp": "^2.9.0",
91
+ "eslint-plugin-regexp": "^2.9.1",
88
92
  "eslint-plugin-toml": "^0.12.0",
89
93
  "eslint-plugin-unicorn": "^60.0.0",
90
94
  "eslint-plugin-unused-imports": "^4.1.4",
@@ -105,6 +109,7 @@
105
109
  "@commitlint/cli": "^19.8.1",
106
110
  "@commitlint/config-conventional": "^19.8.1",
107
111
  "@eslint/config-inspector": "^1.1.0",
112
+ "@nuxt/eslint-plugin": "^1.7.1",
108
113
  "@prettier/plugin-xml": "^3.4.2",
109
114
  "@types/node": "^22.17.0",
110
115
  "astro-eslint-parser": "^1.2.2",
@@ -116,7 +121,7 @@
116
121
  "husky": "^9.1.7",
117
122
  "np": "^10.2.0",
118
123
  "prettier-plugin-astro": "^0.14.1",
119
- "tsdown": "^0.13.1",
124
+ "tsdown": "^0.13.2",
120
125
  "tsx": "^4.20.3",
121
126
  "typescript": ">=4.8.4 <5.9.0"
122
127
  },