Skip to content

Commit 48bf30d

Browse files
committed
format & lint in CI
1 parent b276f98 commit 48bf30d

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

.github/workflows/lint_and_build.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ jobs:
1616
uses: actions/setup-node@v3
1717
with:
1818
node-version: ${{ matrix.node-version }}
19-
- name: install requirements
19+
- name: Install Requirements
2020
run: yarn install
21-
- name: run linter
22-
run: yarn run eslint index.ts src/**/*.ts
23-
- name: Bulid
21+
- name: Lint
22+
run: yarn lint:check
23+
- name: Check Formatting
24+
run: yarn format:check
25+
- name: Build
2426
run: yarn build

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@
2323
"build-dev-copy": "webpack --mode development && cat ./dist/behaviors.js | pbcopy",
2424
"watch": "webpack watch --mode production",
2525
"watch-dev": "webpack watch --mode development",
26-
"lint": "eslint ./src/**/*.ts webpack.config.js"
26+
"lint": "eslint --fix index.ts ./src/**/*.ts webpack.config.js",
27+
"lint:check": "eslint index.ts ./src/**/*.ts webpack.config.js",
28+
"format": "prettier --write . webpack.config.js",
29+
"format:check": "prettier --check . webpack.config.js"
2730
},
2831
"description": "Browsertrix Behaviors",
2932
"files": [

0 commit comments

Comments
 (0)