Skip to content

Commit

Permalink
feat(#58): Add exclude pattern support (#64)
Browse files Browse the repository at this point in the history
* add minimatch (had to legacy peer deps)

* Extend the config

* Add file matching

* Unit test for matched by exclude pattern

* Update readme

* Adjust readme grammar

* Update version and changelog

* docs(58): Update changelog + lint

* fix(58): Update jest/ts-jest
  • Loading branch information
spencer-shupe-qhr committed Mar 8, 2024
1 parent 18afe83 commit 10f37ee
Show file tree
Hide file tree
Showing 9 changed files with 3,053 additions and 9,436 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.4.0] - 2024-03-07

### Added

- Add feature to exclude files from strict check based on `excludePattern` config property

## [2.2.0] - 2022-10-17

### Added
Expand Down
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@ comment. To make these files strict too, just remove its' ignore comments.

## Configuration

Plugin takes extra, non-mandatory arguments `paths` and `exclude`. Both of them take an array of
relative or absolute paths that should be included (property `paths`) or excluded (property
`exclude`). To add strict mode to files from ignored paths you can insert `//@ts-strict` comment.
Plugin takes extra, non-mandatory arguments `paths`, `exlude` and `excludePattern`. Args `paths` and
`exclude` accept an array of relative or absolute paths that should be included (property `paths`)
or excluded (property `exclude`). Arg `excludePattern` accepts an array of strings that will be
matched with [minimatch](https://github.com/isaacs/minimatch). To add strict mode to files from
ignored paths you can insert `//@ts-strict` comment.

```json
{
Expand All @@ -79,6 +81,9 @@ relative or absolute paths that should be included (property `paths`) or exclude
"exclude": [
"./src/tests",
"./src/fileToExclude.ts"
],
"excludePattern": [
"**/*.spec.ts"
]
}
]
Expand Down
Loading

0 comments on commit 10f37ee

Please sign in to comment.