Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/414.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 防止vs代码将Express JS代码格式化为换行符_Javascript_Format_Vscode Settings - Fatal编程技术网

Javascript 防止vs代码将Express JS代码格式化为换行符

Javascript 防止vs代码将Express JS代码格式化为换行符,javascript,format,vscode-settings,Javascript,Format,Vscode Settings,Vs代码在格式上执行此操作 app.get( "/user/:id", function(req, res, next) { if (req.params.id === "0") next("route"); else next(); }, function(req, res, next) { res.send("regular"); } ); 我需要这个 app.get("/user/:id",function(req, res, next) { if (req.pa

Vs代码在格式上执行此操作

app.get(
"/user/:id",
function(req, res, next) {
   if (req.params.id === "0") next("route");
   else next();
},
function(req, res, next) {
   res.send("regular");
}
);
我需要这个

app.get("/user/:id",function(req, res, next) {
   if (req.params.id === "0") next("route");
   else next();
},
function(req, res, next) {
   res.send("regular");
}
);
我尝试过这个可能的答案,但没有帮助

“eslint.format.enable”:false “javascript.suggest.includeAutomaticOptionalChainCompletions”:false,”


禁用linting扩展或更新规则。希望参数1和2的开头在同一行上,但参数3的开头在另一行上,这是非常不寻常的。