Skip to content

Commit

Permalink
Update yarn.lock, commands, and add more rules
Browse files Browse the repository at this point in the history
  • Loading branch information
OnkarRuikar committed Aug 25, 2022
1 parent d92c041 commit 0a180cf
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
20 changes: 17 additions & 3 deletions .markdownlint.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,24 +108,38 @@
"rules": [
{
"name": "curly-double-quotes",
"message": "Don't use curly double quotes.",
"message": "Don't use curly double quotes",
"searchPattern": "/“|”/g",
"replace": "\"",
"skipCode": true
},
{
"name": "curly-single-quotes",
"message": "Don't use curly single quotes.",
"message": "Don't use curly single quotes",
"searchPattern": "/‘|’/g",
"replace": "'",
"skipCode": true
},
{
"name": "m-dash",
"message": "Don't use '--'. Use m-dash — instead.",
"message": "Don't use '--'. Use m-dash — instead",
"search": " -- ",
"replace": "",
"skipCode": true
},
{
"name": "relative-link",
"message": "Internal links should start with '/'",
"search": "(en-US/docs",
"replace": "(/en-US/docs",
"skipCode": true
},
{
"name": "trailing-spaces",
"message": "Avoid trailing spaces",
"searchPattern": "/ +$/gm",
"replace": "",
"skipCode": false
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"content": "env-cmd --silent cross-env CONTENT_ROOT=files yari-tool",
"build": "env-cmd --silent cross-env CONTENT_ROOT=files BUILD_OUT_ROOT=build yari-build",
"fix:md": "npm run lint:md -- --fix",
"lint:md": "markdownlint \"**/*.md\" -i node_modules"
"lint:md": "markdownlint \"**/*.md\" -i node_modules -r markdownlint-rule-search-replace"
},
"dependencies": {
"@mdn/yari": "1.16.2",
Expand Down
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3065,11 +3065,23 @@ [email protected]:
minimatch "~5.1.0"
run-con "~1.2.11"

markdownlint-rule-helpers@^0.16.0:
version "0.16.0"
resolved "https://registry.yarnpkg.com/markdownlint-rule-helpers/-/markdownlint-rule-helpers-0.16.0.tgz#c327f72782bd2b9475127a240508231f0413a25e"
integrity sha512-oEacRUVeTJ5D5hW1UYd2qExYI0oELdYK72k1TKGvIeYJIbqQWAz476NAc7LNixSySUhcNl++d02DvX0ccDk9/w==

markdownlint-rule-helpers@~0.17.2:
version "0.17.2"
resolved "https://registry.yarnpkg.com/markdownlint-rule-helpers/-/markdownlint-rule-helpers-0.17.2.tgz#64d6e8c66e497e631b0e40cf1cef7ca622a0b654"
integrity sha512-XaeoW2NYSlWxMCZM2B3H7YTG6nlaLfkEZWMBhr4hSPlq9MuY2sy83+Xr89jXOqZMZYjvi5nBCGoFh7hHoPKZmA==

[email protected]:
version "1.0.4"
resolved "https://registry.yarnpkg.com/markdownlint-rule-search-replace/-/markdownlint-rule-search-replace-1.0.4.tgz#0fcbdced404409a63cb331fa5090b2819ed2eb38"
integrity sha512-VOgjmFrY1vVtURFpjo7QYOL3K9qAy8ari+jFA2KwlkopPhDatvH4tcIR1SexYXe5jqcEwZqOOATCrrYVN81qTg==
dependencies:
markdownlint-rule-helpers "^0.16.0"

markdownlint@~0.26.2:
version "0.26.2"
resolved "https://registry.yarnpkg.com/markdownlint/-/markdownlint-0.26.2.tgz#11d3d03e7f0dd3c2e239753ee8fd064a861d9237"
Expand Down

0 comments on commit 0a180cf

Please sign in to comment.