-
Notifications
You must be signed in to change notification settings - Fork 357
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
Enforce EditorConfig rules with a linter #1380
Comments
More generally, I think a lot of things in the code guide can be linted for. If something can't be linted, we could consider removing it from the code guide. This would mean that contributors can fix mistakes before they open a PR (if they lint locally) or directly after they open a PR, and the code reviewer can focus on higher-level issues. |
I’d suggest editorconfig-checker enforced by GitHub Action on every pull request, see example. |
There is already #856 for EditorConfig enforcement, but that only enforces the number of spaces. For language/context specific indenting, it needs to be done by something like ESLint |
I found that Prettier also respects/uses the EditorConfig settings, and am looking at applying that through the ESLint and Stylelint plugins |
This is complete, right? |
I think everything except HTML is covered aria-practices/.prettierignore Lines 8 to 9 in 3952625
Prettier tends to make some ugly formatting for HTML, so it's still excluded |
This project has an .editorconfig file. However, the rules aren't consistently applied, judging from #1370.
In order to avoid contributors making unrelated changes because their text editor apply the rules in the .editorconfig, I think it would be useful to enforce the rules with a linter. If a contributor uses a text editor that doesn't honor the .editorconfig rules, the lint check would fail and they would need to either manually fix it or change the settings in their editor.
The text was updated successfully, but these errors were encountered: