Skip to content

Commit 90e699e

Browse files
authored
Merge pull request #15 from Teslemetry/fm/o10-e101-s7n-nodelib-ci
ci: add lint and package tarball checks
2 parents 8fe9b3d + 3d31072 commit 90e699e

8 files changed

Lines changed: 828 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,10 @@ jobs:
2424

2525
- run: npx tsc --noEmit
2626

27+
- run: pnpm run lint
28+
2729
- run: pnpm test
30+
31+
- run: npx publint
32+
33+
- run: npm pack --dry-run

eslint.config.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// @ts-check
2+
import js from "@eslint/js";
3+
import tseslint from "typescript-eslint";
4+
5+
export default tseslint.config(
6+
js.configs.recommended,
7+
tseslint.configs.recommended,
8+
{
9+
ignores: ["dist/**"],
10+
},
11+
{
12+
rules: {
13+
// ts-proto message types and Fleet API JSON payloads are inherently untyped.
14+
"@typescript-eslint/no-explicit-any": "off",
15+
"@typescript-eslint/no-unused-vars": [
16+
"error",
17+
{argsIgnorePattern: "^_", varsIgnorePattern: "^_"},
18+
],
19+
// `this.debug && console.debug(...)` is this codebase's guard-log idiom.
20+
"@typescript-eslint/no-unused-expressions": [
21+
"error",
22+
{allowShortCircuit: true},
23+
],
24+
},
25+
},
26+
);

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,21 @@
1212
"url": "https://teslemetry.com"
1313
},
1414
"devDependencies": {
15+
"@eslint/js": "^10.0.1",
1516
"@types/node": "^24.13.3",
17+
"eslint": "^10.8.0",
18+
"publint": "^0.3.23",
1619
"typescript": "^5.9.2",
20+
"typescript-eslint": "^8.66.0",
1721
"vitest": "^4.1.10"
1822
},
1923
"scripts": {
2024
"prepare": "tsc",
2125
"watch": "tsc -w",
2226
"test": "vitest run",
23-
"test:watch": "vitest"
27+
"test:watch": "vitest",
28+
"lint": "eslint .",
29+
"pack:check": "publint"
2430
},
2531
"files": [
2632
"dist",

0 commit comments

Comments
 (0)