Skip to content

Commit 443886e

Browse files
authored
fix: exports for eslint-config-turbo (#9978)
### Description Mis-mapped the exports conditions in package.json. 🤦
1 parent 3a8730c commit 443886e

File tree

6 files changed

+708
-41
lines changed

6 files changed

+708
-41
lines changed

packages/eslint-config-turbo/package.json

+28-8
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"url": "https://github.com/vercel/turborepo/issues"
1212
},
1313
"scripts": {
14-
"build": "tsup",
15-
"lint": "eslint .",
14+
"build": "bunchee",
15+
"lint": "eslint src",
1616
"lint:prettier": "prettier -c . --cache --ignore-path=../../.prettierignore"
1717
},
1818
"keywords": [
@@ -22,13 +22,28 @@
2222
"eslintconfig",
2323
"eslint-config"
2424
],
25-
"main": "index.js",
25+
"main": "./dist/cjs/index.js",
2626
"exports": {
2727
"./flat": {
28-
"types": "./dist/flat/index.d.ts",
29-
"default": "./flat/index.js"
28+
"import": {
29+
"types": "./dist/es/flat.d.mts",
30+
"default": "./dist/es/flat.mjs"
31+
},
32+
"require": {
33+
"types": "./dist/cjs/flat.d.ts",
34+
"default": "./dist/cjs/flat.js"
35+
}
3036
},
31-
".": "./index.js"
37+
".": {
38+
"import": {
39+
"types": "./dist/es/index.d.mts",
40+
"default": "./dist/es/index.mjs"
41+
},
42+
"require": {
43+
"types": "./dist/cjs/index.d.ts",
44+
"default": "./dist/cjs/index.js"
45+
}
46+
}
3247
},
3348
"author": "Vercel",
3449
"dependencies": {
@@ -43,6 +58,11 @@
4358
"@turbo/eslint-config": "workspace:*",
4459
"@turbo/tsconfig": "workspace:*",
4560
"@types/eslint": "^8.56.10",
46-
"tsup": "^6.2.0"
47-
}
61+
"bunchee": "^6.3.4"
62+
},
63+
"files": [
64+
"dist"
65+
],
66+
"module": "./dist/es/index.mjs",
67+
"types": "./dist/cjs/index.d.ts"
4868
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// eslint-disable-next-line import/no-default-export -- Matching old module.exports
2+
export default {
3+
extends: ["plugin:turbo/recommended"],
4+
};
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"extends": "@turbo/tsconfig/library.json",
33
"compilerOptions": {
4-
"rootDir": "."
4+
"outDir": "dist"
55
},
6+
"include": ["src"],
67
"exclude": ["dist"]
78
}

packages/eslint-config-turbo/tsup.config.ts

-10
This file was deleted.

0 commit comments

Comments
 (0)