Skip to content

Commit 3f4d9f4

Browse files
authored
Merge pull request #2 from longcipher/ci/add-js-ci
Add js ci
2 parents db01116 + a30630d commit 3f4d9f4

File tree

18 files changed

+2830
-107
lines changed

18 files changed

+2830
-107
lines changed

.github/workflows/js.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: JS Lint
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
branches:
8+
- master
9+
- main
10+
paths-ignore:
11+
- '**.md'
12+
pull_request:
13+
paths:
14+
- 'frontend/**'
15+
# Allows you to run this workflow manually from the Actions tab
16+
workflow_dispatch:
17+
18+
jobs:
19+
check_and_build:
20+
name: Check and Build
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
- name: mise
27+
uses: jdx/mise-action@v2
28+
- name: Change directory to frontend
29+
run: cd frontend
30+
- name: npm install
31+
run: npm install --no-audit
32+
working-directory: ./frontend
33+
- name: npm lint
34+
run: npm run lint --if-present
35+
working-directory: ./frontend
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Rust Check & Build
1+
name: Rust Lint
22

33
on:
44
push:
@@ -10,8 +10,8 @@ on:
1010
paths-ignore:
1111
- '**.md'
1212
pull_request:
13-
paths-ignore:
14-
- '**.md'
13+
paths:
14+
- 'src/**'
1515
# Allows you to run this workflow manually from the Actions tab
1616
workflow_dispatch:
1717

.mise.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[tools]
2+
node = '22'

frontend/.env

Whitespace-only changes.

frontend/.env.development

Lines changed: 0 additions & 1 deletion
This file was deleted.

frontend/.env.production

Lines changed: 0 additions & 1 deletion
This file was deleted.

frontend/.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@
2828
npm-debug.log*
2929
yarn-debug.log*
3030
yarn-error.log*
31+
.pnpm-debug.log*
3132

32-
# env files (can opt-in for commiting if needed)
33-
# .env*
33+
# env files (can opt-in for committing if needed)
34+
.env*
3435

3536
# vercel
3637
.vercel

frontend/README.md

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,21 @@
1-
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
1+
# Parallel EVM Explorer Frontend
22

3-
## Getting Started
3+
## Checks before push
44

5-
First, run the development server:
6-
7-
```bash
8-
npm run dev
9-
# or
10-
yarn dev
11-
# or
12-
pnpm dev
13-
# or
14-
bun dev
5+
```sh
6+
npm run format
7+
npm run lint
158
```
169

17-
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18-
19-
You can start editing the page by modifying `app/page.js`. The page auto-updates as you edit the file.
20-
21-
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
22-
23-
## Learn More
24-
25-
To learn more about Next.js, take a look at the following resources:
10+
## Run
2611

27-
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28-
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
12+
.env
2913

30-
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
31-
32-
## Deploy on Vercel
33-
34-
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
14+
```sh
15+
PARALLEL_EVM_EXPLORER_SERVER=http://<your-server-host>:<port>
16+
```
3517

36-
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
18+
```sh
19+
npm install
20+
npm run dev
21+
```

frontend/biome.json

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3+
"vcs": {
4+
"enabled": false,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"files": {
9+
"ignoreUnknown": false,
10+
"ignore": [".next", "node_modules", "src/static"]
11+
},
12+
"formatter": {
13+
"enabled": true,
14+
"indentStyle": "space",
15+
"indentWidth": 2,
16+
"formatWithErrors": true
17+
},
18+
"organizeImports": {
19+
"enabled": true
20+
},
21+
"linter": {
22+
"enabled": true,
23+
"rules": {
24+
"recommended": true,
25+
"a11y": {
26+
"noAriaHiddenOnFocusable": "off",
27+
"noAutofocus": "off",
28+
"noBlankTarget": "error",
29+
"noNoninteractiveElementToInteractiveRole": "off",
30+
"noNoninteractiveTabindex": "off",
31+
"noPositiveTabindex": "off",
32+
"noSvgWithoutTitle": "off",
33+
"useAltText": "off",
34+
"useButtonType": "off",
35+
"useHtmlLang": "off",
36+
"useIframeTitle": "off",
37+
"useKeyWithClickEvents": "off",
38+
"useKeyWithMouseEvents": "off",
39+
"useValidAnchor": "off"
40+
},
41+
"complexity": {
42+
"noBannedTypes": "off",
43+
"noExtraBooleanCast": "error",
44+
"noForEach": "off",
45+
"noStaticOnlyClass": "error",
46+
"noUselessCatch": "error",
47+
"noUselessConstructor": "error",
48+
"noUselessFragments": "off",
49+
"noUselessRename": "error",
50+
"noUselessSwitchCase": "error",
51+
"useArrowFunction": "error",
52+
"useLiteralKeys": "off",
53+
"useOptionalChain": "error"
54+
},
55+
"correctness": {
56+
"noConstantCondition": "error",
57+
"noEmptyPattern": "error",
58+
"noSwitchDeclarations": "error",
59+
"noUnreachable": "error",
60+
"noUnsafeOptionalChaining": "error",
61+
"useExhaustiveDependencies": "off"
62+
},
63+
"performance": {
64+
"noAccumulatingSpread": "off",
65+
"noDelete": "off"
66+
},
67+
"security": {
68+
"noDangerouslySetInnerHtml": "error"
69+
},
70+
"style": {
71+
"noCommaOperator": "error",
72+
"noNonNullAssertion": "off",
73+
"noParameterAssign": "off",
74+
"noUnusedTemplateLiteral": "error",
75+
"noUselessElse": "error",
76+
"useConst": "error",
77+
"useDefaultParameterLast": "off",
78+
"useSelfClosingElements": "error",
79+
"useSingleVarDeclarator": "error",
80+
"useTemplate": "error"
81+
},
82+
"suspicious": {
83+
"noArrayIndexKey": "off",
84+
"noAssignInExpressions": "error",
85+
"noAsyncPromiseExecutor": "error",
86+
"noConfusingVoidType": "off",
87+
"noControlCharactersInRegex": "error",
88+
"noDoubleEquals": "error",
89+
"noDuplicateJsxProps": "error",
90+
"noDuplicateObjectKeys": "error",
91+
"noEmptyInterface": "error",
92+
"noExplicitAny": "off",
93+
"noFallthroughSwitchClause": "error",
94+
"noGlobalIsNan": "error",
95+
"noImplicitAnyLet": "off",
96+
"noPrototypeBuiltins": "error",
97+
"noRedeclare": "error",
98+
"noRedundantUseStrict": "error",
99+
"noSelfCompare": "error",
100+
"noShadowRestrictedNames": "off",
101+
"useDefaultSwitchClauseLast": "error",
102+
"useValidTypeof": "error"
103+
}
104+
}
105+
},
106+
"javascript": {
107+
"formatter": {
108+
"quoteStyle": "double"
109+
}
110+
}
111+
}

0 commit comments

Comments
 (0)