-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Consistent code style #134
Comments
Yes, I agree. It is good to have consistent formatting. When I started the repo I only used ESLint. I am somewhat aware that this is not the same. Should we remove ESlint specifications then, or is it safe / recommended to have both? |
I think it would still be useful to keep ESLint with the rules you already defined. Depending on what rules are specified and what formatter is used there can be conflicts between the two. In the case of prettier there is a ESLint plugin called eslint-config-prettier that resolves those conflicts. |
Well, I'm a bit torn on this. With eslint we currently have styling hints for the typescript. And the other file-types - html and vue - are not edited often. When enforcing code style, prettier seems to be a better choice. |
I am pro prettier because a consistent code style is more professional and its good for anyone to learn to use a prettier. We need to make sure to include a proper description of how to use it in the CONTRIBUTING.md file. Linter and prettier also have distinct functionalities, and from what I've seen after googling they can and, in most cases should, be used together. Actually, most sources recommend using eslint-config-pretties: source 1 source 2 source 3 source 4 |
You are right. Stuff like unused vars cannot be caught by prettier. So both then? |
I would like to suggest specifying the code style of this repository by using a consistent fromatter like Prettier which will enforce the same indentation rules for every file. This would make it easier for new contributors to not mess with the existing code formatting and will also highlight issues like orphaned closing tags in HTML files.
The text was updated successfully, but these errors were encountered: