ESLint plugin providing Nuxt.js-specific linting rules, including checks for environment variables, lifecycle hooks, and correct usage of asyncData/fetch. Current stable version is 4.0.0, released in 2022. Maintained by the Nuxt team, it enforces best practices for Nuxt 2 and Nuxt 3 projects. Key differentiators: rules like no-env-in-context and no-this-in-fetch-data that catch common Nuxt pitfalls. Supports ESLint 8 and requires eslint-plugin-vue and vue-eslint-parser. Release cadence is sporadic with major version bumps aligning with Nuxt ecosystem updates.
npm install eslint-plugin-nuxtVerified import paths — ran on the pinned version, not inferred.
Shows how to configure ESLint with eslint-plugin-nuxt using the recommended preset and add a custom rule.
Use Node.js 14 or later
Update ESLint to 8.x
Update vue-eslint-parser to v9
Update eslint-plugin-vue to v9
Use Node.js 12+ (but for v4, use Node 14+)
npm install --save-dev eslint-plugin-nuxt
Add 'parser: vue-eslint-parser' to .eslintrc if not using presets
Use correct rule name like 'nuxt/no-this-in-fetch-data' and ensure eslint-plugin-nuxt >=0.4