有没有人看到升级反应16打破所有的eslint规则?
我曾经两次遇到过这种情况。曾经,当我对npm包进行了大量更新。然后,当我采取一种非常精细的方法*。这是升级产生了大量的eslint消息:
-"react": "15.6.2",
+"react": "16.0.0",
-"react-dom": "15.6.2",
+"react-dom": "16.0.0",
"react-hot-loader": "^3.0.0-beta.6",
"react-redux": "^4.4.5",
-"react-router": "3.2.0",
+"react-router": "4.2.0",
运行webpack-dev-server时会出现lint消息,并包含这些示例。
Use object destructuring prefer-destructuring
Closing tag of a multiline JSX expression must be on its own line
Expected indentation of 2 spaces but found 27
defaultProp "currentInput" defined for isRequired propType
Block must not be padded by blank lines
*执行了jest测试,lint和集成测试,并且一次检查了一系列升级。
当这发生之前,我去尝试修复报告的eslint问题,但没有让React 16运行。