最佳答案
要么我还不能100% 理解 dependencies
和 devDependencies
在节点中的区别,要么这里的 eslint 是错误的(无法正确分析这一点) :
3:1 error 'chai' should be listed in the project's dependencies, not devDependencies import/no-extraneous-dependencies
4:1 error 'chai-enzyme' should be listed in the project's dependencies, not devDependencies import/no-extraneous-dependencies
5:1 error 'enzyme' should be listed in the project's dependencies, not devDependencies import/no-extraneous-dependencies
7:1 error 'sinon' should be listed in the project's dependencies, not devDependencies import/no-extraneous-dependencies
9:1 error 'redux-mock-store' should be listed in the project's dependencies, not devDependencies import/no-extraneous-dependencies
这些都是测试依赖项,那么为什么要说它们应该列在 dependencies
中呢?
附加说明: 我们利用特拉维斯作为我们的线人,所以我不知道这是否有什么不同。