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

Enforce consistent code style #842

Open
OmTheTurtle opened this issue Aug 31, 2021 · 0 comments
Open

Enforce consistent code style #842

OmTheTurtle opened this issue Aug 31, 2021 · 0 comments
Labels
good first issue Good for newcomers low priority No hurry, this can wait.

Comments

@OmTheTurtle
Copy link
Member

OmTheTurtle commented Aug 31, 2021

After #835 is merged, it'd be nice to enforce the code style so all our JS / TS code will look and read the same. For this we can use a pre-commit hook with husky and lint-staged so eslint / prettier would run before every commit.
Example package.json config:

	"husky": {
		"hooks": {
			"pre-commit": "lint-staged"
		}
	},
	"lint-staged": {
		"*.{ts,js,json,yml,md}": "prettier --write",
		"*.{ts,js}": "eslint --fix"
	},
@OmTheTurtle OmTheTurtle added good first issue Good for newcomers low priority No hurry, this can wait. labels Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers low priority No hurry, this can wait.
Projects
None yet
Development

No branches or pull requests

1 participant