-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
Mostly in an effort to stop myself from committing things missing semi's (I work on a lot of no semi projects, heh) I think it might be advantageous to set up linting.
There are already a bunch of different styles being used throughout the code but this is mostly auto-fixable using modern tooling. My suggestion:
- add
eslintdev dep - add
eslint-config-airbnb-basepreset dev dep - add .eslintrc for custom rule negotiation
- add npm script to run linting
This would configure linting to the Airbnb style guide, which is very common (especially among front end packages), and can be read here: https://github.com/airbnb/javascript
Advantages:
- Airbnb style rules have very specific reasonings to back them that are based around clarity and bug avoidance
- Most of the style guidelines already fit well into the current project
- We can easily turn off the rules that we don't need and can re-implement them one at a time til compliance.
- Easier for new contributors to adopt a common style (with even simple things like tabs vs spaces, etc)
- Increases general perceived code quality with more consistency
After we have all rules implemented/agreed on over some time, we could then also:
- have the linting npm script autofix
- implement a git hook or CI step and reject on unlintable styles.
Thoughts?
Reactions are currently unavailable