{"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,"search_vec":"'2':43 '2022':31 '3':46 '4.0.0':28 '8':71 'align':91 'asyncdata/fetch':23 'best':39 'bump':90 'cadenc':84 'catch':65 'check':13 'common':66 'context':56 'correct':20 'current':24 'data':63 'differenti':49 'ecosystem':94 'enforc':38 'env':54 'environ':15 'eslint':2,5,70,75,81,98 'eslint-plugin-nuxt':1 'eslint-plugin-vu':74 'eslintplugin':99 'fetch':62 'hook':18 'includ':12 'javascript':96 'key':48 'lifecycl':17 'like':51 'lint':10 'maintain':32 'major':88 'no-env-in-context':52 'no-this-in-fetch-data':58 'nuxt':4,35,42,45,67,93,97 'nuxt.js':8 'parser':82 'pitfal':68 'plugin':3,6,76 'practic':40 'project':47 'provid':7 'releas':29,83 'requir':73 'rule':11,50 'specif':9 'sporad':86 'stabl':25 'support':69 'team':36 'updat':95 'usag':21 'variabl':16 'version':26,89 'vue':77,80 'vue-eslint-pars':79","created_at":"2026-04-25T11:20:04.872127+00:00","updated_at":"2026-04-25T11:20:04.872127+00:00","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,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":"https://eslint.nuxt.com","github":"https://github.com/nuxt/eslint-plugin-nuxt","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/eslint-plugin-nuxt","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}