簡體   English   中英

Eslint - 由於匹配的忽略模式,文件被忽略

[英]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
}

.eslintrc.yml

我的項目

提前致謝

請測試這個

{
  "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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM