Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

eslint-config-turbo

vercel2.6mMIT2.3.4

ESLint config for Turborepo

turbo, eslint, turborepo, eslintconfig, eslint-config

readme

eslint-config-turbo

Ease configuration for Turborepo

Installation

  1. You'll first need to install ESLint:
npm install eslint --save-dev
  1. Next, install eslint-config-turbo:
npm install eslint-config-turbo --save-dev

Usage (Flat Config eslint.config.js)

import turboConfig from "eslint-config-turbo/flat";

export default [
  ...turboConfig,
  // Other configuration
];

You can also configure rules available in the configuration:

import turboConfig from "eslint-config-turbo/flat";

export default [
  ...turboConfig,
  // Other configuration
  {
    rules: {
      "turbo/no-undeclared-env-vars": [
        "error",
        {
          allowList: ["^ENV_[A-Z]+$"],
        },
      ],
    },
  },
];

Usage (Legacy eslintrc*)

Add turbo to the extends section of your eslint configuration file. You can omit the eslint-config- prefix:

{
  "extends": ["turbo"]
}

You can also configure rules available in the configuration:

{
  "plugins": ["turbo"],
  "rules": {
    "turbo/no-undeclared-env-vars": [
      "error",
      {
        "allowList": ["^ENV_[A-Z]+$"]
      }
    ]
  }
}