Skip to content
This repository was archived by the owner on Apr 19, 2021. It is now read-only.
This repository was 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

Description

@Evertt
/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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingupstreamThis can only be solved by an upstream project's changes

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions