作用域包与纱线的依赖关系



我已经创建了具有内容的作用域包@scope/eslint-config

{
"name": "@scope/eslint-config",
"version": "1.0.3",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"repository": {
"type": "git"
},
"author": "",
"license": "ISC",
"dependencies": {
"babel-eslint": "8.2.5",
"eslint": "5.1.0",
"eslint-config-airbnb": "17.0.0",
"eslint-config-prettier": "2.9.0",
"eslint-plugin-css-modules": "2.7.5",
"eslint-plugin-flowtype": "2.50.0",
"eslint-plugin-import": "2.13.0",
"eslint-plugin-jsx-a11y": "6.1.0",
"eslint-plugin-prettier": "2.6.2",
"eslint-plugin-react": "7.10.0",
"eslint-plugin-require-jsdoc-except": "1.1.0"
}
}

在我的项目中添加为"@scoped/eslint-config": "1.0.2",

然而,在运行yarn install之后,我只看到了那个没有任何依赖关系的包。但它与npm 一起工作

我试过yarnv1.8.0v1.7.0v1.6.0

你遇到麻烦了吗?有什么解决方案吗?

在npm中,由于扁平结构,它可以工作。

对于纱线,你需要说--flat,但它会引起其他问题

https://github.com/eslint/eslint/issues/5501

https://github.com/eslint/eslint/issues/3458

最新更新