这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 28 additions & 8 deletions packages/eslint-config-turbo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"url": "https://github.com/vercel/turborepo/issues"
},
"scripts": {
"build": "tsup",
"lint": "eslint .",
"build": "bunchee",
"lint": "eslint src",
"lint:prettier": "prettier -c . --cache --ignore-path=../../.prettierignore"
},
"keywords": [
Expand All @@ -22,13 +22,28 @@
"eslintconfig",
"eslint-config"
],
"main": "index.js",
"main": "./dist/cjs/index.js",
"exports": {
"./flat": {
"types": "./dist/flat/index.d.ts",
"default": "./flat/index.js"
"import": {
"types": "./dist/es/flat.d.mts",
"default": "./dist/es/flat.mjs"
},
"require": {
"types": "./dist/cjs/flat.d.ts",
"default": "./dist/cjs/flat.js"
}
},
".": "./index.js"
".": {
"import": {
"types": "./dist/es/index.d.mts",
"default": "./dist/es/index.mjs"
},
"require": {
"types": "./dist/cjs/index.d.ts",
"default": "./dist/cjs/index.js"
}
}
},
"author": "Vercel",
"dependencies": {
Expand All @@ -43,6 +58,11 @@
"@turbo/eslint-config": "workspace:*",
"@turbo/tsconfig": "workspace:*",
"@types/eslint": "^8.56.10",
"tsup": "^6.2.0"
}
"bunchee": "^6.3.4"
},
"files": [
"dist"
],
"module": "./dist/es/index.mjs",
"types": "./dist/cjs/index.d.ts"
}
4 changes: 4 additions & 0 deletions packages/eslint-config-turbo/src/index.ts

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry if this is the wrong spot for this, but it helped resolve an issue. When I upgraded from turbo@2.4.2 to 2.4.4 my eslint config broke while following the listed docs for legacy usage.

I updated to use this files extends and my eslint config was resolved.

Old:

extends: ["turbo"]

Resulted in:

eslint-config-turbo is invalid:
  - Unexpected top-level property "default".

Should the docs be updated to suggest using this instead?

New:

extends: ["plugin:turbo/recommended"]

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for tagging @anthonyshew, because this is important for people that not using eslint flat config

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries. Thanks for the tag. Will fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's the fix: #10105

Sorry about that!

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// eslint-disable-next-line import/no-default-export -- Matching old module.exports
export default {
extends: ["plugin:turbo/recommended"],
};
3 changes: 2 additions & 1 deletion packages/eslint-config-turbo/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": "@turbo/tsconfig/library.json",
"compilerOptions": {
"rootDir": "."
"outDir": "dist"
},
"include": ["src"],
"exclude": ["dist"]
}
10 changes: 0 additions & 10 deletions packages/eslint-config-turbo/tsup.config.ts

This file was deleted.

Loading
Loading