diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 37235082..d9ba102c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,6 +20,8 @@ jobs: run: npm install - name: Lint files run: npm run lint + - name: Lint Files, Dependencies, & Exports + run: npm run lint:unused - name: Check Formatting run: npm run fmt:check test: diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 2d79196a..00c7dd31 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -41,7 +41,7 @@ jobs: - name: Publish to JSR run: | npm run build --if-present - npx jsr publish + npx -y jsr publish if: ${{ steps.release.outputs.release_created }} # Generates the social media post diff --git a/knip.json b/knip.json new file mode 100644 index 00000000..1e4e1a41 --- /dev/null +++ b/knip.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://unpkg.com/knip@5/schema.json", + "ignore": ["src/types.ts"], + "mocha": { + "entry": ["tests/**/*.{cts,js,ts}"] + } +} diff --git a/package.json b/package.json index 722cc4e2..6ea4680f 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "lint": "eslint", "lint:fix": "eslint --fix", "lint:types": "attw --pack --profile esm-only", + "lint:unused": "knip", "fmt": "prettier --write .", "fmt:check": "prettier --check .", "test": "mocha \"tests/**/*.test.js\"", @@ -74,19 +75,21 @@ "devDependencies": { "@arethetypeswrong/cli": "^0.18.2", "@eslint/json": "^1.1.0", + "@types/node": "^20.19.0", "c8": "^11.0.0", "dedent": "^1.5.3", "eslint": "^10.0.0", "eslint-config-eslint": "^14.0.0", "eslint-plugin-eslint-plugin": "^7.3.2", "globals": "^17.0.0", + "knip": "^5.87.0", "lint-staged": "^16.0.0", "mdast-util-from-markdown": "^2.0.2", "mdn-data": "^2.27.1", "mocha": "^11.0.0", "prettier": "3.8.1", "tailwind-csstree": "^0.1.0", - "typescript": "^5.9.2", + "typescript": "^5.9.3", "web-features": "^3.20.0", "yorkie": "^2.0.0" }, diff --git a/src/data/baseline-data.js b/src/data/baseline-data.js index d1b1d381..5e7319a6 100644 --- a/src/data/baseline-data.js +++ b/src/data/baseline-data.js @@ -7,7 +7,6 @@ export const BASELINE_HIGH = 10; export const BASELINE_LOW = 5; -export const BASELINE_FALSE = 0; export const properties = new Map([ ["accent-color", "0:"], diff --git a/tools/generate-baseline.js b/tools/generate-baseline.js index d07286f4..22c9edd1 100644 --- a/tools/generate-baseline.js +++ b/tools/generate-baseline.js @@ -205,7 +205,6 @@ const code = `/** export const BASELINE_HIGH = ${BASELINE_HIGH}; export const BASELINE_LOW = ${BASELINE_LOW}; -export const BASELINE_FALSE = ${BASELINE_FALSE}; export const properties = new Map(${JSON.stringify(Object.entries(cssFeatures.properties), null, "\t")}); export const atRules = new Map(${JSON.stringify(Object.entries(cssFeatures.atRules), null, "\t")});