Skip to content

Commit

Permalink
Implement publint, oxlint and prepare check job (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
bartveneman authored May 5, 2024
1 parent c45886b commit eb50fc6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 11 deletions.
31 changes: 22 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,32 @@ on:
branches: [master]

jobs:
build:
unit:
name: Unit tests
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm ci
- run: npm install --no-audit --no-fund --ignore-scripts
- run: npm test
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
cache: "npm"
- run: npm install --no-audit --no-fund --ignore-scripts
- name: Check types
run: npm run check --if-present
- name: Lint JS
run: npx --yes oxlint@latest -D perf
- name: Build package
run: npm run build
- name: "Publint"
run: "npx --yes publint"
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"type": "module",
"source": "color-sorter.js",
"exports": {
"types": "./dist/color-sorter.d.ts",
"require": "./dist/color-sorter.cjs",
"default": "./dist/color-sorter.modern.js",
"types": "./dist/color-sorter.d.ts"
"default": "./dist/color-sorter.modern.js"
},
"types": "./dist/color-sorter.d.ts",
"main": "./dist/color-sorter.cjs",
Expand Down

0 comments on commit eb50fc6

Please sign in to comment.