mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 14:30:12 +01:00
Add lint rules from eslint-plugin-node.
This commit is contained in:
parent
6525c36f1e
commit
e1eb81cd21
11 changed files with 61 additions and 19 deletions
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const { URL } = require("url");
|
||||
const markdownIt = require("markdown-it");
|
||||
const rules = require("./rules");
|
||||
const helpers = require("../helpers");
|
||||
|
|
@ -681,6 +680,7 @@ function lintFile(
|
|||
}
|
||||
// Make a/synchronous call to read file
|
||||
if (synchronous) {
|
||||
// @ts-ignore
|
||||
lintContentWrapper(null, fs.readFileSync(file, helpers.utf8Encoding));
|
||||
} else {
|
||||
fs.readFile(file, helpers.utf8Encoding, lintContentWrapper);
|
||||
|
|
@ -889,6 +889,7 @@ function readConfig(file, parsers, callback) {
|
|||
*/
|
||||
function readConfigSync(file, parsers) {
|
||||
// Read file
|
||||
// @ts-ignore
|
||||
const content = fs.readFileSync(file, helpers.utf8Encoding);
|
||||
// Try to parse file
|
||||
const { config, message } = parseConfiguration(file, content, parsers);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue