Skip to content

Commit

Permalink
switch to eslint 6 (#51)
Browse files Browse the repository at this point in the history
not sure why dependabot did not do it
  • Loading branch information
tomap authored and yoshinorin committed Jul 19, 2019
1 parent aa81b2f commit 6995e09
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 144 deletions.
4 changes: 2 additions & 2 deletions lib/generator.js
Expand Up @@ -42,7 +42,7 @@ module.exports = function(locals) {
const year = date.year();
const month = date.month() + 1; // month is started from 0

if (!posts.hasOwnProperty(year)) {
if (!Object.prototype.hasOwnProperty.call(posts, year)) {
// 13 arrays. The first array is for posts in this year
// and the other arrays is for posts in this month
posts[year] = [
Expand All @@ -67,7 +67,7 @@ module.exports = function(locals) {
// Daily
if (config.archive_generator.daily) {
const day = date.date();
if (!posts[year][month].hasOwnProperty('day')) {
if (!Object.prototype.hasOwnProperty.call(posts[year][month], 'day')) {
posts[year][month].day = {};
}

Expand Down

0 comments on commit 6995e09

Please sign in to comment.