-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow for running checks on pushes and PRs (#184)
* Switch to eslint v8 for compatibility with Next - Downgrade eslint version to be compatible with eslint-config-next - Move eslint from root to individual packages - Move some site dependencies to devDependencies * Add workflow for running checks on pushes and PRs - Add Actions workflow for running checks, adapted from irvinehacks-site - Upgrade pnpm version specified in `packageManager` to match lockfile * Resolve ESLint issues in `FAQ.tsx`
- Loading branch information
Showing
6 changed files
with
270 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Run Checks | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
check-site: | ||
name: Check Site | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up pnpm | ||
uses: pnpm/action-setup@v4 | ||
# pnpm version will be determined by `packageManager` in `package.json` | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: "pnpm" | ||
|
||
- name: Install frontend dependencies | ||
run: pnpm install | ||
|
||
- name: Format with Prettier | ||
uses: EPMatt/reviewdog-action-prettier@v1 | ||
with: | ||
# cannot use workdir since action would look in package root, not workspace for `.bin/prettier` | ||
level: warning | ||
reporter: github-pr-review | ||
prettier_flags: apps/site/src | ||
|
||
- name: Lint with ESLint (review) | ||
uses: reviewdog/action-eslint@v1 | ||
if: github.event_name == 'pull_request' | ||
with: | ||
workdir: apps/site | ||
level: error | ||
reporter: github-pr-review | ||
eslint_flags: src | ||
|
||
- name: Lint with ESLint (check) | ||
uses: reviewdog/action-eslint@v1 | ||
if: github.event_name == 'push' | ||
with: | ||
workdir: apps/site | ||
level: error | ||
reporter: github-check | ||
eslint_flags: src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,16 +32,14 @@ const FAQ = async () => { | |
> | ||
<span className={styles["faq-header"] + " h4"}> | ||
<h2 className="visually-hidden">FAQ</h2> | ||
<span className={styles["light-blue-text"]}>FAQ!</span> Here's | ||
<span className={styles["light-blue-text"]}>FAQ!</span> Here's | ||
answers to our most commonly asked questions! | ||
</span> | ||
|
||
<p> | ||
If you don't find what you're looking for, reach out to our team at{" "} | ||
<a | ||
className={styles["purple-text"]} | ||
href="mailto:[email protected]" | ||
> | ||
If you don't find what you're looking for, reach out to | ||
our team at{" "} | ||
<a className={styles["purple-text"]} href="mailto:[email protected]"> | ||
[email protected] | ||
</a> | ||
</p> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.