Skip to content

Commit

Permalink
fix: exports for eslint-config-turbo (#9978)
Browse files Browse the repository at this point in the history
### Description

Mis-mapped the exports conditions in package.json. 🤦
  • Loading branch information
anthonyshew authored Feb 14, 2025
1 parent 3a8730c commit 443886e
Show file tree
Hide file tree
Showing 6 changed files with 708 additions and 41 deletions.
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"
}
File renamed without changes.
4 changes: 4 additions & 0 deletions packages/eslint-config-turbo/src/index.ts
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

0 comments on commit 443886e

Please sign in to comment.