umi如何禁用某个eslint配置呢

Created on 9 May 2019  ·  7Comments  ·  Source: umijs/umi

浏览器和iterm端都报warning如下:
image
我希望可以去除这个warning,查了以后在.eslintrc文件中用这个配置,但是无效
"rules":{
"jsx-a11y/anchor-is-valid":"off"
}
想问,应该如何去除这个warning

Most helpful comment

项目中也遇到了这个问题,通过自己写插件解决了,可以参考下:
https://github.com/xfields/umi-plugin-eslint

All 7 comments

@Luxiaoshi 在开发环境上配置 rules 好像不起作用,可以在开发环境先关闭检测
image

@sorrycc 要不要加一个eslint配置,用于开启关闭,eslint-config-umi。还有修改和补充eslint-config-umi的rules

项目中也遇到了这个问题,通过自己写插件解决了,可以参考下:
https://github.com/xfields/umi-plugin-eslint

应该会优先用项目自己的 .eslintrc 吧,然后可以写成:

{
  extends: "eslint-config-umi",
  rules: {}
}

应该会优先用项目自己的 .eslintrc 吧,然后可以写成:

{
  extends: "eslint-config-umi",
  rules: {}
}

但是貌似只有vscode 读取了这个配置,umi dev 编译还是会再console打印

感觉是umi读取eslint的优先级问题,覆盖了也没有效果

@sorrycc 为何关闭这个问题了呢,如何解决这个问题呢?现在项目启动都是报这个警告.
image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tangzhengwen picture tangzhengwen  ·  4Comments

mizi-lin picture mizi-lin  ·  3Comments

nguyenhuutinh picture nguyenhuutinh  ·  3Comments

tauruswang picture tauruswang  ·  3Comments

sorrycc picture sorrycc  ·  4Comments