eslint-config-turbo
Ease configuration for Turborepo
Installation
- You'll first need to install ESLint:
npm install eslint --save-dev
- 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,
];
You can also configure rules available in the configuration:
import turboConfig from "eslint-config-turbo/flat";
export default [
...turboConfig,
{
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]+$"]
}
]
}
}