Skip to content

Commit c2346b2

Browse files
authored
Fix BiomeJS workflow by explict definition (#660)
1 parent e72d9e0 commit c2346b2

19 files changed

Lines changed: 777 additions & 760 deletions

.github/workflows/lint.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@ on:
99
- react-rewrite
1010

1111
jobs:
12-
Analyze:
12+
Check:
1313
runs-on: ubuntu-24.04
1414

15+
defaults:
16+
run:
17+
working-directory: react
18+
1519
steps:
1620
- name: Checkout Repository
1721
uses: actions/checkout@v4
@@ -25,6 +29,6 @@ jobs:
2529
uses: biomejs/setup-biome@v2
2630

2731
- name: Run Biome
28-
run: biome ci --error-on-warnings --formatter-enabled=false --assist-enabled=false --enforce-assist=false --css-linter-enabled=false react/src
32+
run: biome ci --error-on-warnings --formatter-enabled=false --assist-enabled=false --enforce-assist=false --css-linter-enabled=false src
2933

3034

lefthook.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ pre-commit:
22
commands:
33
check:
44
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
5-
run: npx --yes @biomejs/biome check --write --error-on-warnings --no-errors-on-unmatched --colors=off {staged_files}
5+
run: npx --yes @biomejs/biome check --write --error-on-warnings --colors=off {staged_files}
66
stage_fixed: true
77
rustywind:
88
glob: "*.{js,ts,jsx,tsx}"

react/biome.json

Lines changed: 64 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,66 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.0.0/schema.json",
3-
"files": {
4-
"ignoreUnknown": true,
5-
"includes": [
6-
"**",
7-
"!**/node_modules/",
8-
"!**/.vscode",
9-
"!**/.idea",
10-
"!**/public/",
11-
"!**/dist",
12-
"!**/package-lock.json"
13-
]
14-
},
15-
"formatter": {
16-
"enabled": true,
17-
"indentStyle": "space",
18-
"indentWidth": 2,
19-
"lineEnding": "lf",
20-
"lineWidth": 80,
21-
"attributePosition": "auto"
22-
},
23-
"linter": {
24-
"enabled": true,
25-
"rules": {
26-
"recommended": true
27-
}
28-
},
29-
"assist": { "actions": { "source": { "organizeImports": "on" } } },
30-
"json": {
31-
"parser": {
32-
"allowComments": true
33-
}
34-
},
35-
"css": {
36-
"parser": {
37-
"cssModules": true
38-
}
39-
},
40-
"overrides": [
41-
{
42-
"includes": ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
43-
"linter": {
44-
"rules": {
45-
"recommended": true
46-
}
47-
},
48-
"formatter": {
49-
"enabled": true
50-
},
51-
"assist": { "actions": { "source": { "organizeImports": "on" } } }
52-
}
53-
]
2+
"$schema": "https://biomejs.dev/schemas/2.0.0/schema.json",
3+
"files": {
4+
"ignoreUnknown": true,
5+
"includes": [
6+
"**",
7+
"!**/node_modules/",
8+
"!**/.vscode",
9+
"!**/.idea",
10+
"!**/public/",
11+
"!**/dist",
12+
"!**/package-lock.json"
13+
]
14+
},
15+
"formatter": {
16+
"enabled": true,
17+
"indentStyle": "space",
18+
"indentWidth": 2,
19+
"lineEnding": "lf",
20+
"lineWidth": 80,
21+
"attributePosition": "auto"
22+
},
23+
"linter": {
24+
"enabled": true,
25+
"rules": {
26+
"recommended": true,
27+
"style": {
28+
"noParameterAssign": "error",
29+
"useAsConstAssertion": "error",
30+
"useDefaultParameterLast": "error",
31+
"useEnumInitializers": "error",
32+
"useSelfClosingElements": "error",
33+
"useSingleVarDeclarator": "error",
34+
"noUnusedTemplateLiteral": "error",
35+
"useNumberNamespace": "error",
36+
"noInferrableTypes": "error",
37+
"noUselessElse": "error"
38+
}
39+
}
40+
},
41+
"assist": { "actions": { "source": { "organizeImports": "on" } } },
42+
"json": {
43+
"parser": {
44+
"allowComments": true
45+
}
46+
},
47+
"css": {
48+
"parser": {
49+
"cssModules": true
50+
}
51+
},
52+
"overrides": [
53+
{
54+
"includes": ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
55+
"linter": {
56+
"rules": {
57+
"recommended": true
58+
}
59+
},
60+
"formatter": {
61+
"enabled": true
62+
},
63+
"assist": { "actions": { "source": { "organizeImports": "on" } } }
64+
}
65+
]
5466
}

react/components.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
{
2-
"$schema": "https://ui.shadcn.com/schema.json",
3-
"style": "new-york",
4-
"rsc": false,
5-
"tsx": true,
6-
"tailwind": {
7-
"config": "",
8-
"css": "src/index.css",
9-
"baseColor": "zinc",
10-
"cssVariables": true,
11-
"prefix": ""
12-
},
13-
"aliases": {
14-
"components": "@/components",
15-
"utils": "@/lib/utils",
16-
"ui": "@/components/ui",
17-
"lib": "@/lib",
18-
"hooks": "@/hooks"
19-
},
20-
"iconLibrary": "lucide"
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "new-york",
4+
"rsc": false,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "",
8+
"css": "src/index.css",
9+
"baseColor": "zinc",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"aliases": {
14+
"components": "@/components",
15+
"utils": "@/lib/utils",
16+
"ui": "@/components/ui",
17+
"lib": "@/lib",
18+
"hooks": "@/hooks"
19+
},
20+
"iconLibrary": "lucide"
2121
}

react/package.json

Lines changed: 45 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,47 @@
11
{
2-
"name": "ucmacm-website",
3-
"private": true,
4-
"version": "0.0.0",
5-
"type": "module",
6-
"scripts": {
7-
"dev": "vite",
8-
"build": "tsc && vite build",
9-
"preview": "vite preview",
10-
"check": "biome check --write --error-on-warnings --no-errors-on-unmatched .",
11-
"postinstall": "lefthook install"
12-
},
13-
"dependencies": {
14-
"@radix-ui/react-dialog": "^1.1.14",
15-
"@radix-ui/react-dropdown-menu": "^2.1.15",
16-
"@radix-ui/react-navigation-menu": "^1.2.13",
17-
"@radix-ui/react-slot": "^1.2.1",
18-
"class-variance-authority": "^0.7.1",
19-
"clsx": "^2.1.1",
20-
"framer-motion": "^12.18.1",
21-
"lucide-react": "^0.515.0",
22-
"react": "^19.1.0",
23-
"react-dom": "^19.1.0",
24-
"react-router": "^7.6.2",
25-
"react-scan": "^0.3.4",
26-
"supertokens-auth-react": "^0.49.1",
27-
"tailwind-merge": "^3.3.1",
28-
"tailwindcss-animate": "^1.0.7"
29-
},
30-
"devDependencies": {
31-
"@biomejs/biome": "2.0.0",
32-
"@tailwindcss/vite": "^4.1.10",
33-
"@types/node": "^24.0.2",
34-
"@types/react": "^19.1.8",
35-
"@types/react-dom": "^19.1.6",
36-
"@vitejs/plugin-react-swc": "^3.10.2",
37-
"lefthook": "^1.11.14",
38-
"rustywind": "^0.24.0",
39-
"tailwindcss": "^4.1.5",
40-
"typescript": "^5.8.3",
41-
"vite": "^6.3.5"
42-
},
43-
"volta": {
44-
"node": "22.16.0"
45-
}
2+
"name": "ucmacm-website",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "tsc && vite build",
9+
"preview": "vite preview",
10+
"check": "biome check --write --error-on-warnings .",
11+
"ci": "biome ci",
12+
"postinstall": "lefthook install"
13+
},
14+
"dependencies": {
15+
"@radix-ui/react-dialog": "^1.1.14",
16+
"@radix-ui/react-dropdown-menu": "^2.1.15",
17+
"@radix-ui/react-navigation-menu": "^1.2.13",
18+
"@radix-ui/react-slot": "^1.2.1",
19+
"class-variance-authority": "^0.7.1",
20+
"clsx": "^2.1.1",
21+
"framer-motion": "^12.18.1",
22+
"lucide-react": "^0.515.0",
23+
"react": "^19.1.0",
24+
"react-dom": "^19.1.0",
25+
"react-router": "^7.6.2",
26+
"react-scan": "^0.3.4",
27+
"supertokens-auth-react": "^0.49.1",
28+
"tailwind-merge": "^3.3.1",
29+
"tailwindcss-animate": "^1.0.7"
30+
},
31+
"devDependencies": {
32+
"@biomejs/biome": "2.0.0",
33+
"@tailwindcss/vite": "^4.1.10",
34+
"@types/node": "^24.0.2",
35+
"@types/react": "^19.1.8",
36+
"@types/react-dom": "^19.1.6",
37+
"@vitejs/plugin-react-swc": "^3.10.2",
38+
"lefthook": "^1.11.14",
39+
"rustywind": "^0.24.0",
40+
"tailwindcss": "^4.1.5",
41+
"typescript": "^5.8.3",
42+
"vite": "^6.3.5"
43+
},
44+
"volta": {
45+
"node": "22.16.0"
46+
}
4647
}

react/src/App.tsx

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
1-
import { Index } from "@/routes/index";
2-
import { Route, Routes } from "react-router";
31
import * as reactRouterDom from "react-router";
2+
import { Route, Routes } from "react-router";
43
import SuperTokens, { SuperTokensWrapper } from "supertokens-auth-react";
54
import EmailPassword from "supertokens-auth-react/recipe/emailpassword";
65
import { EmailPasswordPreBuiltUI } from "supertokens-auth-react/recipe/emailpassword/prebuiltui";
76
import Session from "supertokens-auth-react/recipe/session";
87
import ThirdParty from "supertokens-auth-react/recipe/thirdparty";
98
import { ThirdPartyPreBuiltUI } from "supertokens-auth-react/recipe/thirdparty/prebuiltui";
109
import { getSuperTokensRoutesForReactRouterDom } from "supertokens-auth-react/ui";
10+
import { Index } from "@/routes/index";
1111

1212
function App() {
13-
SuperTokens.init({
14-
appInfo: {
15-
appName: "ucmacm-website",
16-
apiDomain: import.meta.env.VITE_API_DOMAIN,
17-
websiteDomain: import.meta.env.VITE_WEBSITE_DOMAIN,
18-
apiBasePath: "/auth",
19-
websiteBasePath: "/auth",
20-
},
21-
recipeList: [
22-
EmailPassword.init(),
23-
ThirdParty.init({
24-
signInAndUpFeature: {
25-
providers: [ThirdParty.Google.init()],
26-
},
27-
}),
28-
Session.init(),
29-
],
30-
});
13+
SuperTokens.init({
14+
appInfo: {
15+
appName: "ucmacm-website",
16+
apiDomain: import.meta.env.VITE_API_DOMAIN,
17+
websiteDomain: import.meta.env.VITE_WEBSITE_DOMAIN,
18+
apiBasePath: "/auth",
19+
websiteBasePath: "/auth",
20+
},
21+
recipeList: [
22+
EmailPassword.init(),
23+
ThirdParty.init({
24+
signInAndUpFeature: {
25+
providers: [ThirdParty.Google.init()],
26+
},
27+
}),
28+
Session.init(),
29+
],
30+
});
3131

32-
return (
33-
<>
34-
<SuperTokensWrapper>
35-
<Routes>
36-
{getSuperTokensRoutesForReactRouterDom(reactRouterDom, [
37-
ThirdPartyPreBuiltUI,
38-
EmailPasswordPreBuiltUI,
39-
])}
40-
<Route path="/" element={<Index />} />
41-
</Routes>
42-
</SuperTokensWrapper>
43-
</>
44-
);
32+
return (
33+
<>
34+
<SuperTokensWrapper>
35+
<Routes>
36+
{getSuperTokensRoutesForReactRouterDom(reactRouterDom, [
37+
ThirdPartyPreBuiltUI,
38+
EmailPasswordPreBuiltUI,
39+
])}
40+
<Route path="/" element={<Index />} />
41+
</Routes>
42+
</SuperTokensWrapper>
43+
</>
44+
);
4545
}
4646

4747
export default App;

0 commit comments

Comments
 (0)