Skip to content
This repository was archived by the owner on Nov 9, 2023. It is now read-only.

Commit 1c2c521

Browse files
authored
lint: add lint:dependencies using depcheck (#57)
* lint: add lint:dependencies using depcheck * chore: add packages from ./.yarn/plugins/@yarnpkg/plugin-constraints.cjs to depcheckIgnore
1 parent 6f9cf5a commit 1c2c521

File tree

3 files changed

+632
-230
lines changed

3 files changed

+632
-230
lines changed

.depcheckrc.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"ignores": [
3+
"@lavamoat/allow-scripts",
4+
"@lavamoat/preinstall-always-fail",
5+
"@metamask/auto-changelog",
6+
"@types/*",
7+
"@yarnpkg/cli",
8+
"@yarnpkg/core",
9+
"@yarnpkg/fslib",
10+
"clipanion",
11+
"prettier-plugin-packagejson",
12+
"ts-node",
13+
"typedoc"
14+
]
15+
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"scripts": {
1515
"build": "tsc --project tsconfig.build.json",
1616
"build:clean": "rimraf dist && yarn build",
17-
"lint": "yarn lint:eslint && yarn lint:misc --check",
17+
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn lint:dependencies",
18+
"lint:dependencies": "depcheck",
1819
"lint:eslint": "eslint . --cache --ext js,ts",
1920
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write",
2021
"lint:misc": "prettier '**/*.json' '**/*.md' '!CHANGELOG.md' '**/*.yml' '!.yarnrc.yml' --ignore-path .gitignore --no-error-on-unmatched-pattern",
@@ -42,6 +43,7 @@
4243
"@types/readable-stream": "^2.3.9",
4344
"@typescript-eslint/eslint-plugin": "^4.21.0",
4445
"@typescript-eslint/parser": "^4.21.0",
46+
"depcheck": "^1.4.5",
4547
"eslint": "^7.23.0",
4648
"eslint-config-prettier": "^8.1.0",
4749
"eslint-plugin-import": "^2.22.1",

0 commit comments

Comments
 (0)