Ensure CI fails on non-prettier compliant PRs (#693)

This commit is contained in:
James Prado 2018-01-01 18:51:18 -05:00 committed by Daniel Ternyak
parent ef506c54d6
commit 23e99e56e1
3 changed files with 7 additions and 3 deletions

View File

@ -4,6 +4,5 @@
"useTabs": false, "useTabs": false,
"semi": true, "semi": true,
"tabWidth": 2, "tabWidth": 2,
"trailingComma": "trailingComma": "none"
"none"
} }

View File

@ -20,6 +20,8 @@ install:
jobs: jobs:
include: include:
- stage: test
script: npm run prettier:diff
- stage: test - stage: test
script: npm run test script: npm run test
- stage: test - stage: test

View File

@ -141,7 +141,10 @@
"tscheck": "tsc --noEmit", "tscheck": "tsc --noEmit",
"start": "npm run dev", "start": "npm run dev",
"precommit": "lint-staged", "precommit": "lint-staged",
"formatAll": "find ./common/ -name '*.ts*' | xargs prettier --write --config ./.prettierrc --config-precedence file-override", "formatAll":
"find ./common/ -name '*.ts*' | xargs prettier --write --config ./.prettierrc --config-precedence file-override",
"prettier:diff":
"prettier --write --config ./.prettierrc --list-different \"common/**/*.ts\" \"common/**/*.tsx\"",
"prepush": "npm run tslint && npm run tscheck" "prepush": "npm run tslint && npm run tscheck"
}, },
"lint-staged": { "lint-staged": {