有没有办法禁用文件夹的特定规则?例如,我不想对文件test夹中的所有测试文件都要求JSDoc注释.有没有办法做到这一点?
https://www.youtube.com/watch?v=Fa4cRMaTDUI 我正在观看本课并尝试重新创作作者所做的一切.19:00他设置了vue.js-express.js项目.他创建了名为"server"的文件夹.在'server /'中,他运行'npm init -f'.然后'npm install --save nodemon eslint',然后他就进入了eslint.然后在package.json文件中,他写道:
"scripts": {
"start": "nodemon src/app.js --exec 'npm run lint && node'",
"lint": "eslint **/*.js"
}
Run Code Online (Sandbox Code Playgroud)
然后在'server'文件夹中创建文件夹'src'.在'src'中他创建'app.js'.并在'app.js; 有一个简单的console.log('你好').然后他跑'npm start'.'Hello'打印在终端,nodemon和eslint工作得很好.然后他输入'npm install --save express'.那是我的问题开始的地方.安装express.js后我输入'npm start',我在终端中收到此错误:
Oops! Something went wrong! :(
ESLint: 5.0.0.
No files matching the pattern "node_modules/ipaddr.js" were found.
Please check for typing mistakes in the pattern.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! server@1.0.0 lint: `eslint **/*.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the …Run Code Online (Sandbox Code Playgroud)