Skip to content
This repository has been archived by the owner on Apr 19, 2021. It is now read-only.

Typescript in svelte files generate parser error when running eslint:fix #15

Closed
Evertt opened this issue Aug 25, 2020 · 2 comments
Closed
Labels
bug Something isn't working upstream This can only be solved by an upstream project's changes

Comments

@Evertt
Copy link

Evertt commented Aug 25, 2020

/Users/evert/Sites/sapper-cms/src/components/ExampleComponent.svelte
  2:19  error  Unexpected token  ParseError

/Users/evert/Sites/sapper-cms/src/routes/_error.svelte
  2:20  error  Unexpected token  ParseError

/Users/evert/Sites/sapper-cms/src/routes/_layout.svelte
  11:21  error  Unexpected token  ParseError

I tried making eslint aware of typescript in Svelte files by adjusting my config like so:

{
	"files": [
		"*.svelte"
	],
	"plugins": [
		"svelte3"
	],
	"parser": "@typescript-eslint/parser",
	"processor": "svelte3/svelte3",
	"rules": {
		"import/first": "off",
		"import/no-duplicates": "off",
		"import/no-mutable-exports": "off",
		"import/no-mutable-unresolved": "off",
		"no-undef": "off",
		"no-unused-vars": "off"
	}
}

See that I added the typescript parser? I thought that would help, but it made no difference whatsoever.

@babichjacob babichjacob added the upstream This can only be solved by an upstream project's changes label Aug 26, 2020
@babichjacob
Copy link
Owner

Dependent on upstream sveltejs/eslint-plugin-svelte3#10

@babichjacob babichjacob added the bug Something isn't working label Aug 26, 2020
@babichjacob
Copy link
Owner

Closing this issue to keep it upstream at babichjacob/sapper-typescript-graphql-template#23

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working upstream This can only be solved by an upstream project's changes
Projects
None yet
Development

No branches or pull requests

2 participants