diff --git a/lib/utils/linter.js b/lib/utils/linter.js index f17baca..db9b184 100644 --- a/lib/utils/linter.js +++ b/lib/utils/linter.js @@ -28,6 +28,12 @@ module.exports = function (err, output) { return this.deferred.reject(err) } + // If the file is configured to be ignored, `results` will be empty. + // See https://eslint.org/docs/developer-guide/nodejs-api#executeontext. + if (output.results.length === 0) { + return this.deferred.resolve([]) + } + var self = this var config = atom.config.get('linter-js-standard') var msgs = output.results[0].messages