create-react-app 3.4.0 覆盖Eslint

2020-03-18  本文已影响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
上一篇 下一篇

猜你喜欢

热点阅读