Explorar o código

run prettier before eslint

Steven Silvester %!s(int64=5) %!d(string=hai) anos
pai
achega
4e3e3aeba2
Modificáronse 2 ficheiros con 3 adicións e 3 borrados
  1. 1 1
      lint-staged.config.js
  2. 2 2
      package.json

+ 1 - 1
lint-staged.config.js

@@ -19,8 +19,8 @@ module.exports = {
   '**/*{.ts,.tsx,.js,.jsx}': filenames => {
     const escapedFileNames = escapeFileNames(filenames);
     return [
-      `eslint --fix ${escapedFileNames}`,
       `prettier --write ${escapedFileNames}`,
+      `eslint --fix ${escapedFileNames}`,
       `git add ${escapedFileNames}`
     ];
   }

+ 2 - 2
package.json

@@ -60,8 +60,8 @@
     "lighthouse:compare": "node testutils/lib/compare-lighthouse.js",
     "lighthouse:throttling:start": "comcast --latency=40 --target-bw=30000 --packet-loss=0.2%",
     "lighthouse:throttling:stop": "comcast --stop",
-    "lint": "jlpm && jlpm run eslint && jlpm run prettier",
-    "lint:check": "jlpm run eslint:check && jlpm run prettier:check",
+    "lint": "jlpm && jlpm run prettier && jlpm run eslint",
+    "lint:check": "jlpm run prettier:check && jlpm run eslint:check",
     "patch:release": "node buildutils/lib/patch-release.js",
     "prepublish:check": "node buildutils/lib/prepublish-check.js",
     "prettier": "prettier --write \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\"",