Skip to content

Commit 01a6918

Browse files
authored
ci: add format check on CI (#12)
1 parent 0f7b6b1 commit 01a6918

4 files changed

Lines changed: 7 additions & 4 deletions

File tree

.github/workflows/unit-test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,7 @@ jobs:
3838
name: Install dev dependencies
3939
- run: npm run lint
4040
name: Run linter
41+
- run: npm run format:check
42+
name: Run Prettier check
4143
- run: npm run test
4244
name: Run unit tests

lib/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,4 +307,4 @@ export interface DeviceInfo {
307307
/** The visibility class
308308
* @example "default" */
309309
visibilityClass: string;
310-
}
310+
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@
4444
"clean": "npm run build -- --clean",
4545
"rebuild": "npm run clean; npm run build",
4646
"dev": "npm run build -- --watch",
47-
"format": "prettier -w ./lib",
4847
"lint": "eslint .",
4948
"lint:fix": "npm run lint -- --fix",
49+
"format": "prettier -w ./lib ./test",
50+
"format:check": "prettier --check ./lib ./test",
5051
"prepare": "npm run build",
5152
"test": "mocha --exit --timeout 1m \"./test/unit/**/*-specs.*js\"",
5253
"e2e-test": "mocha --exit --timeout 5m \"./test/e2e/**/*-specs.js\""

test/unit/devicectl-specs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { expect } from 'chai';
2-
import { Devicectl } from '../../lib/devicectl';
1+
import {expect} from 'chai';
2+
import {Devicectl} from '../../lib/devicectl';
33

44
describe('Devicectl', function () {
55
let devicectl: Devicectl;

0 commit comments

Comments
 (0)