Skip to content

Commit 719038e

Browse files
authoredJul 30, 2019
Merge pull request #37 from hexojs/dependabot/npm_and_yarn/eslint-tw-6.0.1
Update eslint requirement from ^5.16.0 to ^6.0.1
2 parents d2100fb + 8c83d6e commit 719038e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎lib/fs.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ function readFile(path, options = {}, callback) {
304304
options = {};
305305
}
306306

307-
if (!options.hasOwnProperty('encoding')) options.encoding = 'utf8';
307+
if (!Object.prototype.hasOwnProperty.call(options, 'encoding')) options.encoding = 'utf8';
308308

309309
return readFileAsync(path, options).then(content => {
310310
if (options.escape == null || options.escape) {
@@ -318,7 +318,7 @@ function readFile(path, options = {}, callback) {
318318
function readFileSync(path, options = {}) {
319319
if (!path) throw new TypeError('path is required!');
320320

321-
if (!options.hasOwnProperty('encoding')) options.encoding = 'utf8';
321+
if (!Object.prototype.hasOwnProperty.call(options, 'encoding')) options.encoding = 'utf8';
322322

323323
const content = fs.readFileSync(path, options);
324324

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
},
3636
"devDependencies": {
3737
"chai": "^4.1.2",
38-
"eslint": "^5.16.0",
38+
"eslint": "^6.0.1",
3939
"eslint-config-hexo": "^3.0.0",
4040
"iferr": "^1.0.2",
4141
"mocha": "^6.0.2",

0 commit comments

Comments
 (0)
Please sign in to comment.