Skip to content
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

Merged
merged 1 commit into from May 21, 2020

Conversation

hamzahamidi
Copy link
Collaborator

@hamzahamidi hamzahamidi commented Oct 20, 2019

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

@codecov-io
Copy link

codecov-io commented Oct 20, 2019

Codecov Report

Merging #254 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #254   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           2      2           
  Lines         208    208           
  Branches       42     42           
=====================================
  Hits          208    208
Impacted Files Coverage Δ
src/utils.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c87b69b...2715e66. Read the comment docs.

@@ -75,7 +75,7 @@ function getOptionsForFormatting(
}

function getRelevantESLintConfig(eslintConfig, eslintPath) {
const cliEngine = getESLintCLIEngine(eslintPath);
const cliEngine = getESLintCLIEngine(eslintPath, { ignore: false });

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?

Copy link
Collaborator Author

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);
Copy link
Collaborator Author

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.

Copy link

@robertpaul01 robertpaul01 left a 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.

@damdeez
Copy link

damdeez commented May 7, 2020

Will this be merged anytime soon?

@hamzahamidi hamzahamidi changed the title Feat(Eslint): Update to Eslint 6 feat(Eslint): Update to Eslint 6 May 21, 2020
@hamzahamidi hamzahamidi merged commit 47acf7c into prettier:master May 21, 2020
hamzahamidi added a commit that referenced this pull request May 21, 2020
hamzahamidi added a commit that referenced this pull request May 21, 2020
@zimme
Copy link
Member

zimme commented May 21, 2020

🎉 This PR is included in version 9.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@zimme zimme added the released label May 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants