Skip to content

Commit

Permalink
temporarily allow skipping link validation
Browse files Browse the repository at this point in the history
  • Loading branch information
vweevers committed Nov 24, 2018
1 parent f70056a commit e41c46e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions lint.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = function (fix) {
module.exports = function (fix, validateLinks) {
const preset = {
plugins: [
require('remark-lint'),
Expand Down Expand Up @@ -40,9 +40,14 @@ module.exports = function (fix) {
)
}

preset.plugins.push(
require('remark-validate-links')
)
// Temporarily allow skipping link validation, because remark does not parse
// HTML anchors - as used in various Level readme's. Those readme's should be
// updated to use markdown only.
if (validateLinks) {
preset.plugins.push(
require('remark-validate-links')
)
}

return preset
}
2 changes: 1 addition & 1 deletion options.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = function (argv, packageOpts, files, cwd) {
test: /^table of contents$/i,
summary: 'Click to expand'
}],
require('./lint')(argv.fix)
require('./lint')(argv.fix, packageOpts.validateLinks !== false)
],
settings: {
// One style for code blocks, whether they have a language or not.
Expand Down

0 comments on commit e41c46e

Please sign in to comment.