@vizejs/nuxt-lint-config 0.432.0 → 0.433.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/README.md CHANGED
@@ -21,6 +21,11 @@ identifiers. `@vizejs/nuxt` consumes the same exports and emits them for
21
21
  Vize's oxlint integration, so the module and standalone entry point cannot
22
22
  drift into separate implementations.
23
23
 
24
+ Pass an optional third argument (`2`, `3`, or `4`) to `buildNuxtLintPlan` when
25
+ the Nuxt major is known. Nuxt 2 omits the `import.meta` migration and
26
+ `definePageMeta` rule blocks. Omitting the argument preserves the modern
27
+ Nuxt 3/4 plan; the Nuxt module supplies the detected runtime major.
28
+
24
29
  Compatibility is pinned to the real `@nuxt/eslint` and
25
30
  `@nuxt/eslint-config` packages by the committed differential oracle under
26
31
  `test/nuxt-eslint-compat`.
package/dist/index.d.mts CHANGED
@@ -222,6 +222,6 @@ declare const NUXT_RUNTIME_GLOBALS: Record<string, "readonly">;
222
222
  * The order is observable — later items override earlier ones — so it is part
223
223
  * of the contract the oracle pins, not an implementation detail.
224
224
  */
225
- declare function buildNuxtLintPlan(features: ResolvedNuxtLintFeatures, dirs: NuxtLintDirs): NuxtLintConfigItem[];
225
+ declare function buildNuxtLintPlan(features: ResolvedNuxtLintFeatures, dirs: NuxtLintDirs, nuxtVersion?: 2 | 3 | 4): NuxtLintConfigItem[];
226
226
  //#endregion
227
227
  export { NUXT_CONFIG_GLOBS, NUXT_LINT_DIR_KEYS, NUXT_LINT_GLOB_EXTS, NUXT_LINT_IGNORES, NUXT_RUNTIME_GLOBALS, type NuxtComponentDirDeclaration, type NuxtLintConfigItem, type NuxtLintDirNames, type NuxtLintDirs, type NuxtLintFeatures, type NuxtLintImportOptions, type NuxtLintLayer, type NuxtLintNuxtOptions, type NuxtLintProjectState, type NuxtLintSeverity, type NuxtLintToolingOptions, type NuxtLintTypeScriptOptions, type ResolvedNuxtLintFeatures, type TypeScriptProbe, buildNuxtLintPlan, collectNuxtLintDirs, resolveNuxtLintDirs, resolveNuxtLintFeatures, shouldSortNuxtConfigKeys };
package/dist/index.mjs CHANGED
@@ -233,7 +233,7 @@ function pageFiles(dirs) {
233
233
  * The order is observable — later items override earlier ones — so it is part
234
234
  * of the contract the oracle pins, not an implementation detail.
235
235
  */
236
- function buildNuxtLintPlan(features, dirs) {
236
+ function buildNuxtLintPlan(features, dirs, nuxtVersion = 3) {
237
237
  const items = [];
238
238
  if (features.standalone !== false) items.push({
239
239
  name: "nuxt/ignores",
@@ -249,16 +249,18 @@ function buildNuxtLintPlan(features, dirs) {
249
249
  files: singleRoot,
250
250
  rules: { "vue/no-multiple-template-root": "error" }
251
251
  });
252
- items.push({
253
- name: "nuxt/rules",
254
- rules: { "nuxt/prefer-import-meta": "error" }
255
- });
256
- const pages = pageFiles(dirs);
257
- if (pages.length > 0) items.push({
258
- name: "nuxt/pages",
259
- files: pages,
260
- rules: { "nuxt/no-page-meta-runtime-values": "error" }
261
- });
252
+ if (nuxtVersion !== 2) {
253
+ items.push({
254
+ name: "nuxt/rules",
255
+ rules: { "nuxt/prefer-import-meta": "error" }
256
+ });
257
+ const pages = pageFiles(dirs);
258
+ if (pages.length > 0) items.push({
259
+ name: "nuxt/pages",
260
+ files: pages,
261
+ rules: { "nuxt/no-page-meta-runtime-values": "error" }
262
+ });
263
+ }
262
264
  items.push({
263
265
  name: "nuxt/nuxt-config",
264
266
  files: [...NUXT_CONFIG_GLOBS],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vizejs/nuxt-lint-config",
3
- "version": "0.432.0",
3
+ "version": "0.433.0",
4
4
  "description": "Shareable Nuxt-aware lint preset core for the Vize toolchain",
5
5
  "keywords": [
6
6
  "config",