[英]Eslint - File ignored because of a matching ignore pattern
當我運行eslint package/**/*.ts **/*.ts
得到這個警告:
0:0 warning File ignored because of a matching ignore pattern. Use "--no-ignore" to override
/home/njfamirm/One/package/util/index.d.ts
0:0 warning File ignored because of a matching ignore pattern. Use "--no-ignore" to override
/home/njfamirm/One/package/util/persian-number.d.ts
0:0 warning File ignored because of a matching ignore pattern. Use "--no-ignore" to override
我的猜測是*.ts
包含*.d.ts
文件,因為我忽略*.d.ts
格式 in.eslintignore
.eslintignore
*.js
*.mjs
*.map
*.d.ts
node_modules/
ts-lint.json
{
"compilerOptions": {
"incremental": true,
"target": "ESNEXT",
"module": "ESNEXT",
"lib": ["ESNEXT", "DOM", "DOM.Iterable"],
"declaration": true,
"composite": true,
"importHelpers": true,
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"moduleResolution": "node",
"esModuleInterop": true,
"skipLibCheck": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true
},
"include": ["demo/**/*.ts", "package/**/*.ts"],
"exclude": [],
"compileOnSave": false
}
提前致謝
請測試這個
{
"compilerOptions": {
"incremental": true,
"target": "ESNEXT",
"module": "ESNEXT",
"lib": ["ESNEXT", "DOM", "DOM.Iterable"],
"declaration": true,
"composite": true,
"importHelpers": true,
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"moduleResolution": "node",
"esModuleInterop": true,
"skipLibCheck": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true
},
"include": ["demo/**/*.ts", "package/**/*.ts"],
"exclude": [
"**/*.d.ts",
"node_modules"
],
"compileOnSave": false
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.