fork-ts-checker-webpack-plugin 6.0.7 → 6.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -187,13 +187,51 @@ Options for the ESLint linter (`eslint` option object).
187
187
 
188
188
  ### Issues options
189
189
 
190
- Options for the issues filtering (`issues` option object).
190
+ Options for the issues filtering (`issue` option object).
191
+ I could write some plain text explanation of these options but I think code will explain it better:
191
192
 
192
- | Name | Type | Default value | Description |
193
- | --------- | --------------------------------- | ------------- | ----------- |
194
- | `include` | `object` or `function` or `array` | `undefined` | If `object`, defines issue properties that should be [matched](./src/issue/IssueMatch.ts). If `function`, acts as a predicate where `issue` is an argument. |
195
- | `exclude` | `object` or `function` or `array` | `undefined` | Same as `include` but issues that match this predicate will be excluded. |
196
- | `scope` | `'all'` or `'webpack'` | `'webpack'` | Defines issues scope to be reported. If `'webpack'`, reports errors only related to the webpack compilation. Reports all errors otherwise (like `tsc` and `eslint` command). |
193
+ ```typescript
194
+ interface Issue {
195
+ origin: 'typescript' | 'eslint';
196
+ severity: 'error' | 'warning';
197
+ code: string;
198
+ file?: string;
199
+ }
200
+
201
+ type IssueMatch = Partial<Issue>; // file field supports glob matching
202
+ type IssuePredicate = (issue: Issue) => boolean;
203
+ type IssueFilter = IssueMatch | IssuePredicate | (IssueMatch | IssuePredicate)[];
204
+ ```
205
+
206
+ | Name | Type | Default value | Description |
207
+ | --------- | ------------- | ------------- | ----------- |
208
+ | `include` | `IssueFilter` | `undefined` | If `object`, defines issue properties that should be [matched](./src/issue/IssueMatch.ts). If `function`, acts as a predicate where `issue` is an argument. |
209
+ | `exclude` | `IssueFilter` | `undefined` | Same as `include` but issues that match this predicate will be excluded. |
210
+
211
+ <details>
212
+ <summary>Expand example</summary>
213
+
214
+ Include issues from the `src` directory, exclude eslint issues from `.spec.ts` files:
215
+
216
+ ```js
217
+ module.exports = {
218
+ // ...the webpack configuration
219
+ plugins: [
220
+ new ForkTsCheckerWebpackPlugin({
221
+ issue: {
222
+ include: [
223
+ { file: '**/src/**/*' }
224
+ ],
225
+ exclude: [
226
+ { origin: 'eslint', file: '**/*.spec.ts' }
227
+ ]
228
+ }
229
+ })
230
+ ]
231
+ };
232
+ ```
233
+
234
+ </details>
197
235
 
198
236
  ## Vue.js
199
237
 
@@ -60,4 +60,4 @@ class ForkTsCheckerWebpackPlugin {
60
60
  }
61
61
  }
62
62
  exports.ForkTsCheckerWebpackPlugin = ForkTsCheckerWebpackPlugin;
63
- ForkTsCheckerWebpackPlugin.version = '6.0.7'; // will be replaced by the @semantic-release/exec
63
+ ForkTsCheckerWebpackPlugin.version = '6.0.8'; // will be replaced by the @semantic-release/exec
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fork-ts-checker-webpack-plugin",
3
- "version": "6.0.7",
3
+ "version": "6.0.8",
4
4
  "description": "Runs typescript type checker and linter on separate process.",
5
5
  "keywords": [
6
6
  "fast",