美文网首页
create-react-app 3.4.0 覆盖Eslint

create-react-app 3.4.0 覆盖Eslint

作者: 短信验证码 | 来源:发表于2020-03-18 14:15 被阅读0次

官方说明

Note that even if you customise your ESLint config, these changes will only affect the editor integration. They won’t affect the terminal and in-browser lint output. This is because Create React App intentionally provides a minimal set of rules that find common mistakes.

Experimental: Extending the ESLint config

We recognise that in some cases, further customisation is required. It is now possible to extend the base ESLint config by setting the EXTEND_ESLINT environment variable to true. See advanced configuration for more information on available environment variables. Note that any rules set to "error" will stop the project from building.

解决方法

根目录添加.env
EXTEND_ESLINT=true

相关文章

网友评论

      本文标题:create-react-app 3.4.0 覆盖Eslint

      本文链接:https://www.haomeiwen.com/subject/fkgqyhtx.html