You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(config): replace pathRegex with exclude (#2295)
Replace `pathRegex` by `exclude` which uses Glob patterns, similar to tsconfig `exclude` option. This will make it easier to configure files to exclude from type checking.
BREAKING CHANGE
One is currently using `pathRegex` should use `exclude` with Glob patterns
Copy file name to clipboardExpand all lines: src/compiler/__snapshots__/ts-compiler.spec.ts.snap
+2-2
Original file line number
Diff line number
Diff line change
@@ -53,9 +53,9 @@ exports[`TsCompiler isolatedModule false should compile codes with useESM true 1
53
53
//# "
54
54
`;
55
55
56
-
exports[`TsCompiler isolatedModule true diagnostics should report diagnostics related to codes with pathRegex config is undefined 1`] =`"foo.ts(2,23): error TS1005: '=>' expected."`;
56
+
exports[`TsCompiler isolatedModule true diagnostics should report diagnostics related to codes with exclude config is undefined 1`] =`"foo.ts(2,23): error TS1005: '=>' expected."`;
57
57
58
-
exports[`TsCompiler isolatedModule true diagnostics should report diagnostics related to codes with pathRegex config matches file name 1`] =`"foo.ts(2,23): error TS1005: '=>' expected."`;
58
+
exports[`TsCompiler isolatedModule true diagnostics should report diagnostics related to codes with exclude config matches file name 1`] =`"foo.ts(2,23): error TS1005: '=>' expected."`;
59
59
60
60
exports[`TsCompiler isolatedModule true jsx option should compile tsx file for jsx preserve 1`] =`
Copy file name to clipboardExpand all lines: website/docs/options/diagnostics.md
+6-4
Original file line number
Diff line number
Diff line change
@@ -20,9 +20,11 @@ The `diagnostics` option's value can also accept an object for more advanced con
20
20
-**`warnOnly`**: If specified and `true`, diagnostics will be reported but won't stop compilation (default: _disabled_).
21
21
-**`ignoreCodes`**: List of TypeScript error codes to ignore. Complete list can be found [there](https://github.com/Microsoft/TypeScript/blob/master/src/compiler/diagnosticMessages.json). By default here are the ones ignored:
22
22
-`6059`: _'rootDir' is expected to contain all source files._
23
-
-`18002`: _The 'files' list in config file is empty._ (it is strongly recommended to include this one)
23
+
-`18002`: _The 'files' list in config file is empty._ (it is strongly recommended including this one)
24
24
-`18003`: _No inputs were found in config file._
25
-
-**`pathRegex`**: If specified, diagnostics of source files which path does **not** match will be ignored.
25
+
-**`exclude`**: If specified, diagnostics of source files which path **matches** will be ignored. This works a bit
26
+
similar to `tsconfig` option [exclude](https://www.typescriptlang.org/tsconfig#exclude) with the only difference is that
27
+
in TypeScript, `exclude` will also exclude files from compilation process.
26
28
-**`pretty`**: Enables/disables colorful and pretty output of errors (default: _enabled_).
0 commit comments