Skip to content

Commit eb93bcc

Browse files
authored
build: set up linter (#6)
1 parent a358efd commit eb93bcc

File tree

7 files changed

+2578
-174
lines changed

7 files changed

+2578
-174
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ jobs:
2525
run: pnpm install --frozen-lockfile --prefer-offline
2626

2727
- name: lint
28-
run: echo "TODO"
28+
run: pnpm lint

eslint.config.mjs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import blitzPlugin from "@blitz/eslint-plugin";
2+
import { jsFileExtensions } from "@blitz/eslint-plugin/dist/configs/javascript.js";
3+
import { tsFileExtensions } from "@blitz/eslint-plugin/dist/configs/typescript.js";
4+
5+
export default [
6+
{ ignores: ["**/dist", "**/node_modules", ".cache", "workspace/**"] },
7+
8+
...blitzPlugin.configs.recommended(),
9+
10+
{
11+
files: [...tsFileExtensions, ...jsFileExtensions],
12+
},
13+
];

package.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"homepage": "https://github.com/stackblitz/webcontainers-ecosystem-ci#readme",
1616
"scripts": {
1717
"tsx": "tsx",
18-
"test": "tsx src/index.ts"
18+
"test": "tsx src/index.ts",
19+
"lint": "eslint --cache --cache-location ./node_modules/.cache/eslint ."
1920
},
2021
"dependencies": {
2122
"@actions/core": "^1.11.1",
@@ -24,7 +25,12 @@
2425
"tinyexec": "^1.0.1"
2526
},
2627
"devDependencies": {
28+
"@blitz/eslint-plugin": "^0.1.4",
2729
"@types/node": "^22.15.3",
28-
"tsx": "^4.19.3"
29-
}
30+
"eslint": "^9.26.0",
31+
"prettier": "^3.5.3",
32+
"tsx": "^4.19.3",
33+
"typescript": "^5.8.3"
34+
},
35+
"prettier": {}
3036
}

0 commit comments

Comments
 (0)