Skip to content

Commit

Permalink
fix: properly check prettier in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfbecker committed Jan 11, 2019
1 parent f2f7744 commit aa7f798
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
include:
- stage: test
script:
- yarn run prettier
- yarn run prettier-check
- yarn run tslint
- yarn run build
- stage: release
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"tsconfig-schema": "download http://json.schemastore.org/tsconfig | json2ts | prettier --parser typescript > src/tsconfig.ts",
"tslint-schema": "download http://json.schemastore.org/tslint | json2ts | prettier --parser typescript > src/tslint.ts",
"prettier": "prettier '**/{*.{js?(on),ts?(x),scss},.*.js?(on)}' --write --list-different",
"prettier-check": "npm run prettier -- --write=false",
"commitmsg": "commitlint -e $GIT_PARAMS",
"semantic-release": "semantic-release"
},
Expand Down
1 change: 1 addition & 0 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ async function main(): Promise<void> {
commitmsg: 'commitlint -e $GIT_PARAMS',
'semantic-release': 'semantic-release',
prettier: "prettier '**/{*.{js?(on),ts?(x),scss},.*.js?(on)}' --write --list-different",
'prettier-check': 'npm run prettier -- --write=false',
tslint: "tslint -c tslint.json -p tsconfig.json './src/*.ts?(x)' './*.ts?(x)'",
build: 'tsc -p .',
watch: 'tsc -p . -w',
Expand Down
2 changes: 1 addition & 1 deletion src/travis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export async function initTravis({
{
stage: 'test',
script: [
'yarn run prettier',
'yarn run prettier-check',
'yarn run tslint',
'yarn run build',
...(hasTests
Expand Down

0 comments on commit aa7f798

Please sign in to comment.