mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Add @stylistic/eslint-plugin to ESLint configuration.
This commit is contained in:
parent
fe02674ce0
commit
164bbac651
21 changed files with 103 additions and 78 deletions
|
|
@ -13,8 +13,8 @@ module.exports = {
|
|||
"tags": [ "test" ],
|
||||
"parser": "markdownit",
|
||||
"function": (params, onError) => {
|
||||
const blockquotes = params.parsers.markdownit.tokens.
|
||||
filter((token => token.type === "blockquote_open"));
|
||||
const blockquotes = params.parsers.markdownit.tokens
|
||||
.filter(((token) => token.type === "blockquote_open"));
|
||||
for (const blockquote of blockquotes) {
|
||||
const lines = blockquote.map[1] - blockquote.map[0];
|
||||
onError({
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ module.exports = {
|
|||
"tags": [ "test", "lint", "javascript" ],
|
||||
"parser": "markdownit",
|
||||
"function": (params, onError) => {
|
||||
const fences = params.parsers.markdownit.tokens.
|
||||
filter((token => token.type === "fence"));
|
||||
const fences = params.parsers.markdownit.tokens
|
||||
.filter(((token) => token.type === "fence"));
|
||||
for (const fence of fences) {
|
||||
if (languageJavaScript.test(fence.info)) {
|
||||
const results = linter.verify(fence.content, js.configs.recommended);
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ module.exports = {
|
|||
"parser": "markdownit",
|
||||
"asynchronous": true,
|
||||
"function": (params, onError) => {
|
||||
const fences = params.parsers.markdownit.tokens.
|
||||
filter((token => token.type === "fence"));
|
||||
const fences = params.parsers.markdownit.tokens
|
||||
.filter(((token) => token.type === "fence"));
|
||||
for (const fence of fences) {
|
||||
if (/jsonc?/i.test(fence.info)) {
|
||||
const errors = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue