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(cli): add the --stdin-filepath option #108

Merged
merged 1 commit into from
Sep 27, 2017

Conversation

BenoitZugmeyer
Copy link
Contributor

What:

Add the --stdin-filepath option.

Why:

This option is really usefull when using prettier-eslint-cli inside text editor plugins, to let prettier-eslint discover the correct eslintrc configuration for the given file.

How:

It's pretty straightforward:

  • declared the new option for the argument parser
  • use its value when running pretierr-eslint-cli on stdin.

Related:

@codecov-io
Copy link

codecov-io commented Sep 27, 2017

Codecov Report

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

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #108   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           3      3           
  Lines         108    108           
  Branches       14     14           
=====================================
  Hits          108    108
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 d28c5ef...84911de. 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.

Excellent! Thank you!

@kentcdodds
Copy link
Member

Oh, one other thing, could you update the README?

This option is really usefull when using prettier-eslint-cli inside text
editor plugins, to let prettier-eslint discover the correct eslintrc
configuration for the given file.

Related:
* prettier#95
* sbdchd/neoformat#112
* prettier/prettier-emacs#10 (comment)
@BenoitZugmeyer
Copy link
Contributor Author

Done! (I forced-push the change)

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.

Super!

@kentcdodds kentcdodds merged commit 50dd024 into prettier:master Sep 27, 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