Skip to content

Commit

Permalink
docs: use correct repository URL (#17)
Browse files Browse the repository at this point in the history
Code assumes repo URL has `.git`, but it doesn't.

Fixes #16.
  • Loading branch information
wjhsf authored Jan 17, 2025
1 parent a211d7e commit aca6746
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/utils/doc-url.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
const { version, repository } = require('../../package.json');

function docUrl(ruleName) {
// strip ".git" from end of URL
const base = repository.url.slice(0, -4);
return `${base}/blob/v${version}/docs/rules/${ruleName}.md`;
return `${repository.url}/blob/v${version}/docs/rules/${ruleName}.md`;
}

module.exports = {
Expand Down

0 comments on commit aca6746

Please sign in to comment.