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 --fix-dry-run for ESLint #988

Closed
graingert opened this issue Oct 10, 2017 · 8 comments
Closed

Support --fix-dry-run for ESLint #988

graingert opened this issue Oct 10, 2017 · 8 comments

Comments

@graingert
Copy link

graingert commented Oct 10, 2017

(finished - exit code 1) ['/bin/zsh', '-c', '''/home/graingert/projects/redacted/frontend/node_modules/eslint/bin/eslint.js'' -c ''/home/graingert/projects/redacted/frontend/.eslintrc.json'' --fix ''/tmp/vGVEPLm/23/_btest.js''']

See eslint/eslint#9073

graingert added a commit to graingert/ale that referenced this issue Oct 10, 2017
@graingert
Copy link
Author

graingert commented Oct 10, 2017

ah this looks like it's not possible, as the file cannot be sent via --fix

@w0rp
Copy link
Member

w0rp commented Oct 10, 2017

Yeah. It doesn't do that because that doesn't work.

@w0rp w0rp closed this as completed Oct 10, 2017
@graingert graingert changed the title ale fix isn't passing stdin-filename to eslint ale fix isn't passing --fix-dry-run to eslint Oct 10, 2017
@graingert
Copy link
Author

@w0rp updated title, can you reopen?

@w0rp
Copy link
Member

w0rp commented Oct 10, 2017

Sure, I didn't know about that option. It looks like it was added just over a week ago.

We can add support for this with an option, which can be off by default, until enough time passes for people to upgrade.

@w0rp w0rp reopened this Oct 10, 2017
@w0rp w0rp changed the title ale fix isn't passing --fix-dry-run to eslint Support --fix-dry-run for ESLint Oct 10, 2017
@graingert
Copy link
Author

Yeah I didn't spot it either

@w0rp
Copy link
Member

w0rp commented Nov 22, 2017

--fix-dry-run is now supported where available, and --fix-to-stdout is support for eslint_d where available.

@w0rp
Copy link
Member

w0rp commented Nov 22, 2017

Nope, I took it away again. The --fix-dry-run option is stupid because you can't just get the fixed file via stdout, you have to parse some JSON output. That means I'd need to add support for post-processing of output for fixers. That's worth supporting anyway.

@w0rp w0rp closed this as completed in 5160f81 Nov 22, 2017
@w0rp
Copy link
Member

w0rp commented Nov 22, 2017

Okay, now ALE post-processes the JSON output to get the actual lines out of that, and --fix-dry-run is supported where available.

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

No branches or pull requests

2 participants