Add lint-staged

This commit is contained in:
posidron 2018-09-18 04:03:43 +02:00
parent d5b2440b6d
commit 97796e9d22
No known key found for this signature in database
GPG key ID: 799CE5B68FEF404A

View file

@ -5,6 +5,8 @@
"keywords": [ "keywords": [
"fuzzing", "fuzzing",
"browser", "browser",
"firefox",
"random",
"javascript", "javascript",
"node", "node",
"library" "library"
@ -21,16 +23,22 @@
"author": "Christoph Diehl <cdiehl@mozilla.com>", "author": "Christoph Diehl <cdiehl@mozilla.com>",
"license": "MPL-2.0", "license": "MPL-2.0",
"scripts": { "scripts": {
"build": "parcel build index.js --out-file=octo.js --no-source-maps",
"test": "jest --silent", "test": "jest --silent",
"coverage": "cross-env NODE_ENV=test jest --silent --coverage --collectCoverageFrom=lib/**/*.js", "coverage": "cross-env NODE_ENV=test jest --silent --coverage --collectCoverageFrom=lib/**/*.js",
"coveralls": "yarn coverage && cat ./coverage/lcov.info | coveralls", "coveralls": "yarn coverage && cat ./coverage/lcov.info | coveralls",
"lint": "cross-env NODE_ENV=test standard --verbose", "lint": "standard --verbose",
"lint:fix": "cross-env NODE_ENV=test standard --fix --verbose", "lint:fix": "standard --fix --verbose",
"docs": "esdoc", "docs": "esdoc",
"build": "parcel build index.js --out-file=octo.js --no-source-maps", "pre-commit": "lint-staged",
"prepush": "yarn lint",
"release": "np" "release": "np"
}, },
"lint-staged": {
"*.js": [
"yarn lint:fix",
"git add"
]
},
"standard": { "standard": {
"ignore": [ "ignore": [
"dist/" "dist/"
@ -70,8 +78,9 @@
"esdoc": "^1.1.0", "esdoc": "^1.1.0",
"esdoc-node": "^1.0.3", "esdoc-node": "^1.0.3",
"esdoc-standard-plugin": "^1.0.0", "esdoc-standard-plugin": "^1.0.0",
"husky": "^0.14.3", "husky": "^1.0.0-rc.14",
"jest": "^23.6.0", "jest": "^23.6.0",
"lint-staged": "^7.2.2",
"np": "^3.0.4", "np": "^3.0.4",
"parcel-bundler": "^1.9.7", "parcel-bundler": "^1.9.7",
"standard": "^12.0.1" "standard": "^12.0.1"