New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Eslint): Update to Eslint 6 #254
feat(Eslint): Update to Eslint 6 #254
Conversation
Codecov Report
@@ Coverage Diff @@
## master #254 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 2 2
Lines 208 208
Branches 42 42
=====================================
Hits 208 208
Continue to review full report at Codecov.
|
@@ -75,7 +75,7 @@ function getOptionsForFormatting( | |||
} | |||
|
|||
function getRelevantESLintConfig(eslintConfig, eslintPath) { | |||
const cliEngine = getESLintCLIEngine(eslintPath); | |||
const cliEngine = getESLintCLIEngine(eslintPath, { ignore: false }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this result in ignored files being formatted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. It will just reduce the the unnecessary readings of the ignorefiles
@@ -353,8 +353,10 @@ test('reads text from fs if filePath is provided but not text', () => { | |||
format({ filePath }); | |||
// format({filePath}).catch(() => {}) | |||
// one hit to get the file and one for the eslintignore | |||
expect(fsMock.readFileSync).toHaveBeenCalledTimes(2); | |||
expect(fsMock.readFileSync).toHaveBeenCalledTimes(3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently any call to CLIEngine(eslintOptions) where eslintOptions doesn't contain a cwd nor a ignore set to false, will lead to reading the eslintignore twice now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this makes sense to merge. An additional read of the ignore file isn't too big of an issue.
Will this be merged anytime soon? |
This reverts commit 47acf7c.
🎉 This PR is included in version 9.0.2 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Update to Eslint 6
Apparently any call to CLIEngine(eslintOptions) where eslintOptions doesn't contain a cwd nor a ignore set to false, will lead to reading the eslintignore twice now.
You can try the branch with:
$ yarn add prettier-eslint@hamzahamidi/prettier-eslint#bundles
Or
$ npm install --save prettier-eslint@hamzahamidi/prettier-eslint#bundles