网页
综合
更新时间 2026-11-16 04:29:58
@nuxt/eslint-plugin · @nuxt/eslint · Nuxt Modules
自动蜘蛛
nuxt.com
正文约 1414 字
ESLint plugin of additional rules for Nuxt.
All the rules are enabled by the ESLint Module and the ESLint Config, except nuxt/nuxt-config-keys-order which is enabled with stylistic rules.
To use them in your own config, register the plugin under the nuxt name:
Enforces the use of import.meta.* over process.* for the Nuxt environment flags (client, browser, server, nitro, dev, test and prerender), for example import.meta.client instead of process.client. Auto-fixable.
definePageMeta() is extracted from the page at build time and runs before the component setup. This rule disallows values that need a runtime context at the top level: composable calls such as useRoute(), ref() or inject(), this and await. Static values and imported or top-level variables are fine, and composables can still be called inside the middleware and validate functions.
It is enabled for the files in your pages directories.
Disallows setting the test key to a boolean in your Nuxt config, as the test environment is detected automatically.
Sorts the top-level keys of your Nuxt config, and of its environment overrides such as $production, in a recommended order. Auto-fixable.
Shared, unopinionated but customizable ESLint flat config for Nuxt projects.
Frequently asked questions about ESLint integration in Nuxt
Stay updated on new releases and features, guides, and community updates.
Copyright © 2016-2026 Nuxt - MIT License
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。