Quellcode durchsuchen

Properly run lint scripts and prefer yarn > npm

Andrew Swistak vor 6 Jahren
Ursprung
Commit
a885ef4278
1 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen
  1. 5 5
      package.json

+ 5 - 5
package.json

@@ -2,11 +2,11 @@
   "name": "pokemon_trade",
   "private": true,
   "scripts": {
-    "coverage": "npm test -- --coverage",
-    "lint": "npx eslint app/javascript/packs",
-    "prettier": "npx prettier app/javascript/packs/**/* --write",
-    "eslint": "npx eslint app/javascript/packs --fix",
-    "lint:fix": "npm run prettier && npm run eslint",
+    "coverage": "yarn test -- --coverage",
+    "eslint:fix": "yarn eslint app/javascript/packs spec/javascript --ext js,jsx --fix",
+    "lint": "yarn eslint app/javascript/packs spec/javascript --ext js,jsx",
+    "lint:fix": "yarn prettier:fix && yarn eslint:fix",
+    "prettier:fix": "yarn prettier \"app/javascript/**/*.js{,x}\" \"spec/javascript\" \".prettierrc.js\" \".eslintrc.js\" --write",
     "test": "jest --verbose false",
     "test:update_snapshots": "jest --updateSnapshot",
     "test:watch": "jest --watchAll"