Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .depcheckrc.json

This file was deleted.

32 changes: 32 additions & 0 deletions knip.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import type { KnipConfig } from 'knip';

const config: KnipConfig = {
entry: [
'src/**/*.{ts,mts}',
'.github/scripts/**/*.{mts,mjs,js,ts}',
'.github/actions/**/*.{mjs,js}',
'*.config.{js,cjs,mjs,ts,mts}',
],
project: [
'src/**/*.{ts,mts}',
'.github/scripts/**/*.{mts,mjs,js,ts}',
'.github/actions/**/*.{mjs,js}',
'*.{js,cjs,mjs,ts,mts}',
],
ignoreDependencies: [
// Used by Yarn through the `allow-scripts` plugin and the `lavamoat`
// field in `package.json`, which knip does not trace.
'@lavamoat/allow-scripts',
'@lavamoat/preinstall-always-fail',

// Not imported directly, but used for the `ts-node --swc` scripts.
'@swc/cli',

// Provided by the GitHub Actions runner, which is where
// `.github/scripts/remove-rca-needed-label-sheets.ts` runs.
'@actions/core',
'@actions/github',
],
};

export default config;
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"lint": "yarn lint:tsc && yarn lint:oxlint && yarn lint:constraints && yarn lint:misc --check && yarn lint:dependencies --check",
"lint:changelog": "auto-changelog validate --formatter oxfmt",
"lint:constraints": "yarn constraints",
"lint:dependencies": "depcheck && yarn dedupe",
"lint:dependencies": "knip --config knip.config.mts --dependencies && yarn dedupe",
"lint:fix": "yarn lint:oxlint --fix && yarn lint:constraints --fix && yarn lint:misc --write && yarn lint:dependencies",
"lint:misc": "oxfmt --ignore-path .gitignore",
"lint:oxlint": "oxlint",
Expand Down Expand Up @@ -62,8 +62,8 @@
"@types/unzipper": "^0.10.11",
"@vitest/coverage-v8": "^5.1.0",
"@yarnpkg/types": "^4.0.1",
"depcheck": "^1.4.7",
"eslint-plugin-n": "^18.5.0",
"knip": "^6.39.0",
"oxfmt": "^0.72.0",
"oxlint": "^1.93.0",
"oxlint-tsgolint": "^7.0.2006",
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
},
"include": [
"src",
"knip.config.mts",
"oxlint.config.mts",
"vitest.config.mts",
"yarn.config.cjs",
Expand Down
Loading
Loading