Skip to content

Commit 7203927

Browse files
author
Bart Veneman
committed
Implement publint to lint for package issues
1 parent 78d277d commit 7203927

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

.github/workflows/test.yml

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
33

4-
name: Node.js CI
4+
name: Test
55

66
on:
77
push:
@@ -11,33 +11,33 @@ on:
1111

1212
jobs:
1313
lint:
14-
name: Lint JS
14+
name: Lint
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout code
1818
uses: actions/checkout@v4
19+
- name: Use Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
cache: npm
23+
- run: npm install --no-fund --no-audit --ignore-scripts
24+
- run: npm run build
1925
- name: Lint JS
2026
run: npx --yes oxlint@latest -D perf
27+
- name: Check types
28+
run: npm run check --if-present
29+
- name: Lint package
30+
run: npx --yes publint
2131

2232
test:
2333
name: Unit tests
2434
runs-on: ubuntu-latest
25-
26-
strategy:
27-
matrix:
28-
node-version:
29-
- 12.20.0
30-
- 14.13.0
31-
- 16
32-
- 18
33-
3435
steps:
3536
- uses: actions/checkout@v4
36-
- name: Use Node.js ${{ matrix.node-version }}
37+
- name: Use Node.js
3738
uses: actions/setup-node@v4
3839
with:
39-
node-version: ${{ matrix.node-version }}
4040
cache: npm
41-
- run: npm ci
41+
- run: npm install --no-fund --no-audit --ignore-scripts
4242
- run: npm run build
4343
- run: npm test

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"quality",
1515
"complexity",
1616
"performance",
17-
"maintainability"
17+
"maintainability",
18+
"score"
1819
],
1920
"files": [
2021
"dist",
@@ -27,9 +28,9 @@
2728
"unpkg": "./dist/css-code-quality.umd.js",
2829
"exports": {
2930
".": {
31+
"types": "./dist/index.d.ts",
3032
"import": "./dist/css-code-quality.modern.js",
31-
"require": "./dist/css-code-quality.cjs",
32-
"types": "./dist/index.d.ts"
33+
"require": "./dist/css-code-quality.cjs"
3334
},
3435
"./core": {
3536
"import": "./src/core.js"

0 commit comments

Comments
 (0)