Skip to content

Commit

Permalink
feat: check links via linkinator
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Nov 27, 2023
1 parent 4e50887 commit aa57085
Show file tree
Hide file tree
Showing 3 changed files with 299 additions and 184 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"cosmiconfig": "^7.0.0",
"eslint-config-salesforce-typescript": "^3.0.5",
"husky": "^7.0.4",
"linkinator": "^6.0.2",
"mocha": "^10.2.0",
"nyc": "^15.1.0",
"prettier": "^2.8.8",
Expand All @@ -63,4 +64,4 @@
"devDependencies": {
"eslint": "^8.52.0"
}
}
}
9 changes: 8 additions & 1 deletion utils/sf-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,20 @@ const PACKAGE_DEFAULTS = {
files: ['src/**/*.ts', 'test/**/*.ts', 'messages/**', '**/.eslint*', '**/tsconfig.json'],
output: [],
},
'link-check': {
command:
'linkinator "./!(CHANGELOG).md" "messages/**/*.md" --markdown --retry --directory-listing --verbosity error',
files: ['./*.md', './!(CHANGELOG).md', 'messages/**/*.md'],
output: [],
},
// compiles all test files, including NUTs
'test:compile': {
command: 'tsc -p "./test" --pretty',
files: ['test/**/*.ts', '**/tsconfig.json'],
output: [],
},
test: {
dependencies: ['test:only', 'test:compile'],
dependencies: ['test:only', 'test:compile', 'link-check'],
},
'test:only': {
command: 'nyc mocha "test/**/*.test.ts"',
Expand Down Expand Up @@ -122,6 +128,7 @@ const resolveConfig = (path) => {
'test:deprecation-policy',
'lint',
'test:json-schema',
'link-check',
],
},
},
Expand Down
Loading

0 comments on commit aa57085

Please sign in to comment.