-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix 2816 - Standard fix does not work. #3046
Fix 2816 - Standard fix does not work. #3046
Conversation
The standard linter --fix fails if the file being input is not relative to the project root (standard/standard#1384). This MR attempts to fix this by changing the command so the input file is relative to the project root and the output is to a temporary file. Preliminary tests with toy javascript projects seem to indicate this works fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems correct to specify the stdin
Found this after being biten by #2816. I tested and can confirm that this PR fixes |
This pull request has been automatically marked as stale because it has not been updated recently. Make sure to write tests and document your changes. See |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll merge this.
I recommend everyone use ESLint instead of standard
, with a standard
configuration file if you really want all of the rules for StandardJS. I've never understood why there's a separate executable that behaves differently when it's really just ESLint under the hood.
Cheers! 🍻 |
The standard linter --fix fails if the file being input is not relative
to the project root (standard/standard#1384).
This MR attempts to fix this by changing the command so the input file
is relative to the project root and the output is to a temporary file.
Preliminary tests with toy javascript projects seem to indicate this
works fine.
Where are the tests? Have you added tests? Have you updated the tests? Read the
comment above and the documentation referenced in it first. Write tests!
Seriously, read
:help ale-dev
and write tests.