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
Passthrough eslint config to prettier-eslint #854
Conversation
I'll close this for now, as no release of the tool implements this argument. |
Oh, 4.2.0 does, as of less than half an hour ago. I'll reopen this. What you should do is leave this off by default, and add an option for turning this behaviour on. Then edit the documentation to explain this. It can be turned on by default after enough people upgrade. |
call ale#Set('javascript_prettier_eslint_executable', 'prettier-eslint') | ||
call ale#Set('javascript_prettier_eslint_use_global', 0) | ||
call ale#Set('javascript_prettier_eslint_options', '') | ||
|
||
function! ale#fixers#prettier_eslint#GetExecutable(buffer) abort | ||
return ale#node#FindExecutable(a:buffer, 'javascript_prettier_eslint', [ | ||
\ 'node_modules/prettier-eslint-cli/index.js', |
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.
Are there older versions of prettier-eslint-cli
with this path? If so, leave this in, but move it down the List.
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.
Nope. There were no version with this path
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.
Okay, cool. 👍
Hm, this fixer was never working as it supposed to due to wrong exec path and lack of eslint config passing. Best case it was working just as plain prettier.js formatter having no Wouldn't it be better/easier to engage users to upgrade |
Leaving this option |
If you set the argument by default, then the integration will stop working for people who are using the plugin who haven't yet upgraded |
New options for any tool can't be used by default until some time has passed and people have the opportunity to upgrade first. |
Integration is not working without that option |
It's not just a new one, it's core functionality of prettier-eslint |
Maybe an exception could be made here, as the configuration file is pretty important. |
I think let's go with it. Update the documentation to indicate the minimum supported version, and cover the new argument with Vader tests. |
I would rather there weren't so many tools for doing essentially the same thing. Personally, I wish that Still, some people like this, so it's worth supporting. |
As far as I know |
@w0rp could you please review when you have a time? |
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.
Looks pretty good so far. Now you can add some Vader tests to cover the command and the new option.
I have added tests for this and merged this now. I also had to fix an issue where an empty configuration filename would sometimes be used. |
Cheers! 🍻 |
closes #853