package: configure tslint and prettier, add test:lint script

This commit is contained in:
Jason Dreyzehner 2018-02-15 13:22:52 -05:00
parent f1021e0f4e
commit f9b94e3127
2 changed files with 6 additions and 11 deletions

View File

@ -33,13 +33,13 @@
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve",
"watch": "ng test --browsers=Chrome",
"test": "npm run test:prettier && npm run test:ci && npm run e2e:capture-latest && npm run test:visual",
"test": "test:lint && npm run test:ci && npm run e2e:capture-latest && npm run test:visual",
"test:coverage": "ng test --code-coverage",
"test:ci": "ng test --watch=false --code-coverage --no-progress",
"test:prettier": "prettier --list-different 'src/**/*.ts'",
"test:lint": "tslint --project . src/**/*.ts && prettier --list-different --ignore-path .gitignore '{!(package),**/*}.{js,ts,md,json}'",
"test:visual": "cd test && reg-cli latest approved diffs --report report.html --json report.json --enableAntialias --thresholdRate 0.005",
"fix:prettier": "prettier 'src/**/*.ts' --write",
"fix:tslint": "tslint --fix --project . src/**/*.ts",
"fix:prettier": "prettier --write --ignore-path .gitignore '{!(package),**/*}.{js,ts,md,json}'",
"e2e": "npm run ionic:build && npm run e2e:test",
"e2e:test": "protractor",
"e2e:capture-latest": "npm run apply:copay && npm run e2e && npm run apply:bitpay && npm run e2e",

View File

@ -1,11 +1,6 @@
{
"extends": ["tslint:latest", "tslint-config-prettier"],
"rules": {
"no-duplicate-variable": true,
"no-unused-variable": [
true
]
},
"rulesDirectory": [
"node_modules/tslint-eslint-rules/dist/rules"
]
"interface-name": [true, "never-prefix"]
}
}