mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-19 07:20:13 +01:00
Remove helpers.utf8Encoding because it annoys the latest TypeScript compiler.
This commit is contained in:
parent
f87f9d0800
commit
dce5dd5e71
3 changed files with 8 additions and 13 deletions
|
|
@ -710,9 +710,9 @@ function lintFile(
|
|||
// Make a/synchronous call to read file
|
||||
if (synchronous) {
|
||||
// @ts-ignore
|
||||
lintContentWrapper(null, fs.readFileSync(file, helpers.utf8Encoding));
|
||||
lintContentWrapper(null, fs.readFileSync(file, "utf8"));
|
||||
} else {
|
||||
fs.readFile(file, helpers.utf8Encoding, lintContentWrapper);
|
||||
fs.readFile(file, "utf8", lintContentWrapper);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -967,7 +967,7 @@ function readConfig(file, parsers, callback) {
|
|||
parsers = null;
|
||||
}
|
||||
// Read file
|
||||
fs.readFile(file, helpers.utf8Encoding, (err, content) => {
|
||||
fs.readFile(file, "utf8", (err, content) => {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
|
@ -1020,7 +1020,7 @@ function readConfigPromise(file, parsers) {
|
|||
function readConfigSync(file, parsers) {
|
||||
// Read file
|
||||
// @ts-ignore
|
||||
const content = fs.readFileSync(file, helpers.utf8Encoding);
|
||||
const content = fs.readFileSync(file, "utf8");
|
||||
// Try to parse file
|
||||
const { config, message } = parseConfiguration(file, content, parsers);
|
||||
if (!config) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue