eslint-config-turbo

raw JSON →
2.9.6 verified Sat Apr 25 auth: no javascript

Official ESLint configuration for monorepos built with Turborepo (v2.9.6, stable). Distributed as an eslint-config package, it enforces Turborepo best practices including disallowing `process.env` usage in shared configs and ensuring proper task dependencies. Ships TypeScript declarations. Integrates with Turborepo's remote caching and task orchestration. Active maintenance by Vercel with weekly releases. Recommended alternative to manual ESLint setup for Turborepo projects.

error ESLint couldn't find the config "turbo" after extending from "turbo".
cause eslint-config-turbo is not installed or not in node_modules.
fix
Run: npm install --save-dev eslint-config-turbo eslint turbo
error Configuration for rule "turbo/no-undeclared-env-vars" is invalid.
cause The rule has been removed or renamed.
fix
Remove the rule or replace with 'no-process-env'
error Cannot find module 'eslint-config-turbo'
cause When using require() in eslint config, the package may not be installed or the path is wrong.
fix
Install the package or use extends: ['turbo']
gotcha Using full package name 'eslint-config-turbo' in extends does not work; must use shorthand 'turbo'
fix Change extends to ['turbo']
deprecated The rule 'turbo/no-undeclared-env-vars' was removed in v1.8; use 'no-process-env' instead
fix Replace 'turbo/no-undeclared-env-vars' with 'no-process-env'
breaking Version 2.0 requires peer dependency eslint >=8.0.0 and turbo >=1.10.0
fix Update eslint and turbo versions
gotcha Config is not exported as a named export; default export only
fix Use default import or require()
npm install eslint-config-turbo
yarn add eslint-config-turbo
pnpm add eslint-config-turbo

Shows how to extend eslint-config-turbo in an ESLint config file or package.json. The minimal setup requires only 'turbo' in extends.

// .eslintrc.js
module.exports = {
  extends: ['turbo'],
  rules: {
    // Customize rules as needed
  }
};

// package.json
{
  "eslintConfig": {
    "extends": ["turbo"]
  }
}