Skip to content

Commit 48eaddc

Browse files
authored
Set up depcheck (#1111)
1 parent 6136374 commit 48eaddc

6 files changed

Lines changed: 335 additions & 13 deletions

File tree

.depcheckrc.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
ignore-path: .gitignore
2+
3+
ignores:
4+
# used in a jsdoc type
5+
- '@typescript-eslint/utils'
6+
# used in __fixtures__/registry.ts by partial name
7+
- verdaccio-auth-memory
8+
- verdaccio-memory
9+
# ok with using implicit dev dep for now (part of verdaccio)
10+
- '@verdaccio/config'
11+
12+
ignore-patterns:
13+
# managed separately
14+
- docs

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
scripts
2+
docs
3+
/*.config.js

beachball.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module.exports = {
44
disallowedChangeTypes: ['major'],
55
ignorePatterns: [
66
'.*ignore',
7+
'*.yml',
78
'.github/**',
89
'.prettierrc.json5',
910
'.vscode/**',
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "none",
3+
"comment": "Set up depcheck",
4+
"packageName": "beachball",
5+
"email": "elcraig@microsoft.com",
6+
"dependentChangeType": "none"
7+
}

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030
"docs:build": "echo \"Run this from the docs folder instead\" && exit 1",
3131
"format": "prettier --write '**/*'",
3232
"prepare": "husky install",
33-
"lint": "eslint --color --max-warnings=0 src",
33+
"lint": "yarn lint:deps && yarn lint:code",
34+
"lint:code": "eslint --color --max-warnings=0 src",
35+
"lint:deps": "depcheck .",
3436
"pub": "node ./lib/cli.js publish",
3537
"release": "node ./lib/cli.js publish -y",
3638
"release:docs": "echo \"Run this from the docs folder instead\" && exit 1",
@@ -72,6 +74,7 @@
7274
"@typescript-eslint/eslint-plugin": "^5.0.0",
7375
"@typescript-eslint/parser": "^5.0.0",
7476
"@typescript-eslint/utils": "^5.0.0",
77+
"depcheck": "^1.4.7",
7578
"eslint": "^8.0.0",
7679
"eslint-config-prettier": "^10.1.8",
7780
"eslint-plugin-etc": "^2.0.3",

0 commit comments

Comments
 (0)