-
Notifications
You must be signed in to change notification settings - Fork 8
Contribute
Dario Salvi edited this page Apr 8, 2022
·
1 revision
Linting and formatting, install:
Example configuration for VSCode:
{
"eslint.format.enable": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": ["source.fixAll.eslint"],
"eslint.validate": ["javascript"],
"editor.bracketPairColorization.enabled": true,
"editor.guides.bracketPairs":"active"
}
Other useful plugin:
General JS and CSS guidelines.
- Prefer camelCase, but use hyphens if that makes sense.
- Names of functions should start with a verb (get, calculate, schedule, ...).
- Try to keep function short and compose them.
- Avoid creating functions for everything, especially if the code is only used in one place.