From 8531fd35d7c27d6bef61dd2c9b678c7966ae96c5 Mon Sep 17 00:00:00 2001 From: Gusted Date: Fri, 30 Apr 2021 13:06:41 +0200 Subject: [PATCH] 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. --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 0aa5507c..c7af96cb 100644 --- a/package.json +++ b/package.json @@ -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",