Explorar el Código

Adding some new scripts for check and fix

Kirk Trombley hace 4 años
padre
commit
f7a371625a
Se han modificado 2 ficheros con 6 adiciones y 3 borrados
  1. 1 1
      .drone.yml
  2. 5 2
      client/package.json

+ 1 - 1
.drone.yml

@@ -11,7 +11,7 @@ steps:
   commands:
   - cd client
   - yarn install
-  - yarn lint
+  - yarn check
   - yarn test:ci
   - yarn build
   - mv build/* /build/

+ 5 - 2
client/package.json

@@ -18,12 +18,15 @@
   "scripts": {
     "start": "react-scripts start",
     "build": "react-scripts build",
-    "format": "prettier --write src/",
+    "format": "prettier --check src/",
+    "format:fix": "prettier --write src/",
     "lint": "eslint --report-unused-disable-directives 'src/**/*.js{,x}'",
     "lint:fix": "yarn lint --fix",
-    "fix": "yarn format && yarn lint:fix",
+    "check": "yarn format && yarn lint",
+    "fix": "yarn format:fix && yarn lint:fix",
     "test": "react-scripts test",
     "test:ci": "CI=true yarn test",
+    "test:u": "yarn test -u --watchAll=false",
     "test:cov": "yarn test --coverage --watchAll=false",
     "eject": "react-scripts eject",
     "deploy": "scp -r build hiram:/opt/terrassumptions/srv/build-$(date +'%Y-%m-%dT%H:%M:%S')"