-
Notifications
You must be signed in to change notification settings - Fork 5
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
cce98aa
62e3669
a18dbdf
354ceaa
84aebbc
671c049
a03d501
239b15a
db5cd52
d6d4f78
3bd1c70
7c5aef4
3a2ce49
d86cd37
3ae5b70
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
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.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { init } from "./index.js"; | ||
|
||
const configOptions = await init({ | ||
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 @@ | ||
14 | ||
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 @@ | ||
const _ = require("lodash"); | ||
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 accessibilityRules = require("./style/accessibility.json"); | ||
const base = require("./style/base.json"); | ||
const gitHubCustomRules = require("./src/rules/index").rules; | ||
const offByDefault = ["no-empty-alt-text"]; | ||
|
||
module.exports = [...gitHubCustomRules]; | ||
export async function init(consumerConfig) { | ||
// left overwrites right | ||
const accessibilityRules = JSON.parse( | ||
await readFile(new URL("./style/accessibility.json", import.meta.url)), | ||
); | ||
|
||
const offByDefault = ["no-empty-alt-text"]; | ||
const base = JSON.parse( | ||
await readFile(new URL("./style/base.json", import.meta.url)), | ||
); | ||
|
||
for (const rule of gitHubCustomRules) { | ||
const ruleName = rule.names[1]; | ||
base[ruleName] = offByDefault.includes(ruleName) ? false : true; | ||
} | ||
for (const rule of githubMarkdownLint) { | ||
const ruleName = rule.names[1]; | ||
base[ruleName] = offByDefault.includes(ruleName) ? false : true; | ||
} | ||
|
||
module.exports.init = function init(consumerConfig) { | ||
// left overwrites right | ||
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 about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
/* Downcase and strip extra whitespaces and punctuation */ | ||
function stripAndDowncaseText(text) { | ||
export function stripAndDowncaseText(text) { | ||
return text | ||
.toLowerCase() | ||
.replace(/[.,/#!$%^&*;:{}=\-_`~()]/g, "") | ||
.replace(/\s+/g, " ") | ||
.trim(); | ||
} | ||
|
||
module.exports = { stripAndDowncaseText }; |
Uh oh!
There was an error while loading. Please reload this page.