Skip to content

Commit

Permalink
Implement publint to lint for package issues (#22)
Browse files Browse the repository at this point in the history
closes #20 
refs #21 with partial implementation for CI
  • Loading branch information
bartveneman authored May 5, 2024
1 parent 78d277d commit 077bc63
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI
name: Test

on:
push:
Expand All @@ -11,33 +11,33 @@ on:

jobs:
lint:
name: Lint JS
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
cache: npm
- run: npm install --no-fund --no-audit --ignore-scripts
- run: npm run build
- name: Lint JS
run: npx --yes oxlint@latest -D perf
- name: Check types
run: npm run check --if-present
- name: Lint package
run: npx --yes publint

test:
name: Unit tests
runs-on: ubuntu-latest

strategy:
matrix:
node-version:
- 12.20.0
- 14.13.0
- 16
- 18

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm ci
- run: npm install --no-fund --no-audit --ignore-scripts
- run: npm run build
- run: npm test
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"quality",
"complexity",
"performance",
"maintainability"
"maintainability",
"score"
],
"files": [
"dist",
Expand All @@ -27,9 +28,9 @@
"unpkg": "./dist/css-code-quality.umd.js",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/css-code-quality.modern.js",
"require": "./dist/css-code-quality.cjs",
"types": "./dist/index.d.ts"
"require": "./dist/css-code-quality.cjs"
},
"./core": {
"import": "./src/core.js"
Expand Down

0 comments on commit 077bc63

Please sign in to comment.