Skip to content
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

chore: add .editorconfig #533

Merged
merged 1 commit into from
Feb 21, 2022
Merged

chore: add .editorconfig #533

merged 1 commit into from
Feb 21, 2022

Conversation

ilharp
Copy link
Member

@ilharp ilharp commented Feb 21, 2022

@MaikoTan
Copy link
Member

I think this would be more like a "personalized setting" not a general way to force contributors to follow the coding style.
Since we have ESLint for that already, I don't see the necessity of adding this file.

@ilharp
Copy link
Member Author

ilharp commented Feb 21, 2022

All settings in .editorconfig are not "personalized setting"; they're basic rules that Koishi use, and should to force contributors to follow - insert_final_newline, indent_style, indent_size etc.

https://editorconfig.org has a full description of the benefits of EditorConfig. EditorConfig is used more for the editor to automatically recognize coding styles, not for code linting.

ESLint can do linting but it won't modify editor preferences, which creates a big divide between code editing and yarn lint. Editor's default settings can sometimes lead to a bad experience. EditorConfig is for solving this.

@shigma shigma merged commit 1d18ae4 into koishijs:master Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants