ソースを参照

Properly run lint scripts and prefer yarn > npm

Andrew Swistak 6 年 前
コミット
a885ef4278
1 ファイル変更5 行追加5 行削除
  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"