allegro / typescript-strict-plugin

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

Add exclude to config #48

Closed MikeKalinowski closed 1 year ago

MikeKalinowski commented 1 year ago

This PR partially solves issue https://github.com/allegro/typescript-strict-plugin/issues/39 by adding option to exclude files. To fully resolve that issue, option to create paths with globs is needed.

This PR addresses three places where file paths are checked. Please take a look if I haven't missed anything. Addressed places are:

The priority of checks according to new isFileStrict.ts will be:

  1. ts strict ignore comment
  2. ts strict comment
  3. exclude
  4. include To give an example, if file is both in include and exclude, it will be excluded. If it has @ts-strict and exclude, it will be included.
a7madgamal commented 1 year ago

I could really use this! I wanted to open an issue so finding a PR ready is fantastic! how can I help or what's missing here?