Update to resin-lint 2 and add a precommit hook for prettier

Change-type: patch
This commit is contained in:
Pagan Gazzard 2018-11-02 14:16:02 +00:00
parent d6e9283a15
commit 21738f8fe3
2 changed files with 16 additions and 1 deletions

10
.lintstagedrc Normal file
View File

@ -0,0 +1,10 @@
{
"*.coffee": [
"resin-lint"
],
"*.ts": [
"prettier --config ./node_modules/resin-lint/config/.prettierrc --write",
"resin-lint --typescript --no-prettier",
"git add"
],
}

View File

@ -10,6 +10,8 @@
"scripts": {
"start": "./entry.sh",
"build": "webpack",
"precommit": "lint-staged",
"prettify": "prettier --config ./node_modules/resin-lint/config/.prettierrc --write \"{src,test,typings}/**/*.ts\"",
"lint:coffee": "resin-lint src/ test/",
"lint:typescript": "resin-lint --typescript src/ test/ typings/ && tsc --noEmit",
"lint": "npm run lint:coffee && npm run lint:typescript",
@ -54,9 +56,11 @@
"duration-js": "^4.0.0",
"event-stream": "^3.0.20",
"express": "^4.0.0",
"husky": "^1.1.3",
"istanbul": "^0.4.5",
"json-mask": "^0.3.8",
"knex": "~0.12.3",
"lint-staged": "^8.0.4",
"lockfile": "^1.0.1",
"lodash": "^4.16.3",
"log-timestamp": "^0.1.2",
@ -70,9 +74,10 @@
"node-loader": "^0.6.0",
"null-loader": "^0.1.1",
"pinejs-client": "^2.4.0",
"prettier": "^1.14.3",
"register-coffee-coverage": "0.0.1",
"request": "^2.51.0",
"resin-lint": "^1.5.7",
"resin-lint": "^2.0.1",
"resin-register-device": "^3.0.0",
"resin-sync": "^9.3.0",
"resumable-request": "^2.0.0",