Skip to content

Commit 073ccdc

Browse files
authored
chore: add ESLint linting to build pipeline (#4)
Add TypeScript ESLint with recommended rules and integrate the lint step into the CI workflow.
1 parent 605375c commit 073ccdc

4 files changed

Lines changed: 1217 additions & 7 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ jobs:
3636
- name: Audit
3737
run: npm audit --audit-level high --omit dev
3838

39+
- name: Lint
40+
run: npm run lint
41+
3942
- name: Update version
4043
if: github.ref_type == 'tag'
4144
env:

eslint.config.mjs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import tseslint from "@typescript-eslint/eslint-plugin";
2+
import tsparser from "@typescript-eslint/parser";
3+
4+
export default [
5+
{
6+
files: ["src/**/*.ts"],
7+
languageOptions: {
8+
parser: tsparser,
9+
parserOptions: {
10+
ecmaVersion: 2020,
11+
sourceType: "module",
12+
},
13+
},
14+
plugins: {
15+
"@typescript-eslint": tseslint,
16+
},
17+
rules: {
18+
...tseslint.configs.recommended.rules,
19+
},
20+
},
21+
];

0 commit comments

Comments
 (0)