From 75ccdffbf9a1b1281f4aac53b2fc77f29813151c Mon Sep 17 00:00:00 2001 From: segayuu Date: Wed, 18 Jul 2018 10:06:14 +0900 Subject: [PATCH 1/2] upgrade eslint-plugin-node - changed require eslint version --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a17251a..2a1623c 100644 --- a/package.json +++ b/package.json @@ -15,9 +15,9 @@ ], "license": "MIT", "peerDependencies": { - "eslint": ">= 3.1.0" + "eslint": ">=5.0.0" }, "dependencies": { - "eslint-plugin-node": "^5.2.1" + "eslint-plugin-node": "^7.0.0" } } From ebddf9f9129cdb5b78cde39da474082a814c9b8d Mon Sep 17 00:00:00 2001 From: segayuu Date: Wed, 18 Jul 2018 10:20:30 +0900 Subject: [PATCH 2/2] fix eslint.js (Partially apply #6) --- eslint.js | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/eslint.js b/eslint.js index 8ab24f2..8155def 100644 --- a/eslint.js +++ b/eslint.js @@ -1,6 +1,5 @@ module.exports = { extends: ['eslint:recommended', 'plugin:node/recommended'], - plugins: ['node'], rules: { // override recomennded 'no-console': 'off', @@ -18,11 +17,13 @@ module.exports = { 'curly': ['error', 'multi-line'], 'dot-location': ['error', 'property'], 'dot-notation': 'error', + /** eqeqeq Deprecated option. @see https://github.com/hexojs/eslint-config-hexo/issues/8 */ 'eqeqeq': ['error', 'allow-null'], 'no-else-return': 'error', 'no-eval': 'error', 'no-extend-native': 'error', 'no-extra-bind': 'error', + 'no-extra-label': 'error', 'no-implicit-globals': 'error', 'no-implied-eval': 'error', 'no-lone-blocks': 'error', @@ -59,7 +60,6 @@ module.exports = { 'no-use-before-define': ['error', 'nofunc'], // Node.js and CommonJS 'handle-callback-err': 'error', - 'no-mixed-operators': 'error', 'no-path-concat': 'error', // Stylistic Issues 'array-bracket-spacing': ['error', 'never'], @@ -79,13 +79,13 @@ module.exports = { beforeColon: false, afterColon: true }], - 'keyword-spacing': ['error', {}], + 'keyword-spacing': 'error', 'linebreak-style': ['error', 'unix'], 'lines-around-comment': ['error', { beforeBlockComment: true }], 'new-cap': 'error', 'new-parens': 'error', 'no-array-constructor': 'error', - 'no-extra-label': 'error', + 'no-mixed-operators': 'error', 'no-multiple-empty-lines': 'error', 'no-nested-ternary': 'error', 'no-new-object': 'error', @@ -125,12 +125,5 @@ module.exports = { 'rest-spread-spacing': ['error', 'never'], 'template-curly-spacing': ['error', 'never'], 'yield-star-spacing': ['error', 'after'] - }, - env: { - node: true, - es6: true - }, - parserOptions: { - ecmaVersion: 6 } };