🐞 fix:

修复倒计时bug,删除eslint
This commit is contained in:
john 2024-06-03 14:38:18 +08:00
parent 3795aedede
commit bc75c7885c
7 changed files with 29 additions and 1063 deletions

View File

@ -1,18 +0,0 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}

Binary file not shown.

View File

@ -1,30 +1,27 @@
# React + TypeScript + Vite
<!--
* @LastEditors: John
* @Date: 2024-04-12 19:24:25
* @LastEditTime: 2024-06-03 14:37:23
* @Author: John
-->
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
## Git Flow
Currently, two official plugins are available:
- 初始化Git Flow
git flow init
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
- 创建一个新功能分支
git flow feature start new-feature
## Expanding the ESLint configuration
- 完成功能开发
git flow feature finish new-feature
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- 创建一个release分支
git flow release start 1.0.0
- Configure the top-level `parserOptions` property like this:
- 完成release分支
git flow release finish 1.0.0
```js
export default {
// other rules...
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
}
```
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
- 紧急修复
git flow hotfix start hotfix-issue
git flow hotfix finish hotfix-issue

View File

@ -6,7 +6,6 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"dependencies": {
@ -25,12 +24,7 @@
"@types/node": "^20.11.7",
"@types/react": "^18.2.43",
"@types/react-dom": "^18.2.17",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"@vitejs/plugin-react-swc": "^3.5.0",
"eslint": "^8.55.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"typescript": "^5.3.3",
"vite": "^5.0.8"
}

View File

@ -65,7 +65,7 @@ function EmailForm() {
Toast.show({
content: typedError.msg,
afterClose: () => {
start(60 * 1000);
// start(60 * 1000);
},
});
} else {

View File

@ -96,7 +96,7 @@ function PhoneForm() {
Toast.show({
content: typedError.msg,
afterClose: () => {
start(60 * 1000);
// start(60 * 1000);
},
});
} else {

1021
yarn.lock

File diff suppressed because it is too large Load Diff