[英]How to create a JSCS config file on windows
When I try to create a JSCS config file: 当我尝试创建JSCS配置文件时:
C:\Blog\BlogWeb>jscs --auto-configure "C:\Blog\BlogWeb\temp.jscs"
I get the following error: 我收到以下错误:
safeContextKeyword option requires string or array value
safeContextKeyword选项需要字符串或数组值
What parameter am I supposed to pass? 我应该传递什么参数? What is a safecontextkeyword?
什么是安全上下文关键字?
New to NPM and JSCS, please excuse ignorance. NPM和JSCS的新手,请原谅。
JSCS was complaining that I didn't have a config file, so I was trying to figure out how to create one. JSCS抱怨我没有配置文件,因此我试图弄清楚如何创建一个配置文件。
JSCS looks for a config file in these places, unless you manually specify it with the --config option: 除非您使用--config选项手动指定,否则JSCS在这些位置查找配置文件 :
jscs it will consequentially search for jscsConfig option in package.json file then for .jscsrc (which is a just JSON with comments) and .jscs.json files in the current working directory then in nearest ancestor until it hits the system root.
然后,它将在package.json文件中搜索jscsConfig选项,然后在当前工作目录中搜索.jscsrc(这是带有注释的JSON)和.jscs.json文件,然后在最近的祖先中搜索,直到到达系统根目录为止。
I fixed this by: 我通过以下方式解决了这个问题:
{
"preset": "jquery",
"requireCurlyBraces": null // or false
}
run the command 运行命令
jscs --auto-configure .jscsrc
jscs-自动配置.jscsrc
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.