Skip to content
This repository was archived by the owner on Dec 24, 2024. It is now read-only.

Commit dc1a6e7

Browse files
committed
ci: lintとprettierを修正
1 parent db8187a commit dc1a6e7

File tree

2 files changed

+21
-27
lines changed

2 files changed

+21
-27
lines changed

Diff for: .github/workflows/format.yaml

-20
This file was deleted.

Diff for: .github/workflows/lint.yaml

+21-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
name: Lint
1+
name: Prettier & ESLint
22

33
on:
4-
pull_request
5-
6-
permissions:
7-
checks: write
8-
contents: write
4+
# Trigger the workflow on push or pull request,
5+
# but only for the main branch
6+
push:
7+
branches:
8+
- main
9+
pull_request:
10+
branches:
11+
- main
912

1013
jobs:
1114
run-linters:
@@ -14,9 +17,20 @@ jobs:
1417

1518
steps:
1619
- name: Check out Git repository
17-
uses: actions/checkout@v2
20+
uses: actions/checkout@v3
21+
22+
- name: Set up Node.js
23+
uses: actions/setup-node@v1
24+
with:
25+
node-version: 21
26+
27+
# ESLint and Prettier must be in `package.json`
28+
- name: Install Node.js dependencies
29+
run: yarn install
1830

1931
- name: Run linters
2032
uses: wearerequired/lint-action@v2
2133
with:
2234
eslint: true
35+
prettier: true
36+
eslint_args: --ext .ts,.tsx ./src

0 commit comments

Comments
 (0)