- Notifications
You must be signed in to change notification settings - Fork5
chore(deps-dev): bump markdownlint from 0.36.1 to 0.37.3#135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
cce98aa
62e3669
a18dbdf
354ceaa
84aebbc
671c049
a03d501
239b15a
db5cd52
d6d4f78
3bd1c70
7c5aef4
3a2ce49
d86cd37
3ae5b70
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Uh oh!
There was an error while loading.Please reload this page.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"root": true, | ||
"parserOptions": { | ||
"ecmaVersion": 2020 | ||
}, | ||
"env": { | ||
"es6": true, | ||
"node": true, | ||
"jest": true | ||
}, | ||
"plugins": ["github"], | ||
"extends": ["plugin:github/recommended"], | ||
"rules": { | ||
"filenames/match-regex": "off", | ||
"i18n-text/no-en": "off", | ||
"import/extensions": ["error", { "js": "ignorePackages"}], | ||
"import/no-unresolved": [ | ||
"error", | ||
{ | ||
"ignore": ["^markdownlint/.+"] | ||
} | ||
] | ||
} | ||
} |
This file was deleted.
Uh oh!
There was an error while loading.Please reload this page.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { init } from "./index.js"; | ||
JoyceZhu marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
const configOptions = await init({ | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I was about to recommend pointing of our projects to this branch to make sure things run as expected with this big change/new setup, but it seems like this basically acts like a test? Would it be worth testing this change out in one of our larger repos that uses this project by pointing to this branch? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Yeah, my understanding after reading for awhile is that we only have this file/use | ||
default: false, | ||
"heading-increment": true, | ||
"no-alt-text": true, | ||
"single-h1": true, | ||
"no-emphasis-as-heading": true, | ||
"first-line-heading": true, | ||
}); | ||
const options = { | ||
config: configOptions, | ||
customRules: ["./index.js"], | ||
}; | ||
export default options; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
18 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Changelog | ||
## 0.2.0 | ||
* BREAKING change: Convert to ECMAScript modules (ESM) | ||
## 0.1.0 | ||
* Initial release |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,25 @@ | ||
import { readFile } from "fs/promises"; | ||
import _ from "lodash-es"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. regular lodash is synchronous | ||
import { githubMarkdownLint } from "./src/rules/index.js"; | ||
const offByDefault = ["no-empty-alt-text"]; | ||
export async function init(consumerConfig) { | ||
// left overwrites right | ||
const accessibilityRules = JSON.parse( | ||
await readFile(new URL("./style/accessibility.json", import.meta.url)), | ||
); | ||
const base = JSON.parse( | ||
await readFile(new URL("./style/base.json", import.meta.url)), | ||
); | ||
for (const rule ofgithubMarkdownLint) { | ||
const ruleName = rule.names[1]; | ||
base[ruleName] = offByDefault.includes(ruleName) ? false : true; | ||
} | ||
return _.defaultsDeep(consumerConfig, accessibilityRules, base); | ||
} | ||
export default githubMarkdownLint; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"transform": { | ||
} | ||
} |
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
/* Downcase and strip extra whitespaces and punctuation */ | ||
exportfunction stripAndDowncaseText(text) { | ||
return text | ||
.toLowerCase() | ||
.replace(/[.,/#!$%^&*;:{}=\-_`~()]/g, "") | ||
.replace(/\s+/g, " ") | ||
.trim(); | ||
} | ||
Uh oh!
There was an error while loading.Please reload this page.