forked from 79E/ChatGpt-Web
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 82907ff
Showing
63 changed files
with
21,800 additions
and
0 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,12 @@ | ||
root = true # 控制配置文件 .editorconfig 是否生效的字段 | ||
| ||
[**] # 匹配全部文件 | ||
indent_style = tab # 缩进风格,可选space|tab | ||
indent_size = 4 # 缩进的空格数 | ||
charset = utf-8 # 设置字符集 | ||
trim_trailing_whitespace = true # 删除一行中的前后空格 | ||
insert_final_newline = true # 设为true表示使文件以一个空白行结尾 | ||
end_of_line = lf | ||
| ||
[**.md] # 匹配md文件 | ||
trim_trailing_whitespace = false |
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,9 @@ | ||
# 系统环境 | ||
VITE_APP_ENV=development | ||
|
||
# 请求地址 | ||
VITE_APP_REQUEST_HOST=https://api.aizj.top/api | ||
|
||
# APP 名称&Logo | ||
VITE_APP_TITLE=ChatGpt | ||
VITE_APP_LOGO=https://cdn.jsdelivr.net/gh/duogongneng/testuitc/svg-1681898659579.svg |
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,9 @@ | ||
# 系统环境 | ||
VITE_APP_ENV=production | ||
|
||
# 请求地址 | ||
VITE_APP_REQUEST_HOST=https://api.aizj.top/api | ||
|
||
# APP 名称&Logo | ||
VITE_APP_TITLE=ChatGpt | ||
VITE_APP_LOGO=https://cdn.jsdelivr.net/gh/duogongneng/testuitc/svg-1681898659579.svg |
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,15 @@ | ||
*.sh | ||
*.md | ||
*.woff | ||
*.ttf | ||
.vscode | ||
.idea | ||
.husky | ||
.local | ||
dist | ||
node_modules | ||
Dockerfile | ||
/public | ||
/docs | ||
/bin | ||
/dist |
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,195 @@ | ||
module.exports = { | ||
'env': { | ||
'browser': true, | ||
'es2021': true, | ||
'node': true, | ||
'es6': true | ||
}, | ||
'overrides': [ | ||
], | ||
'parser': '@typescript-eslint/parser', | ||
'parserOptions': { | ||
'ecmaVersion': 'latest', | ||
'sourceType': 'module', | ||
'ecmaFeatures': { // 表示你想使用的额外的语言特性 | ||
'jsx': true // 启用 JSX | ||
} | ||
}, | ||
'extends': [ | ||
'eslint:recommended', | ||
'prettier', | ||
'plugin:react/recommended', | ||
'plugin:react-hooks/recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
], | ||
'plugins': [ | ||
'prettier', | ||
'react', | ||
'react-hooks', | ||
'@typescript-eslint' | ||
], | ||
'rules': { | ||
// eslint 的配置 | ||
'quotes': ['ERROR', 'single'], //单引号 | ||
'no-console': ['error', { 'allow': ['log'] }],// 允许使用 console.log() | ||
'no-confusing-arrow': 0, // 禁止在可能与比较操作符相混淆的地方使用箭头函数 | ||
// eslint-plugin-react 的配置 | ||
'react/prop-types': 0, | ||
// eslint-plugin-react-hooks 的配置 | ||
'react-hooks/rules-of-hooks' : 'error', | ||
'react-hooks/exhaustive-deps' : 'warn', | ||
'no-useless-escape': 'warn', | ||
'react/react-in-jsx-scope': 0, | ||
'prefer-const': 'error', | ||
'no-constant-condition': 'warn', | ||
|
||
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-is-mounted.md | ||
'react/no-is-mounted': 'warn', | ||
|
||
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md | ||
'react/jsx-pascal-case': [ | ||
'error', { | ||
allowAllCaps: false, | ||
allowNamespace: true, | ||
allowLeadingUnderscore: true, | ||
ignore: [], | ||
}, | ||
], | ||
|
||
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/display-name.md | ||
'react/display-name': 'warn', | ||
|
||
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forbid-component-props.md | ||
'react/forbid-component-props': [0, { forbid: ['className', 'style', 'id'] }], | ||
|
||
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-closing-bracket-location.md | ||
'react/jsx-closing-bracket-location': ['error', 'line-aligned'], | ||
|
||
// https://eslint.org/docs/latest/rules/jsx-quotes | ||
'jsx-quotes': ['error', 'prefer-double'], | ||
|
||
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-tag-spacing.md | ||
'react/jsx-tag-spacing': [ | ||
'error', { | ||
closingSlash: 'never', | ||
beforeSelfClosing: 'always', | ||
afterOpening: 'never', | ||
beforeClosing: 'never', | ||
}, | ||
], | ||
|
||
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md | ||
'react/jsx-curly-spacing': ['warn', { when: 'never' }], | ||
|
||
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md | ||
'react/no-array-index-key': 'error', | ||
|
||
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/require-default-props.md | ||
'react/require-default-props': [ | ||
'error', { | ||
forbidDefaultForRequired: false, | ||
ignoreFunctionalComponents: true, | ||
}, | ||
], | ||
|
||
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-this-in-sfc.md | ||
'react/no-this-in-sfc': 'error', | ||
|
||
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md | ||
'react/jsx-boolean-value': ['warn', 'never'], | ||
|
||
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md | ||
'react/no-string-refs': ['error', { noTemplateLiterals: true }], | ||
|
||
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-wrap-multilines.md | ||
'react/jsx-wrap-multilines': [ | ||
'error', { | ||
declaration: 'parens-new-line', | ||
assignment: 'parens-new-line', | ||
return: 'parens-new-line', | ||
arrow: 'parens-new-line', | ||
condition: 'parens-new-line', | ||
logical: 'parens-new-line', | ||
prop: 'parens-new-line', | ||
}, | ||
], | ||
|
||
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md | ||
'react/self-closing-comp': [ | ||
'error', { | ||
component: true, | ||
html: true, | ||
}, | ||
], | ||
|
||
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-closing-tag-location.md | ||
'react/jsx-closing-tag-location': 'error', | ||
|
||
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md | ||
'react/jsx-no-bind': [ | ||
'warn', { | ||
ignoreRefs: true, | ||
allowArrowFunctions: true, | ||
allowFunctions: false, | ||
allowBind: false, | ||
ignoreDOMComponents: true, | ||
}, | ||
], | ||
|
||
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/require-render-return.md | ||
'react/require-render-return': 'error', | ||
|
||
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/sort-comp.md | ||
'react/sort-comp': [ | ||
'warn', { | ||
order: [ | ||
'static-variables', | ||
'static-methods', | ||
'instance-variables', | ||
'lifecycle', | ||
'/^handle.+$/', | ||
'/^on.+$/', | ||
'getters', | ||
'setters', | ||
'/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/', | ||
'instance-methods', | ||
'everything-else', | ||
'rendering', | ||
], | ||
groups: { | ||
lifecycle: [ | ||
'displayName', | ||
'propTypes', | ||
'contextTypes', | ||
'childContextTypes', | ||
'mixins', | ||
'statics', | ||
'defaultProps', | ||
'constructor', | ||
'getDefaultProps', | ||
'getInitialState', | ||
'state', | ||
'getChildContext', | ||
'getDerivedStateFromProps', | ||
'componentWillMount', | ||
'UNSAFE_componentWillMount', | ||
'componentDidMount', | ||
'componentWillReceiveProps', | ||
'UNSAFE_componentWillReceiveProps', | ||
'shouldComponentUpdate', | ||
'componentWillUpdate', | ||
'UNSAFE_componentWillUpdate', | ||
'getSnapshotBeforeUpdate', | ||
'componentDidUpdate', | ||
'componentDidCatch', | ||
'componentWillUnmount', | ||
], | ||
rendering: [ | ||
'/^render.+$/', | ||
'render', | ||
], | ||
}, | ||
}, | ||
], | ||
} | ||
} |
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,26 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
package-lock.json | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
.vscode | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
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,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no-install commitlint --edit "$1" |
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,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npm run eslint: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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/dist/* | ||
/public/* | ||
/node_modules/** | ||
.local | ||
.output.js | ||
**/*.svg | ||
**/*.sh |
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,19 @@ | ||
module.exports = { | ||
printWidth: 100, // 最大行长规则通常设置为 100 或 120。 | ||
tabWidth: 2, // 指定每个标签缩进级别的空格数。 | ||
useTabs: false, // 使用制表符而不是空格缩进行。 | ||
semi: false, // true(默认): 在每条语句的末尾添加一个分号。false:仅在可能导致 ASI 失败的行的开头添加分号。 | ||
singleQuote: true, // 使用单引号而不是双引号 | ||
quoteProps: 'as-needed', // 引用对象中的属性时,仅在需要时在对象属性周围添加引号。 | ||
bracketSpacing: true, // 在对象文字中的括号之间打印空格。 | ||
trailingComma: 'none', // "none":没有尾随逗号。"es5": 在 ES5 中有效的尾随逗号(对象、数组等),TypeScript 中的类型参数中没有尾随逗号。"all"- 尽可能使用尾随逗号。 | ||
bracketSameLine: false, // 将>多行 HTML(HTML、JSX、Vue、Angular)元素放在最后一行的末尾,而不是单独放在下一行(不适用于自闭合元素)。 | ||
jsxSingleQuote: false, // 在 JSX 中使用单引号而不是双引号。 | ||
arrowParens: 'always', // 在唯一的箭头函数参数周围始终包含括号。 | ||
insertPragma: false, // 插入编译指示 | ||
requirePragma: false, // 需要编译指示 | ||
proseWrap: 'never', // 如果散文超过打印宽度,则换行 | ||
htmlWhitespaceSensitivity: 'strict', // 所有标签周围的空格(或缺少空格)被认为是重要的。 | ||
endOfLine: 'lf', // 确保在文本文件中仅使用 ( \n)换行,常见于 Linux 和 macOS 以及 git repos 内部。 | ||
rangeStart: 0, // 格式化文件时,回到包含所选语句的第一行的开头。 | ||
}; |
Oops, something went wrong.