-
Notifications
You must be signed in to change notification settings - Fork 386
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: zsnmwy <szlszl35622@gmail.com>
- Loading branch information
Showing
175 changed files
with
16,136 additions
and
23,493 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# indicate this is the root of the project | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.d.ts | ||
.env.example | ||
.eslintrc.js | ||
build | ||
mock | ||
config | ||
public | ||
scripts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,60 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true | ||
}, | ||
root: true, | ||
extends: [ | ||
'plugin:react/recommended', | ||
'google', | ||
'airbnb-base', | ||
'prettier', | ||
'plugin:react/jsx-runtime', | ||
'plugin:react-hooks/recommended' | ||
'plugin:react/recommended', | ||
'plugin:import/typescript', | ||
'plugin:@typescript-eslint/recommended', | ||
], | ||
plugins: ['eslint-plugin-prettier'], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true | ||
env: { | ||
jest: true, | ||
}, | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
ecmaVersion: 'latest', | ||
sourceType: 'module' | ||
}, | ||
plugins: ['react', '@typescript-eslint'], | ||
rules: { | ||
'react/display-name': [0], | ||
'no-unused-vars': [1], | ||
'valid-jsdoc': [0], | ||
'require-jsdoc': [0], | ||
'guard-for-in': [1], | ||
'prefer-spread': [1], | ||
'react/jsx-sort-props': [2, { callbacksLast: true }] | ||
} | ||
'no-shadow': 'off', | ||
'no-param-reassign': ['error', { props: false }], | ||
'no-console': 'off', | ||
'no-plusplus': [ | ||
'error', | ||
{ | ||
allowForLoopAfterthoughts: true, | ||
}, | ||
], | ||
'react/display-name': 'off', | ||
// jsx 单引号 | ||
'jsx-quotes': [2, 'prefer-single'], | ||
'import/no-cycle': 'off', // TODO: remove | ||
'import/extensions': 'off', | ||
'import/no-unresolved': 'off', | ||
'import/order': 'off', | ||
'import/prefer-default-export': 'off', | ||
'import/no-extraneous-dependencies': ['error', { devDependencies: true }], | ||
// 关闭variable必须全部大写规则 | ||
'@typescript-eslint/naming-convention': [ | ||
'error', | ||
{ | ||
selector: 'variable', | ||
modifiers: ['const'], | ||
format: null, | ||
}, | ||
], | ||
'@typescript-eslint/no-empty-function': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/ban-types': 'off', | ||
// 统一eslint prettier配置 | ||
'prettier/prettier': [ | ||
'warn', | ||
{}, | ||
{ | ||
usePrettierrc: true, | ||
}, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module.exports = { | ||
printWidth: 120, | ||
tabWidth: 2, | ||
useTabs: false, | ||
semi: true, | ||
singleQuote: true, | ||
quoteProps: 'as-needed', | ||
jsxSingleQuote: true, | ||
trailingComma: 'all', | ||
bracketSpacing: true, | ||
jsxBracketSameLine: false, | ||
arrowParens: 'always', | ||
rangeStart: 0, | ||
rangeEnd: null, | ||
requirePragma: false, | ||
insertPragma: false, | ||
proseWrap: 'preserve', | ||
htmlWhitespaceSensitivity: 'css', | ||
vueIndentScriptAndStyle: false, | ||
endOfLine: 'lf', | ||
embeddedLanguageFormatting: 'auto', | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,45 @@ | ||
# crane-dashboard | ||
|
||
# Crane Dashboard | ||
|
||
### Api Docs | ||
|
||
https://www.postman.com/gocrane/workspace/public/collection/14940923-8559deb0-9af9-4ace-bc64-14da3dd0c8f8?ctx=documentation | ||
|
||
|
||
### 开发 | ||
|
||
开发前,请参考[指南](https://tdesign.tencent.com/starter/docs/react/develop)。 | ||
|
||
```bash | ||
## 安装依赖 | ||
npm install | ||
|
||
## 启动项目 | ||
npm run dev | ||
|
||
## mock方式启动项目 | ||
npm run dev:mock | ||
``` | ||
|
||
### 构建 | ||
|
||
```bash | ||
## 构建正式环境 | ||
npm run build | ||
|
||
## 构建测试环境 | ||
npm run build:test | ||
``` | ||
|
||
### 其他 | ||
|
||
```bash | ||
## 预览构建产物 | ||
npm run preview | ||
|
||
## 代码格式检查 | ||
npm run lint | ||
|
||
## 代码格式检查与自动修复 | ||
npm run lint:fix | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Crane Dashboard</title> | ||
<meta name="description" content="React UI Component" /> | ||
<meta name="theme-color" content="#ffffff" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
<link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180" /> | ||
<meta name="msapplication-TileColor" content="#FFFFFF" /> | ||
<link rel="mask-icon" href="/favicon.svg" color="#FFFFFF" /> | ||
<!--[if IE]> | ||
<style> | ||
#app { | ||
display: none; | ||
} | ||
</style> | ||
<![endif]--> | ||
</head> | ||
|
||
<body> | ||
<!--[if IE]> | ||
<h1 style="position: absolute; width: 100%; text-align: center; top: 45%"> | ||
建议使用 <a href="https://www.google.cn/chrome/">Chrome</a> | ||
</h1> | ||
<![endif]--> | ||
<td-horizon></td-horizon> | ||
<td-aegis></td-aegis> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
<script> | ||
if (window.Cypress) { | ||
window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__; | ||
} | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default []; |
Oops, something went wrong.