Skip to content

Parsing fails on script tag when id is empty #219

Closed
@shirotech

Description

@shirotech

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I'm using eslint-plugin-svelte. (*.svelte file linting does not work with the parser alone. You should also use eslint-plugin-svelte with it.)
  • I'm sure the problem is a parser problem. (If you are not sure, search for the issue in eslint-plugin-svelte repo and open the issue in eslint-plugin-svelte repo if there is no solution.
  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.

What version of ESLint are you using?

8.23.1

What version of eslint-plugin-svelte and svelte-eslint-parser are you using?

  • svelte-eslint-parser@0.18.2
  • eslint-plugin-svelte@2.8.0

What did you do?

Configuration
<!-- Paste your configuration here -->
<head>
  <slot/>
  <link href="/style.css" rel="stylesheet">
  <script id="">const foo = 'Anything goes here';</script>
</head>

What did you expect to happen?

No error

What actually happened?

Parsing error: </script> attempted to close an element that was not open

Link to Minimal Reproducible Example

Not required

Additional comments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions