Skip to content

Commit aa7f798

Browse files
committed
fix: properly check prettier in CI
1 parent f2f7744 commit aa7f798

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
include:
1111
- stage: test
1212
script:
13-
- yarn run prettier
13+
- yarn run prettier-check
1414
- yarn run tslint
1515
- yarn run build
1616
- stage: release

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"tsconfig-schema": "download http://json.schemastore.org/tsconfig | json2ts | prettier --parser typescript > src/tsconfig.ts",
3131
"tslint-schema": "download http://json.schemastore.org/tslint | json2ts | prettier --parser typescript > src/tslint.ts",
3232
"prettier": "prettier '**/{*.{js?(on),ts?(x),scss},.*.js?(on)}' --write --list-different",
33+
"prettier-check": "npm run prettier -- --write=false",
3334
"commitmsg": "commitlint -e $GIT_PARAMS",
3435
"semantic-release": "semantic-release"
3536
},

src/cli.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ async function main(): Promise<void> {
238238
commitmsg: 'commitlint -e $GIT_PARAMS',
239239
'semantic-release': 'semantic-release',
240240
prettier: "prettier '**/{*.{js?(on),ts?(x),scss},.*.js?(on)}' --write --list-different",
241+
'prettier-check': 'npm run prettier -- --write=false',
241242
tslint: "tslint -c tslint.json -p tsconfig.json './src/*.ts?(x)' './*.ts?(x)'",
242243
build: 'tsc -p .',
243244
watch: 'tsc -p . -w',

src/travis.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export async function initTravis({
8282
{
8383
stage: 'test',
8484
script: [
85-
'yarn run prettier',
85+
'yarn run prettier-check',
8686
'yarn run tslint',
8787
'yarn run build',
8888
...(hasTests

0 commit comments

Comments
 (0)