Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

eslint@2.11.1 #593

Merged
merged 2 commits into from
Jun 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions lib/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,21 @@ 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) {
return [];
}
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) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
15 changes: 9 additions & 6 deletions src/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,22 @@ 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) {
return []
}
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 {
Expand Down