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

Commit d92a49b

Browse files
authored
Merge pull request #1024 from AtomLinter/arcanemagus/dont-check-fixable-on-eslint-v3
Don't attempt to process fixable rules on ESLint v3
2 parents 1a9cf01 + 8fb304a commit d92a49b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
},
107107
"ignoreFixableRulesWhileTyping": {
108108
"title": "Ignore fixable rules while typing",
109-
"description": "Have the linter ignore all fixable rules during linting when editing a document. The list is automatically updated on each lint job, and requires at least one run to be populated.",
109+
"description": "Have the linter ignore all fixable rules during linting when editing a document. The list is automatically updated on each lint job, and requires at least one run to be populated. Only supported when using ESLint v4+.",
110110
"type": "boolean",
111111
"default": false
112112
}

src/worker.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ let sendRules = false
2121
* @return {void}
2222
*/
2323
function updateFixableRules(linter) {
24+
if (linter === undefined) {
25+
// ESLint < v4 doesn't support this property
26+
return
27+
}
28+
2429
// Build a set of fixable rules based on the rules loaded in the provided linter
2530
const currentRules = new Set()
2631
linter.getRules().forEach((props, rule) => {

0 commit comments

Comments
 (0)