From 720392709390669bffea0c0da6ce275760d17171 Mon Sep 17 00:00:00 2001 From: Bart Veneman Date: Sun, 5 May 2024 10:21:01 +0200 Subject: [PATCH] Implement publint to lint for package issues --- .github/workflows/test.yml | 28 ++++++++++++++-------------- package.json | 7 ++++--- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1bad614..2ca3462 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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: @@ -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 diff --git a/package.json b/package.json index 641065b..2d0dadb 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,8 @@ "quality", "complexity", "performance", - "maintainability" + "maintainability", + "score" ], "files": [ "dist", @@ -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"