Skip to content

Commit 87bb212

Browse files
authored
chore: introduce ci checks and static analysis (#4)
* Introduce ci checks * Fix test case with hardcoded path
1 parent c6a4d97 commit 87bb212

File tree

7 files changed

+1818
-112
lines changed

7 files changed

+1818
-112
lines changed

.github/workflows/ci-checks.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI Lint and Test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18, 20]
16+
17+
steps:
18+
- name: Checkout Repository
19+
uses: actions/checkout@v4
20+
21+
- name: Set Up Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
cache: "npm"
26+
27+
- name: Install Dependencies
28+
run: npm ci
29+
30+
- run: npx prettier --check .
31+
- run: npm run lint:ci
32+
- run: npm run type-check
33+
- run: npm test

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
test/fixtures/

eslint.config.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
import globals from "globals";
2-
import pluginJs from "@eslint/js";
2+
import js from "@eslint/js";
33
import jsdoc from "eslint-plugin-jsdoc";
4+
import importPlugin from "eslint-plugin-import";
45

56
/** @type {import('eslint').Linter.Config[]} */
67
export default [
78
{ languageOptions: { globals: globals.node } },
8-
pluginJs.configs.recommended,
9+
js.configs.recommended,
910
jsdoc.configs["flat/recommended"],
11+
importPlugin.flatConfigs.recommended,
1012
{
1113
files: ["**/*.js"],
14+
languageOptions: {
15+
ecmaVersion: 2020,
16+
},
1217
plugins: {
1318
jsdoc,
1419
},

0 commit comments

Comments
 (0)