Skip to content

Commit e92e99c

Browse files
authored
feat: update eslint-config-turbo to support ESLint Flat Config. (#9502)
### Description Adds ESLint Flat Config Support to `eslint-config-turbo`. Users will be able to use: ``` import turboConfig from "eslint-config-turbo/flat" export default [ ...turboConfig ] ``` This is meant to be backwards compatible with ESLint v8, leaving the `extends` key in place for that purpose. ### Testing Instructions Difficult to test this, so we'll be cutting a canary shortly after to make sure.
1 parent c6a804f commit e92e99c

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const plugin = require("eslint-plugin-turbo");
2+
3+
module.exports = [
4+
{
5+
plugins: {
6+
turbo: plugin,
7+
},
8+
rules: {
9+
"turbo/no-undeclared-env-vars": "error",
10+
},
11+
},
12+
];

packages/eslint-config-turbo/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
"eslint-config"
2323
],
2424
"main": "index.js",
25+
"exports": {
26+
"./flat": "./flat/index.js",
27+
".": "./index.js"
28+
},
2529
"author": "Vercel",
2630
"dependencies": {
2731
"eslint-plugin-turbo": "workspace:*"

0 commit comments

Comments
 (0)