2

I'm trying to add custom lint rules on top of the lint rules that come out of the box with create-react-app. Doing so throws error about versioning issue of certain lint packages while running the build.

4

1 回答 1

0

创建新文件.eslintrc并添加以下代码。您可以根据需要自定义规则。

{
  "extends": ["equimper", "prettier"],
  "plugins": ["prettier"],
  "rules": {
    "prettier/prettier": "error",
    "experimentalDecorators":"true"
  }
}

还添加以下软件包作为开发依赖。您可以根据需要进行修改。*在这种情况下将安装最新版本。

 "devDependencies": {
    "eslint": "*",
    "eslint-config-equimper": "*",
    "eslint-config-prettier": "*",
    "eslint-plugin-prettier": "*",
    "prettier": "*"
  }

于 2019-05-07T11:48:54.883 回答