Skip to content

Commit

Permalink
docs: warn about the typescript parser being a singleton (#423)
Browse files Browse the repository at this point in the history
Signed-off-by: JP-Ellis <josh@jpellis.me>
  • Loading branch information
JP-Ellis committed Mar 28, 2023
1 parent e8bec77 commit de1fd3d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,17 @@ module.exports = {

See also <https://github.com/ota-meshi/svelte-eslint-parser#readme>.

::: warning ❗ Attention

The TypeScript parser uses a singleton internally and it will only use the
options given to it when it was first initialized. If trying to change the
options for a different file or override, the parser will simply ignore the new
options (which may result in an error). See
[typescript-eslint/typescript-eslint#6778](https://github.com/typescript-eslint/typescript-eslint/issues/6778)
for some context.

:::

#### settings.svelte

You can change the behavior of this plugin with some settings.
Expand Down
11 changes: 11 additions & 0 deletions docs/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,17 @@ module.exports = {

See also <https://github.com/ota-meshi/svelte-eslint-parser#readme>.

::: warning ❗ Attention

The TypeScript parser uses a singleton internally and it will only use the
options given to it when it was first initialized. If trying to change the
options for a different file or override, the parser will simply ignore the new
options (which may result in an error). See
[typescript-eslint/typescript-eslint#6778](https://github.com/typescript-eslint/typescript-eslint/issues/6778)
for some context.

:::

#### settings.svelte

You can change the behavior of this plugin with some settings.
Expand Down

0 comments on commit de1fd3d

Please sign in to comment.