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

Support different formatters' outputs. #43

Open
carlitux opened this issue Dec 17, 2020 · 0 comments
Open

Support different formatters' outputs. #43

carlitux opened this issue Dec 17, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@carlitux
Copy link

Support any other output format from formatters?

Looking a way to get eslint working without writing do disk with doesWriteToFile I saw documentation that says:

This option has the same effect as --fix with one difference: the fixes are not saved to the file system. This makes it possible to fix code from stdin (when used with the --stdin flag).

Because the default formatter does not output the fixed code, you'll have to use another one (e.g. json) to get the fixes. Here's an example of this pattern

getSomeText | eslint --stdin --fix-dry-run --format=json

This flag can be useful for integrations (e.g. editor plugins) which need to autofix text from the command line without saving it to the filesystem.

Which output is a json with a field output I don't think it is a standard as I didn't find references about it, maybe I am wrong.

But would be good a way to configure these kind of formats.

@iamcco iamcco added the enhancement New feature or request label Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants