0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 17:30:59 +01:00
svelte/test/validator
Maxime LUCE 0cf5511ae0
[feat] Add errorMode option to compile to allow continuing on errors (and mark them as warnings) (#6194)
This PR adds a new option errorMode to CompileOptions to allow continuing the compilation process when errors occured.
When set to warn, this new option will indicate to Svelte that it should log errors as warnings and continue compilation.

This allows (notably) preprocessors to compile the markup to detect vars in markup before preprocessing (in this case: script and style tags are stripped so it can produce a lot of errors).

This PR is part of a work on the svelte-preprocess side to improve the preprocessing of TypeScript files: https://github.com/sveltejs/svelte-preprocess/issues/318

- allow compiler to pass error as warnings
- enforce stops after errors during compilation (for type-checking, TS doesn't know the error method throws)
- should review Element.ts:302
- added a test case for errorMode
- added documentation
2021-07-17 13:37:29 +02:00
..
samples [feat] Add errorMode option to compile to allow continuing on errors (and mark them as warnings) (#6194) 2021-07-17 13:37:29 +02:00
index.ts fix: "foreign" namespace elements should still allow binding 'this' (#5942) 2021-01-29 13:31:23 -05:00