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

Add Prettier support for editorconfig file #129

Merged
merged 2 commits into from
Jul 8, 2018

Conversation

loicplaire
Copy link
Contributor

As per #125, this change will allow Prettier to parse and use the .editorconfig file (if present).

@codecov
Copy link

codecov bot commented Jun 21, 2018

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #129   +/-   ##
=======================================
  Coverage   88.27%   88.27%           
=======================================
  Files          25       25           
  Lines         418      418           
  Branches       93       79   -14     
=======================================
  Hits          369      369           
- Misses         40       42    +2     
+ Partials        9        7    -2
Impacted Files Coverage Δ
packages/core/src/plugins/prettier.js 100% <100%> (ø) ⬆️
packages/core/src/templates/reactNativeTemplate.js 76.66% <0%> (ø) ⬆️
packages/core/src/h2x/replaceAttrValues.js 72.72% <0%> (ø) ⬆️
packages/core/src/h2x/removeDimensions.js 83.33% <0%> (ø) ⬆️

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 261594a...a7b8f02. Read the comment docs.


it('should resolve the prettier config with the editorconfig option', async () => {
// only mock prettier `resolveConfig` method
jest.mock('prettier', () =>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will get hoisted to the top of the file and might have unintended side-effects for other tests importing Prettier. jest.doMock() is more appropriate for this case.

@gregberge gregberge merged commit 968fd82 into gregberge:master Jul 8, 2018
@gregberge
Copy link
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants