Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add format check command and github action. #9

Merged
merged 2 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/format-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: format-check

# Controls when the workflow will run
on:
pull_request:
branches:
- master
- main

# Auto cancels previous running CI jobs in this PR on each new commit
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
format-check:
runs-on: ubuntu-latest-m
env:
NODE_VERSION: 19.x

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install dependencies
run: npm ci

- name: Format check
run: npm run format-check
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
"format": "dprint fmt && next lint --fix"
"format": "dprint fmt && next lint --fix",
"format-check": "dprint check && next lint"
},
"dependencies": {
"autoprefixer": "^10.4.7",
Expand Down
5 changes: 4 additions & 1 deletion pages/onboarding.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ const OnboardingSuccess = ({ handleSubmit }) => (
export default function Onboarding() {
const [isSubmitted, setIsSubmitted] = useState(false);
const [holderDID] = useLocalStorage('holderDID', process.env.NEXT_PUBLIC_HOLDER_DID);
const [recipientEmail] = useLocalStorage('recipientEmail', process.env.NEXT_PUBLIC_RECIPIENT_EMAIL);
const [recipientEmail] = useLocalStorage(
'recipientEmail',
process.env.NEXT_PUBLIC_RECIPIENT_EMAIL
);
const router = useRouter();

const handleFormSubmit = async (event) => {
Expand Down
Loading