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
Copy file name to clipboardExpand all lines: README.md
+28-3Lines changed: 28 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -169,7 +169,7 @@ At this time, the build artifacts can include all syntax supported by ES2020, su
169
169
- **Type:** `RegExp | RegExp[]`
170
170
- **Default:** `undefined`
171
171
172
-
`exclude` is used to exclude a portion of source files during detection. You can pass in one or more regular expressions to match the paths of source files. Files that match the regular expression will be ignored and will not trigger syntax checking.
172
+
Excludes a portion of source files during detection. You can pass in one or more regular expressions to match the paths of source files. Files that match the regular expression will be ignored and will not trigger syntax checking.
173
173
174
174
- **Example:**
175
175
@@ -186,7 +186,7 @@ pluginCheckSyntax({
186
186
- **Type:** `RegExp | RegExp[]`
187
187
- **Default:** `undefined`
188
188
189
-
`excludeOutput` is used to exclude a portion of output files before detection. You can pass in one or more regular expressions to match the paths of output files. Files that match the regular expression will be ignored and will not trigger syntax checking.
189
+
Excludes a portion of output files before detection. You can pass in one or more regular expressions to match the paths of output files. Files that match the regular expression will be ignored and will not trigger syntax checking.
190
190
191
191
- **Example:**
192
192
@@ -198,12 +198,37 @@ pluginCheckSyntax({
198
198
});
199
199
```
200
200
201
+
### excludeErrorMessage
202
+
203
+
- **Type:** `RegExp | RegExp[]`
204
+
- **Default:** `undefined`
205
+
206
+
Excludes files by error message (reason) before detection. You can pass in one or more regular expressions to match the error messages. Files that match the regular expression will be ignored and will not trigger syntax checking.
207
+
208
+
- **Example:**
209
+
210
+
For example, to ignore the error messages when using dynamic import:
211
+
212
+
```ts
213
+
pluginCheckSyntax({
214
+
excludeErrorMessage: /'import' and 'export' may only appear at the top level/,
215
+
});
216
+
```
217
+
218
+
Or ignore the error messages when using `let` or `const` keywords:
219
+
220
+
```ts
221
+
pluginCheckSyntax({
222
+
excludeErrorMessage: /The keyword '(let|const)' is reserved/,
0 commit comments