Add code-style command

- This patch adds a new command `code-style` that has the extra argument of --fix, which tries to fix, "fixable" linting rules and fixes them, for non-fixable rules it can be done manual, but a simple command to eliminate 80% linting issues is a handy tool in my eyes.

Note: just a personal thing as I run into linting issues more often in this project due to unfamiliarity with this type of code styling.
This commit is contained in:
Gusted 2021-04-30 13:06:41 +02:00
parent d736a00bc1
commit 8531fd35d7
No known key found for this signature in database
GPG Key ID: FD821B732837125F

View File

@ -28,6 +28,7 @@
},
"scripts": {
"lint": "eslint \"**/*.js\" --cache",
"code-style": "eslint \"**/*.js\" --fix --cache",
"test": "node tools/test.js && npm run lint",
"update-locales": "tx pull --all && node tools/fix-transifex.js",
"update-transifex": "tx push -s",