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(options): allow specifying eslint configuration file as an argument #91

Merged
merged 3 commits into from
Aug 16, 2017

Conversation

morhetz
Copy link
Contributor

@morhetz morhetz commented Aug 16, 2017

Adds --eslint-config-path cli option
Config file parsing and resolution is on behalf of eslint ConfigFile base func

Closes #37

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

Wow! Thanks for doing this! Required way fewer changes than I expected. Thank you! Just one thing... 😄

@@ -47,6 +49,11 @@ function formatFilesFromArgv({
prettierLast,
prettierOptions,
}

if (eslintConfigPath) {
prettierESLintOptions.eslintConfig = ConfigFile.load(eslintConfigPath)
Copy link
Member

Choose a reason for hiding this comment

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

Could we get a test for this? I'd be fine if you wanted to add // istanbul ignore if on line 52 because testing this in the unit tests would be tough, but then we could add this to the dist-tests. Could you do that please? That'd be swell!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would try to

@codecov-io
Copy link

codecov-io commented Aug 16, 2017

Codecov Report

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

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #91   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           3      3           
  Lines         105    107    +2     
=====================================
+ Hits          105    107    +2
Impacted Files Coverage Δ
src/format-files.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 72057fb...41996e4. Read the comment docs.

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

Perfect! Thank you again!

@kentcdodds kentcdodds merged commit 87c0cf1 into prettier:master Aug 16, 2017
@morhetz
Copy link
Contributor Author

morhetz commented Aug 16, 2017

🔥

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.

None yet

3 participants