Skip to content

Commit

Permalink
fix(eslint): add globals array to fix weird issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Kent C. Dodds committed Jan 13, 2017
1 parent 3b1b8e3 commit 9f59905
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,14 @@ function prettify(text, formatOptions) {
}

function eslintFix(text, eslintConfig) {
const eslintOptions = {...eslintConfig, fix: true}
const eslintOptions = {
...eslintConfig,
fix: true,
// there's some trouble with `globals`...
// I'm pretty sure it's not necessary to have them
// for a --fix though so :shrug:
globals: [],
}
const eslint = new CLIEngine(eslintOptions)
try {
const report = eslint.executeOnText(text)
Expand Down

0 comments on commit 9f59905

Please sign in to comment.