mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Convert markdownlint library to an ECMAScript module, replace markdownlint-micromark with micromark, stop publishing (large) markdownlint-browser.js, see https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c for guidance.
This commit is contained in:
parent
191226f070
commit
1e71f6f44e
140 changed files with 1087 additions and 10428 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
/** @type import("../../lib/markdownlint").Rule[] */
|
||||
/** @type {import("../../lib/markdownlint.mjs").Rule[]} */
|
||||
module.exports = [
|
||||
|
||||
// micromark parser (preferred)
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
/** @type import("../../lib/markdownlint").Rule */
|
||||
/** @type {import("../../lib/markdownlint.mjs").Rule} */
|
||||
module.exports = {
|
||||
"names": [ "every-n-lines" ],
|
||||
"description": "Rule that reports an error every N lines",
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
/** @type import("../../lib/markdownlint").Rule */
|
||||
/** @type {import("../../lib/markdownlint.mjs").Rule} */
|
||||
module.exports = {
|
||||
"names": [ "first-line" ],
|
||||
"description": "Rule that reports an error for the first line",
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
/** @type import("../../lib/markdownlint").Rule */
|
||||
/** @type {import("../../lib/markdownlint.mjs").Rule} */
|
||||
module.exports = {
|
||||
"names": [ "letters-E-X", "letter-E-letter-X", "contains-ex" ],
|
||||
"description": "Rule that reports an error for lines with the letters 'EX'",
|
||||
|
|
@ -7,7 +7,7 @@ const eslint = require("eslint");
|
|||
const linter = new eslint.Linter();
|
||||
const languageJavaScript = /js|javascript/i;
|
||||
|
||||
/** @type import("../../lib/markdownlint").Rule */
|
||||
/** @type {import("../../lib/markdownlint.mjs").Rule} */
|
||||
module.exports = {
|
||||
"names": [ "lint-javascript" ],
|
||||
"description": "Rule that lints JavaScript code",
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
"name": "markdownlint-rule-sample",
|
||||
"version": "0.0.1",
|
||||
"description": "Package for markdownlint custom rule sample",
|
||||
"type": "commonjs",
|
||||
"main": "sample-rule.js",
|
||||
"author": "David Anson (https://dlaa.me/)",
|
||||
"homepage": "https://github.com/DavidAnson/markdownlint",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
/** @type import("../../../lib/markdownlint").Rule */
|
||||
/** @type {import("../../../lib/markdownlint.mjs").Rule} */
|
||||
module.exports = {
|
||||
"names": [ "sample-rule" ],
|
||||
"description": "Sample rule",
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const anyBlockquote = require("./any-blockquote");
|
||||
const anyBlockquote = require("./any-blockquote.cjs");
|
||||
module.exports.anyBlockquote = anyBlockquote[1];
|
||||
|
||||
const everyNLines = require("./every-n-lines");
|
||||
const everyNLines = require("./every-n-lines.cjs");
|
||||
module.exports.everyNLines = everyNLines;
|
||||
|
||||
const firstLine = require("./first-line");
|
||||
const firstLine = require("./first-line.cjs");
|
||||
module.exports.firstLine = firstLine;
|
||||
|
||||
const lettersEX = require("./letters-E-X");
|
||||
const lettersEX = require("./letters-E-X.cjs");
|
||||
module.exports.lettersEX = lettersEX;
|
||||
|
||||
const lintJavaScript = require("./lint-javascript");
|
||||
const lintJavaScript = require("./lint-javascript.cjs");
|
||||
module.exports.lintJavaScript = lintJavaScript;
|
||||
|
||||
const validateJson = require("./validate-json");
|
||||
const validateJson = require("./validate-json.cjs");
|
||||
module.exports.validateJson = validateJson;
|
||||
|
||||
module.exports.all = [
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
const { parse, printParseErrorCode } = require("jsonc-parser");
|
||||
|
||||
/** @type import("../../lib/markdownlint").Rule */
|
||||
/** @type {import("../../lib/markdownlint.mjs").Rule} */
|
||||
module.exports = {
|
||||
"names": [ "validate-json" ],
|
||||
"description": "Rule that validates JSON code",
|
||||
Loading…
Add table
Add a link
Reference in a new issue