From 97796e9d222ca9bd6882b0708ac57eae8f452802 Mon Sep 17 00:00:00 2001 From: posidron <1614333+posidron@users.noreply.github.com> Date: Tue, 18 Sep 2018 04:03:43 +0200 Subject: [PATCH] Add lint-staged --- package.json | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 57f2b10..1575f6e 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,8 @@ "keywords": [ "fuzzing", "browser", + "firefox", + "random", "javascript", "node", "library" @@ -21,16 +23,22 @@ "author": "Christoph Diehl ", "license": "MPL-2.0", "scripts": { + "build": "parcel build index.js --out-file=octo.js --no-source-maps", "test": "jest --silent", "coverage": "cross-env NODE_ENV=test jest --silent --coverage --collectCoverageFrom=lib/**/*.js", "coveralls": "yarn coverage && cat ./coverage/lcov.info | coveralls", - "lint": "cross-env NODE_ENV=test standard --verbose", - "lint:fix": "cross-env NODE_ENV=test standard --fix --verbose", + "lint": "standard --verbose", + "lint:fix": "standard --fix --verbose", "docs": "esdoc", - "build": "parcel build index.js --out-file=octo.js --no-source-maps", - "prepush": "yarn lint", + "pre-commit": "lint-staged", "release": "np" }, + "lint-staged": { + "*.js": [ + "yarn lint:fix", + "git add" + ] + }, "standard": { "ignore": [ "dist/" @@ -70,8 +78,9 @@ "esdoc": "^1.1.0", "esdoc-node": "^1.0.3", "esdoc-standard-plugin": "^1.0.0", - "husky": "^0.14.3", + "husky": "^1.0.0-rc.14", "jest": "^23.6.0", + "lint-staged": "^7.2.2", "np": "^3.0.4", "parcel-bundler": "^1.9.7", "standard": "^12.0.1"