我正在使用VS代码中的节点js的核心模块,我无法使用"readline"模块.
我在js文件中有以下代码.
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
rl.question('Is it working ?', function (answer) {
console.log(answer);
});
Run Code Online (Sandbox Code Playgroud)
当我运行它时,这是我在调试控制台中看到的
node --debug-brk=4868 --nolazy Core.js
Debugger listening on port 4868
Is it working ?
No
not available
Run Code Online (Sandbox Code Playgroud)
我不确定是什么;这里的问题但它无法将答案记录到控制台.
我正在使用ESLint for JavaScript.我在我的机器上安装它,并且能够运行并检查我想要的文件中的错误.一切都很好,但如果我只能从命令提示符使用它我必须为每个文件或文件夹手动运行它.我正在考虑将它集成到Visual Studio中,这样当我像"运行ESLint on solution"那样运行它时,它会给出解决方案中所有JS文件的警告/错误列表.即使我们不能这样做,是否可以在Visual Studio 2015中选择文件并在该文件上运行ESLint?
我将ESLint添加到Visual Studio中的外部工具:

但是当我运行它时,它没有显示任何错误或任何错误.它只是显示help命令的详细信息.如何在特定文件上运行此操作?