简体   繁体   中英

Eslint - File ignored because of a matching ignore pattern

when I run eslint package/**/*.ts **/*.ts

get this warning:

  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

My guess is that *.ts include *.d.ts file because I'm ignore *.d.ts format 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

my Project

Thanks in advance

Please Test This

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM