0.0.4 • Published 1 year ago

@fineorg/eslint-config-react v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

eslint-config-react npm

开发

修改内容完成后新建一个 tag 后提交,在 Github 发布 release 后会自动发布到 npm 上。

git tag -a v1.0.0 -m "Tag comment"

git push origin v1.0.0

安装

# npm
npm install @fineorg/eslint-config-react

# yarn
yarn add @fineorg/eslint-config-react

使用

本配置文件是针对使用 Typescript 开发 React 项目的,只能在对应环境下使用。同时使用了 Prettier 作为代码风格工具,为了确保使用正常,需要先安装好对应的环境以及相关依赖。

# 以 vite 安装 react-ts 为例
npm create vite@latest my-vue-app -- --template react-ts
# yarn
yarn create vite my-vue-app --template react-ts

# 安装 Eslint
npm install -D eslint prettier @fineorg/eslint-config-react
# yarn
yarn add --dev eslint prettier @fineorg/eslint-config-react

新建或修改配置文件 .eslintrc.json 为:

{
  "extends": "@fineorg/eslint-config-react"
}

内置插件