1 Star 0 Fork 7

chung / react-hooks

forked from 哈浪 / react-hooks 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

react-hooks

介绍

采用react18的版本开发的后台管理端,hooks + ts 全新设计, useContext useReducer useState

软件架构

软件架构说明

安装教程

  1. xxxx
  2. xxxx
  3. xxxx

使用说明

  1. xxxx
  2. xxxx
  3. xxxx

eslint安装

  1. npm i eslint -D
  2. 初始化配置文件./node_modules/.bin/eslint --init 或者npx eslint --init都一样,会在根目录生成一个.eslintrc.js
  3. 校验非js格式的文件,通常Eslint只能校验js文件,如果我们要校验.vue、.jsx文件该怎么做呢,只配置vue-eslint-parser的解析器是不够的,还需要让Eslint在查找文件的时候找得到.vue文件。可以通过--ext指定需要校验的文件格式
  4. 在上面的规则当中进入官方文档的配置规则,在全部规则的列表里面带有标志的规则表示可以被Eslint自动修复,那么我们如何自动修复呢?只需要通过--fix的命名即可,和检验文件的命令相似,只需要再加上修复命令即可
    npx eslint --fix src
  5. 当然在项目中每次自己输入太过于繁琐也不好记,我们可以在package.json中配置检测和修复命令
    {
       "scripts": {
           "lint": "npx eslint --ext .js,.jsx,.vue src",
           "lint:fix": "npx eslint --fix --ext .js,.jsx,.vue src",
       }
    }
  6. 过滤自己不需要检测的文件,在某些情况下我们不需要检测某些文件,或者由于某些原因在当前场景下不想去检测某个文件,我们只需要在项目根目录去创建.eslintignore文件,在其中指定目录或者文件即可,路径是以根目录为相对地址的路径。同时Eslint是默认忽略/node_modules/的文件的,这个目录不需要配置

下载prettier

  1. npm i prettier -D,然后执行npx prettier --write index.js,我们可以发现刚才不工整的代码,全部都变得工工整整了。
  2. 配置 .prettierrc.js 或者 .prettierrc(json格式)

参与贡献

  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request

特技

  1. 使用 Readme_XXX.md 来支持不同的语言,例如 Readme_en.md, Readme_zh.md
  2. Gitee 官方博客 blog.gitee.com
  3. 你可以 https://gitee.com/explore 这个地址来了解 Gitee 上的优秀开源项目
  4. GVP 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
  5. Gitee 官方提供的使用手册 https://gitee.com/help
  6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 https://gitee.com/gitee-stars/
MIT License Copyright (c) 2022 哈浪 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.

简介

采用react18的版本开发的后台管理端,hooks + ts 全新设计, useContext useReducer useState 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/zhonghuran/react-hooks.git
git@gitee.com:zhonghuran/react-hooks.git
zhonghuran
react-hooks
react-hooks
master

搜索帮助