Skip to content

Commit

Permalink
🎉 init:项目初始化
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackishGreen33 committed May 25, 2024
0 parents commit d1229cb
Show file tree
Hide file tree
Showing 120 changed files with 22,784 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"plugins": ["@typescript-eslint", "simple-import-sort", "unused-imports"],
"extends": [
"eslint:recommended",
"next",
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"no-unused-vars": "off",
"no-console": "warn",
"@typescript-eslint/explicit-module-boundary-types": "off",
"react/no-unescaped-entities": "off",

"react/display-name": "off",
"react/jsx-curly-brace-presence": [
"warn",
{ "props": "never", "children": "never" }
],
"@typescript-eslint/no-unused-vars": "off",
"unused-imports/no-unused-imports": "warn",
"unused-imports/no-unused-vars": [
"warn",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
],
"simple-import-sort/exports": "warn",
"simple-import-sort/imports": [
"warn",
{
"groups": [
["^@?\\w", "^\\u0000"],
["^.+\\.s?css$"],
["^@/libs", "^@/hooks"],
["^@/data"],
["^@/components", "^@/container"],
["^@/store"],
["^@/"],
[
"^\\./?$",
"^\\.(?!/?$)",
"^\\.\\./?$",
"^\\.\\.(?!/?$)",
"^\\.\\./\\.\\./?$",
"^\\.\\./\\.\\.(?!/?$)",
"^\\.\\./\\.\\./\\.\\./?$",
"^\\.\\./\\.\\./\\.\\.(?!/?$)"
],
["^@/types"],
["^"]
]
}
]
},
"globals": {
"React": true,
"JSX": true
}
}
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'daily'
open-pull-requests-limit: 10
versioning-strategy: 'auto'
24 changes: 24 additions & 0 deletions .github/workflows/syncfusion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Syncfusion License

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: git checkout
uses: actions/checkout@v4
- name: pnpm setup
uses: pnpm/action-setup@v3
with:
version: '9.1.2'
- name: Install node modules
run: pnpm install
- name: Activate Syncfusion License
run: npx syncfusion-license activate
env:
SYNCFUSION_LICENSE: ${{ secrets.SYNCFUSION_LICENSE }}
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
11 changes: 11 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const path = require('path');

const buildEslintCommand = (filenames) =>
`next lint --fix --file ${filenames
.map((f) => path.relative(process.cwd(), f))
.join(' --file ')}`;

module.exports = {
'*.{js,jsx,ts,tsx}': [buildEslintCommand], // ESLint 校验
'**/*.{js,jsx,tsx,ts,less,md,json}': ['prettier --write'], // prettier 格式化
};
33 changes: 33 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
11 changes: 11 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"plugins": [
"prettier-plugin-organize-imports",
"prettier-plugin-tailwindcss"
],
"tailwindFunctions": ["classNames"],
"singleQuote": true,
"trailingComma": "es5",
"tabWidth": 2,
"semi": true
}
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"bradlc.vscode-tailwindcss"
]
}
26 changes: 26 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"editor.wordWrap": "on",
// Formatting using Prettier by default for all languages
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
// Formatting using Prettier for JavaScript, overrides VSCode default.
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
// Linting using ESLint.
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
// Enable file nesting.
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
"*.ts": "$(capture).test.ts, $(capture).test.tsx",
"*.tsx": "$(capture).test.ts, $(capture).test.tsx"
}
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 智学图谱(ZhiXueTuPu)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<div align="center">
<h1 align="center">智学图谱</h1>
<h3>学习分析系统</h3>
<a href="https://github.com/BlackishGreen33/ZhiXueTuPu"><strong>探索项目文档 »</strong></a>
<br />
<br />

![license](https://img.shields.io/github/license/BlackishGreen33/ZhiXueTuPu)
![language](https://img.shields.io/github/languages/top/BlackishGreen33/ZhiXueTuPu)
![last](https://img.shields.io/github/last-commit/BlackishGreen33/ZhiXueTuPu)

<a href="https://zhixuetupu.vercel.app/" target="_blank">在线体验</a>
·
<a href="https://github.com/BlackishGreen33/ZhiXueTuPu/issues">报告Bug</a>
·
<a href="https://github.com/BlackishGreen33/ZhiXueTuPu/issues">提出新特性</a>

</div>

## 🔖 项目导览

### ✨ 提交规范

- 🎉 init:项目初始化
- ✨ feat:新增功能(feature)
- 🐞 fix:修复bug
- 📃 docs:文档修改
- 🌈 style:代码样式修改,不影响原代码逻辑
- ✅ test:测试相关的改动
- 🔨 refactor:代码重构
- 🔧 chore:建制过程或辅助工具的变动

### 🎯 相容环境

- 现代浏览器(Chrome >= 64, Edge >= 79, Firefox >= 78, Safari >= 12)

### 💻 本地调试

```bash
$ git clone https://github.com/BlackishGreen33/ZhiXueTuPu.git
$ cd ZhiXueTuPu
$ pnpm install
$ pnpm run dev
```

### 📝 授权

上述文件皆以 MIT 许可授权

> 详细之授权请参考 [LICENSE](LICENSE) 文件
30 changes: 30 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/** @type {import('next').NextConfig} */

const nextConfig = {
reactStrictMode: true,
compiler: {
styledComponents: true,
},
swcMinify: true,
// output: "standalone",
images: {
unoptimized: true,
remotePatterns: [
{
protocol: 'https',
hostname: 'www.github.com',
port: '',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'i.ibb.co',
port: '',
pathname: '/**',
},
],
formats: ['image/avif', 'image/webp'],
},
};

export default nextConfig;
Loading

0 comments on commit d1229cb

Please sign in to comment.