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.
Common errors
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']
Warnings
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()
Install
npm install eslint-config-turbo yarn add eslint-config-turbo pnpm add eslint-config-turbo Imports
- default wrong
module.exports = { extends: ['eslint-config-turbo'] }correctmodule.exports = { extends: ['turbo'] } - turbo
import turbo from 'eslint-config-turbo' - types wrong
import type { Config } from 'eslint-config-turbo'correctimport type { Linter } from 'eslint' // config types come from eslint, not turbo
Quickstart
// .eslintrc.js
module.exports = {
extends: ['turbo'],
rules: {
// Customize rules as needed
}
};
// package.json
{
"eslintConfig": {
"extends": ["turbo"]
}
}