Skip to content

Commit e5d894d

Browse files
ci: add CI workflow (#2)
1 parent 66e7c5f commit e5d894d

File tree

45 files changed

+1869
-959
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1869
-959
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
ci:
14+
uses: heliannuuthus/hephaestus/.github/workflows/ci-frontend.yml@main

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
auto-install-peers=true
2+
strict-peer-dependencies=false

eslint.config.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import js from "@eslint/js";
2+
import tseslint from "typescript-eslint";
3+
import reactHooks from "eslint-plugin-react-hooks";
4+
import reactRefresh from "eslint-plugin-react-refresh";
5+
6+
export default tseslint.config(
7+
{ ignores: ["dist"] },
8+
js.configs.recommended,
9+
...tseslint.configs.recommended,
10+
{
11+
plugins: {
12+
"react-hooks": reactHooks,
13+
"react-refresh": reactRefresh,
14+
},
15+
rules: {
16+
...reactHooks.configs.recommended.rules,
17+
"react-refresh/only-export-components": [
18+
"warn",
19+
{ allowConstantExport: true },
20+
],
21+
"@typescript-eslint/no-explicit-any": "warn",
22+
"@typescript-eslint/no-unused-vars": [
23+
"warn",
24+
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
25+
],
26+
},
27+
},
28+
{
29+
files: ["**/providers/**/*.tsx", "**/context/**/*.tsx"],
30+
rules: {
31+
"react-refresh/only-export-components": "off",
32+
},
33+
},
34+
);

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,19 @@
33
"version": "1.0.0",
44
"type": "module",
55
"private": true,
6+
"packageManager": "pnpm@10.31.0",
67
"description": "Aegis Auth UI - 认证界面",
78
"scripts": {
89
"dev": "vite",
910
"build": "tsc && vite build",
1011
"preview": "vite preview",
11-
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
12+
"lint": "eslint .",
1213
"format": "prettier --write \"src/**/*.{ts,tsx,scss,css,json}\"",
1314
"format:check": "prettier --check \"src/**/*.{ts,tsx,scss,css,json}\"",
1415
"type-check": "tsc --noEmit"
1516
},
1617
"dependencies": {
17-
"@aegis/sdk": "file:../aegis-sdk",
18+
"@heliannuuthus/aegis-sdk": "*",
1819
"@ant-design/icons": "^6.1.0",
1920
"@marsidev/react-turnstile": "^1.4.2",
2021
"ahooks": "^3.7.8",
@@ -31,8 +32,8 @@
3132
"@types/js-cookie": "^3.0.6",
3233
"@types/react": "^19.2.9",
3334
"@types/react-dom": "^19.2.3",
34-
"@typescript-eslint/eslint-plugin": "^8.53.1",
35-
"@typescript-eslint/parser": "^8.53.1",
35+
"@eslint/js": "^9.39.2",
36+
"typescript-eslint": "^8.55.0",
3637
"@vitejs/plugin-react": "^5.1.2",
3738
"eslint": "^9.39.2",
3839
"eslint-plugin-react-hooks": "^7.0.1",

0 commit comments

Comments
 (0)