allegro / typescript-strict-plugin

Typescript plugin that allows turning on strict mode in specific files or directories.
MIT License
338 stars 29 forks source link

Exclude files by pattern #58

Open Willey1986 opened 1 year ago

Willey1986 commented 1 year ago

Hi,

coming from an angular project where normal files and test (spec) files are located next to each other it seems impossible to only check the .ts files and skip the .spec.ts files. Or did i mess up the configuration.

"plugins": [
  {
    "name": "typescript-strict-plugin",
    "paths": [
      "./src/app/folder1",
      "./src/app/folder2"
    ],
    "exclude": [
      // doesn't work
      "./src/app/folder1/**/*.spec.ts"
      // doesn't work
      "**/*.spec.ts"
      // even specifying the files directly seems to have no effect
      "./src/app/folder1/subfolder/some-test.spec.ts"
    ]
  }
]

Is ist simply not possible right now?

Thx for your help!

kellyrmilligan commented 8 months ago

related, I am having an issue where if I specify a path, like

./src/modules/dog

that it will also pick up other paths that start with the same letters, like

./src/modules/dogstuff

I have tried different ways:

./src/modules/dog/, still happens

as mentioned in this issue, globs don't seem to work.

any ideas?