Détail du package

@utopia/eslint-config-react

utopiajs43MIT0.0.13

eslint-config-react

readme

@utopia/eslint-config-react

该包提供 React 相关的 eslint 配置,内置包含 @utopia/eslint-config-base 中提供的配置,同时支持 React 插件以及 Hooks 等,也可根据个人(团队)规范增加或者重写相关 rules。

Install

npm install --save-dev @utopia/eslint-config-react
# or
yarn add -D @utopia/eslint-config-react

Usage

在 .eslintrc.* 文件中配置:

module.exports = {
  extends: ['@utopia/eslint-config-react']
};

如果需要支持 Hooks

module.exports = {
  extends: ['@utopia/eslint-config-react', '@utopia/eslint-config-react/hooks']
};