Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: src
strategy:
matrix:
node-version: [18]

steps:
- uses: actions/checkout@v4

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint
continue-on-error: true

- name: Test
run: npm test
4 changes: 3 additions & 1 deletion src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"example": "examples"
},
"scripts": {
"test": "mocha 'test/**/*.test.js'"
"test": "mocha 'test/**/*.test.js'",
"lint": "eslint .",
"lint": "eslint ."
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate lint key in package.json scripts

Low Severity

The "lint" key appears twice in the scripts object of src/package.json. While JSON parsers typically accept this (using the last value), duplicate keys are technically not allowed by the JSON spec and indicate an accidental copy-paste. This is confusing for anyone reading the file and may cause warnings in strict JSON tooling.

Fix in Cursor Fix in Web

},
"repository": {
"type": "git",
Expand Down
Loading