-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
ignores .eslintrc.json #19
Comments
Hi @fbacker I have looked into the VSCode extensions source-code - and in my understanding the support for eslint is not part of "native" prettier - and we use that to locate the configuration file. It may be part of the prettier-eslint package.. That said - if someone is willing to implement the feature they are welcome - I like the VSCode extension - and I'm sure that there is alot of wisdom in that plugin. If it should be implemented I think it should be part of the #16's solution - as we can then "probe" if you have prettier-eslint or prettier-tslint installed, and then use their commands instead. |
Hmm. I didn't see this before. I could possibly make more mods to my fix for #16 to make this work too. |
If someone has both prettier-eslint and prettier-tslint, I guess we'd have to use the right one for the file extension. Right? |
Hey @jesperbjensen, you think we should have a dictionary mapping an extension regex to command path to search like this? // TODO: better name
private static readonly IDictionary<string, string> _specificExtensionCommandMap = new Dictionary<string, string>
{
{ ".jsx?", "node_modules\\.bin\\prettier-eslint.cmd" },
{ ".tsx?", "node_modules\\.bin\\prettier-tslint.cmd" }
}; Then, we could search for the more specific extension-related formatter first, then fall back to the default prettier.cmd search? If so, we can find the local prettier.cmd, yet we should probably keep searching up the directory tree for the specific ones? |
I just realized today that I can definitely implement adding prettier-eslint though (and lay the groundwork for future integrations) |
@jesperbjensen @madskristensen - should we also be installing our own copy of |
All, I have a functioning version that runs prettier-eslint if it's present. Was going to add it as part of the additional extension support I'm adding too. Just wanted to put this here in case someone else tried to start working on this |
Installed product versions
Description
Able to use .eslintrc.json instead of .prettierrc. Other Prettier formatters e.g. for Visual Studio Code uses this. Often eslint is already used and having 2 files specifying same things is not a good thing.
Steps to recreate
Current behavior
Ignores rules set by eslint
Expected behavior
Look for configuration files by order
The text was updated successfully, but these errors were encountered: