From e0c7942d18eb344f5f274f18739d05819378adaf Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Mon, 30 May 2016 12:42:10 -0700 Subject: [PATCH 1/2] chore(package): update eslint to version 2.11.1 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 87de958a..1a1bd35c 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "atom-package-deps": "^4.0.1", "consistent-path": "^2.0.1", "escape-html": "^1.0.3", - "eslint": "^2.9.0", + "eslint": "^2.11.1", "process-communication": "^1.1.0", "resolve-env": "^1.0.0" }, From 726da43682510af530d797d54818fa4b68ba913b Mon Sep 17 00:00:00 2001 From: Landon Abney Date: Thu, 9 Jun 2016 10:28:48 -0700 Subject: [PATCH 2/2] Update ignored message list for eslint v2.11.1 --- lib/worker.js | 13 ++++++++----- src/worker.js | 15 +++++++++------ 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/lib/worker.js b/lib/worker.js index f161f518..dffa0937 100644 --- a/lib/worker.js +++ b/lib/worker.js @@ -20,8 +20,13 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de process.title = 'linter-eslint helper'; -var ignoredMessageV1 = 'File ignored because of your .eslintignore file. Use --no-ignore to override.'; -var ignoredMessageV2 = 'File ignored because of a matching ignore pattern. Use --no-ignore to override.'; +var ignoredMessages = [ +// V1 +'File ignored because of your .eslintignore file. Use --no-ignore to override.', +// V2 +'File ignored because of a matching ignore pattern. Use --no-ignore to override.', +// V2.11.1 +'File ignored because of a matching ignore pattern. Use "--no-ignore" to override.']; function lintJob(argv, contents, eslint, configPath, config) { if (configPath === null && config.disableWhenNoEslintConfig) { @@ -29,9 +34,7 @@ function lintJob(argv, contents, eslint, configPath, config) { } eslint.execute(argv, contents); return global.__LINTER_ESLINT_RESPONSE.filter(function (e) { - return e.message !== ignoredMessageV1; - }).filter(function (e) { - return e.message !== ignoredMessageV2; + return !ignoredMessages.includes(e.message); }); } function fixJob(argv, eslint) { diff --git a/src/worker.js b/src/worker.js index ac92290d..1e018115 100644 --- a/src/worker.js +++ b/src/worker.js @@ -7,10 +7,14 @@ import * as Helpers from './worker-helpers' import { create } from 'process-communication' import { FindCache } from 'atom-linter' -const ignoredMessageV1 = - 'File ignored because of your .eslintignore file. Use --no-ignore to override.' -const ignoredMessageV2 = - 'File ignored because of a matching ignore pattern. Use --no-ignore to override.' +const ignoredMessages = [ + // V1 + 'File ignored because of your .eslintignore file. Use --no-ignore to override.', + // V2 + 'File ignored because of a matching ignore pattern. Use --no-ignore to override.', + // V2.11.1 + 'File ignored because of a matching ignore pattern. Use "--no-ignore" to override.', +] function lintJob(argv, contents, eslint, configPath, config) { if (configPath === null && config.disableWhenNoEslintConfig) { @@ -18,8 +22,7 @@ function lintJob(argv, contents, eslint, configPath, config) { } eslint.execute(argv, contents) return global.__LINTER_ESLINT_RESPONSE - .filter(e => e.message !== ignoredMessageV1) - .filter(e => e.message !== ignoredMessageV2) + .filter(e => !ignoredMessages.includes(e.message)) } function fixJob(argv, eslint) { try {