I want to integrate some kind of code linting for node.js in webstorm so I installed standard to my node.js project using:
我想在webstorm中为node.js集成某种代码lint,所以我使用以下命令为我的node.js项目安装了标准:
npm instal standard --save-dev
It was installed and listed in the "devDependencies" section of package.json but when I run the command:
它已经安装并列在package.json的“devDependencies”部分中,但是当我运行命令时:
standard
in the console I get
在控制台我得到
'standard' is not recognized as an internal or external command
1 个解决方案
#1
0
if you want to use it locally you have to include it in you scripts first in package.json "scripts": { "standard": "standard", "standard::fix": "standard --fix" }
and use npm standard
to run it. or if you are using yarn type yarn standard
如果你想在本地使用它,你必须首先在package.json“scripts”中将它包含在你的脚本中:{“standard”:“standard”,“standard :: fix”:“standard --fix”}并使用npm运行它的标准。或者如果您使用纱线型纱线标准
#1
0
if you want to use it locally you have to include it in you scripts first in package.json "scripts": { "standard": "standard", "standard::fix": "standard --fix" }
and use npm standard
to run it. or if you are using yarn type yarn standard
如果你想在本地使用它,你必须首先在package.json“scripts”中将它包含在你的脚本中:{“standard”:“standard”,“standard :: fix”:“standard --fix”}并使用npm运行它的标准。或者如果您使用纱线型纱线标准