-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Add specific .editorconfig file for each specific style linting #905
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
Comments
Could I start working on this feature? |
Sure! 🙂 |
Just to be clear about the proposal. During the prompt both on the create command and on the invoke with cli-plugin-eslint, it should ask if the user wants to create an editorconfig file if the Airbnb or the Standard option was chosen? And the config files should be the ones contained in the repositories: Or is it best to create the editorconfig file without prompting? I'm thrilled to work on this feature, both because I'm enjoying Vue so much and because it will be my first real open source contribution. |
I vote for create without prompting, so that peoples do not have to worry about too much options. |
What should happen during invoke if the user already has an editorconfig file? |
I would love to keep consistency with the choosen linters. Regarding the prompt, @psg2 I would use the linter if there is one and ask for a preset if not. What do you think ? |
Also might be prudent to think about what happens when TypeScript is enabled. You can use either ESLint or TSLint on TypeScript projects. There are AirBnb presets for both TSLint and ESLint too. Do we require some kind of abstraction above ESLint and TSLint with a negotiator behind the scenes? |
@elevatebart I'm sorry, but I didn't understand what you meant by "And since supports prettier preset for eslint we should try to implement it as well.". Could you explain one more time? @Daekano I think there's no adjustment considering Typescript. Because the editorconfig from Airbnb and standard would remain the same. And the other linting options doesn't have default editorconfig files. |
@psg2 the Prettier preset for eslint is a little different from AirBnB and Standard, for instance using prettier uses double quotes instead of single quotes. Have a look at this repo and I hope you will understand better. If not, please pm me on twitter @bartledoux. |
@elevatebart I understand that. But eslint-config-prettier doesn't provide an editorconfig file. So if the users choose eslint + prettier as the linter option, it should not generate an editorconfig file and would stay as it is today. |
Indeed, my bad, the whole purpose of prettier is specifically to avoid the need of a config file. |
|
I'm sorry that after so long I haven't made any progress on this issue. |
Feel free to go ahead :) |
What problem does this feature solve?
This feature will configure autocomplete to a specific style in any IDE that support .editorconfig file. For example when choosing linter to use AirBnB or StandardJS style, it will generate editorconfig with that specific style.
What does the proposed API look like?
Prompt
Or just create it without prompting.
The text was updated successfully, but these errors were encountered: