Skip to content

Commit 2b1b6c3

Browse files
authored
ci: checks for eslint-config-turbo interface (#10794)
### Description Because JavaScript packaging is so finnicky, I'm thinking its a good idea to make sure our interfaces stay ecosystem compliant. PRs like #10747 and #10754 have potential to break things, so its nice to have some sanity checking. (I haven't checked yet if those PRs specifically are right, but they made me think about adding some tooling like this.) ### Testing Instructions CI
1 parent 966f19d commit 2b1b6c3

File tree

5 files changed

+265
-16
lines changed

5 files changed

+265
-16
lines changed

.github/workflows/test-js-packages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
# to run when turbo core changes. This job (`js_packages`) does not run on turborpeo core
7373
# changes, and we don't want to enable that beahvior for _all_ our JS packages.
7474
run: |
75-
TURBO_API= turbo run check-types test build --filter="!turborepo-repository" --filter={./packages/*}...[${{ github.event.pull_request.base.sha || 'HEAD^1' }}] --color --env-mode=strict
75+
TURBO_API= turbo run check-types test build package-checks --filter="!turborepo-repository" --filter={./packages/*}...[${{ github.event.pull_request.base.sha || 'HEAD^1' }}] --color --env-mode=strict
7676
env:
7777
NODE_VERSION: ${{ matrix.node-version }}
7878

packages/eslint-config-turbo/package.json

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
{
22
"name": "eslint-config-turbo",
33
"version": "2.5.6",
4+
"type": "commonjs",
45
"description": "ESLint config for Turborepo",
6+
"license": "MIT",
7+
"author": "Vercel",
58
"repository": {
69
"type": "git",
7-
"url": "https://github.com/vercel/turborepo",
10+
"url": "git+https://github.com/vercel/turborepo.git",
811
"directory": "packages/eslint-config-turbo"
912
},
1013
"bugs": {
@@ -13,7 +16,9 @@
1316
"scripts": {
1417
"build": "bunchee",
1518
"lint": "eslint src",
16-
"lint:prettier": "prettier -c . --cache --ignore-path=../../.prettierignore"
19+
"lint:prettier": "prettier -c . --cache --ignore-path=../../.prettierignore",
20+
"package:lint": "publint --strict",
21+
"package:types": "attw --profile node16 --pack"
1722
},
1823
"keywords": [
1924
"turbo",
@@ -22,7 +27,12 @@
2227
"eslintconfig",
2328
"eslint-config"
2429
],
30+
"files": [
31+
"dist"
32+
],
2533
"main": "./dist/cjs/index.js",
34+
"types": "./dist/cjs/index.d.ts",
35+
"module": "./dist/es/index.mjs",
2636
"exports": {
2737
"./flat": {
2838
"import": {
@@ -45,25 +55,20 @@
4555
}
4656
}
4757
},
48-
"author": "Vercel",
4958
"dependencies": {
5059
"eslint-plugin-turbo": "workspace:*"
5160
},
5261
"peerDependencies": {
5362
"eslint": ">6.6.0",
5463
"turbo": ">2.0.0"
5564
},
56-
"license": "MIT",
5765
"devDependencies": {
66+
"@arethetypeswrong/cli": "^0.18.2",
5867
"@turbo/eslint-config": "workspace:*",
5968
"@turbo/tsconfig": "workspace:*",
6069
"@types/eslint": "^8.56.10",
6170
"@types/node": "^20",
62-
"bunchee": "^6.3.4"
63-
},
64-
"files": [
65-
"dist"
66-
],
67-
"module": "./dist/es/index.mjs",
68-
"types": "./dist/cjs/index.d.ts"
71+
"bunchee": "^6.3.4",
72+
"publint": "^0.3.12"
73+
}
6974
}

packages/eslint-config-turbo/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ const config = {
22
extends: ["plugin:turbo/recommended"],
33
};
44

5-
module.exports = config;
5+
// eslint-disable-next-line import/no-default-export -- ESLint convention is a default export
6+
export default config;

0 commit comments

Comments
 (0)