Skip to content

Commit f96f123

Browse files
committed
chore: add code format check on CI
1 parent ecd6b3d commit f96f123

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.circleci/config.yml

+15
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,20 @@ orbs:
55
node: circleci/[email protected] # used to publish new NPM version
66

77
jobs:
8+
unit:
9+
description: Checks the code formatting
10+
executor:
11+
name: node/default
12+
tag: '12'
13+
steps:
14+
- checkout
15+
- node/with-cache:
16+
steps:
17+
- run: npm ci
18+
- run: npm run format:check
19+
820
publish:
21+
description: Publishes the new version of the plugin to NPM
922
executor:
1023
name: node/default
1124
tag: '12'
@@ -19,6 +32,8 @@ jobs:
1932
workflows:
2033
build:
2134
jobs:
35+
- unit
36+
2237
- cypress/install:
2338
post-steps:
2439
- run: npm run check:markdown

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"report:coverage": "nyc report --reporter=html",
1414
"dev:no:coverage": "start-test 1234 'cypress open --env coverage=false'",
1515
"format": "prettier --write '*.js'",
16+
"format:check": "prettier --check '*.js'",
1617
"start:test:backend": "nyc --silent node test-backend",
1718
"cy:backend": "cypress open --config-file cypress-backend.json",
1819
"dev:backend": "start-test start:test:backend 3003 cy:backend",

0 commit comments

Comments
 (0)