{"id":19966,"library":"eslint-plugin-turbo","title":"eslint-plugin-turbo","description":"Official ESLint plugin for Turborepo, providing lint rules to enforce Turborepo best practices and prevent common misconfigurations. Current stable version is 2.9.6, released alongside Turborepo. It is maintained by Vercel and follows Turborepo's release cadence: canary releases daily, stable releases weekly. Key differentiators: Tight integration with Turborepo's monorepo pipeline; rules like `no-undeclared-env-vars` help catch missing environment variable declarations early. Includes TypeScript type definitions. Requires `turbo >2.0.0` and `eslint >6.6.0`. Supports ESM and CJS.","status":"active","version":"2.9.6","language":"javascript","source_language":"en","source_url":"https://github.com/vercel/turborepo","tags":["javascript","eslint","eslint-plugin","eslintplugin","turbo","turborepo","typescript"],"install":[{"cmd":"npm install eslint-plugin-turbo","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-turbo","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-turbo","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency: required for runtime pipeline validation","package":"turbo","optional":false},{"reason":"peer dependency: ESLint plugin core","package":"eslint","optional":false}],"imports":[{"note":"Default import works in both CJS and ESM; require also works in CJS.","wrong":"const turbo = require('eslint-plugin-turbo')","symbol":"eslint-plugin-turbo","correct":"import turbo from 'eslint-plugin-turbo'"},{"note":"The plugin is exported as default; named export 'turbo' does not exist.","wrong":"import { turbo } from 'eslint-plugin-turbo'","symbol":"turbo","correct":"import turbo from 'eslint-plugin-turbo'"},{"note":"Rules are available as a named export for programmatic use.","wrong":"import rules from 'eslint-plugin-turbo/rules'","symbol":"rules","correct":"import { rules } from 'eslint-plugin-turbo'"}],"quickstart":{"code":"// .eslintrc.cjs\nmodule.exports = {\n  plugins: ['turbo'],\n  extends: ['plugin:turbo/recommended'],\n  rules: {\n    'turbo/no-undeclared-env-vars': 'error',\n  },\n};","lang":"javascript","description":"Configure ESLint with the turbo plugin using the recommended config and an explicit rule."},"warnings":[{"fix":"Watch release notes for migration guidance.","message":"The 'turbo/no-undeclared-env-vars' rule may be deprecated in future versions in favor of a more comprehensive env validation.","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Run 'npm install turbo --save-dev' in your project.","message":"The plugin requires 'turbo' to be installed as a peer dependency; missing it causes runtime errors.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Ensure your ESLint configuration supports ESM, or use dynamic import if needed.","message":"In version 2.0.0, the plugin switched from CommonJS to ESM-first; some CJS setups may break.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Explicitly add rules like 'turbo/no-undeclared-env-vars' if needed.","message":"The 'recommended' config may not enable all rules; check documentation for additional rules.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Install turbo: npm install turbo --save-dev","cause":"Missing 'turbo' package as peer dependency.","error":"Error: Failed to load plugin 'turbo' declared in '...'"},{"fix":"Use default import: import turbo from 'eslint-plugin-turbo' or require('eslint-plugin-turbo')","cause":"Using named import 'turbo' instead of default import.","error":"TypeError: Cannot read properties of undefined (reading 'default')"},{"fix":"Ensure only one version is installed, e.g., by hoisting the dependency.","cause":"Multiple versions of eslint-plugin-turbo installed in monorepo.","error":"ESLint couldn't determine the plugin 'turbo' uniquely."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}