Update code for new behavior of ESLint rule n/prefer-promises/fs.

This commit is contained in:
David Anson 2023-08-22 21:39:09 -07:00
parent 8c8841e7b1
commit 523eeee3bb
3 changed files with 77 additions and 82 deletions

View file

@ -1176,6 +1176,7 @@ function readConfig(file, parsers, fs, callback) {
}
// Read file
file = helpers.expandTildePath(file, require("node:os"));
// eslint-disable-next-line n/prefer-promises/fs
fs.readFile(file, "utf8", (err, content) => {
if (err) {
// @ts-ignore