{"id":19864,"library":"eslint-plugin-nuxt","title":"eslint-plugin-nuxt","description":"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.","status":"active","version":"4.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/nuxt/eslint-plugin-nuxt","tags":["javascript","nuxt","eslint","eslintplugin"],"install":[{"cmd":"npm install eslint-plugin-nuxt","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-nuxt","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-nuxt","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required for Vue-related rules","package":"eslint-plugin-vue","optional":false},{"reason":"Parses .vue files","package":"vue-eslint-parser","optional":false}],"imports":[{"note":"Must include 'plugin:' prefix in extends config","wrong":"\"extends\": [\"nuxt/recommended\"]","symbol":"plugin:nuxt/recommended","correct":"\"extends\": [\"plugin:nuxt/recommended\"]"},{"note":"ESLint automatically adds 'eslint-plugin-' prefix","wrong":"\"plugins\": [\"eslint-plugin-nuxt\"]","symbol":"plugins","correct":"\"plugins\": [\"nuxt\"]"},{"note":"Rules must be prefixed with 'nuxt/'","wrong":"\"rules\": { \"no-env-in-context\": \"error\" }","symbol":"nuxt/rule-name","correct":"\"rules\": { \"nuxt/no-env-in-context\": \"error\" }"}],"quickstart":{"code":"// .eslintrc.json\n{\n  \"extends\": [\"plugin:nuxt/recommended\"],\n  \"rules\": {\n    \"nuxt/no-env-in-context\": \"error\"\n  }\n}\n\n// Install dependencies:\n// npm install --save-dev eslint eslint-plugin-nuxt eslint-plugin-vue vue-eslint-parser","lang":"javascript","description":"Shows how to configure ESLint with eslint-plugin-nuxt using the recommended preset and add a custom rule."},"warnings":[{"fix":"Use Node.js 14 or later","message":"Node.js 12 support dropped in v4.0.0","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Update ESLint to 8.x","message":"ESLint 7 dropped in v3.0.0, requires ESLint 8","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Update vue-eslint-parser to v9","message":"vue-eslint-parser v9 required in v4.0.0","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Update eslint-plugin-vue to v9","message":"eslint-plugin-vue v9 required in v4.0.0","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Use Node.js 12+ (but for v4, use Node 14+)","message":"Node 10 support dropped in v3.0.0","severity":"deprecated","affected_versions":">=3.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm install --save-dev eslint-plugin-nuxt","cause":"eslint-plugin-nuxt not installed","error":"Error: Failed to load plugin 'nuxt': Cannot find module 'eslint-plugin-nuxt'"},{"fix":"Add 'parser: vue-eslint-parser' to .eslintrc if not using presets","cause":"Missing vue-eslint-parser or incorrect parser","error":"Parsing error: The keyword 'import' is reserved"},{"fix":"Use correct rule name like 'nuxt/no-this-in-fetch-data' and ensure eslint-plugin-nuxt >=0.4","cause":"The rule name might be misspelled or the version is too old","error":"Definition for rule 'nuxt/no-this-in-fetch-data' was not found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}