Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ParseError on SCSS in a single-file component #140

Closed
marekdedic opened this issue Oct 25, 2021 · 2 comments
Closed

ParseError on SCSS in a single-file component #140

marekdedic opened this issue Oct 25, 2021 · 2 comments

Comments

@marekdedic
Copy link

Hi,
I have the following .svelte file:

// ... rest of component

<style lang="scss">
@use "./_smui-theme.scss";
@use '@material/theme' as theme;

  .breadcrumb {
    cursor: pointer;
    color: theme.$primary;
  }
</style>

When trying to lint this, I get ParseError on the $ character. I thing it is trying to parse the SCSS as JS...

This started happening after upgrading to typescript-eslint v5

@Conduitry
Copy link
Member

Do you have a clonable repro of this not happening with this syntax? This plugin not dealing with languages that transpile to CSS is a known limitation, and is what https://github.com/sveltejs/eslint-plugin-svelte3#svelte3ignore-styles was created for.

@marekdedic
Copy link
Author

marekdedic commented Oct 25, 2021

Hi,
my bad, I didn't set ignore-styles :/ Thanks!

But yes, my code used to work just fine previously, e.g. https://github.com/skaut/shared-drive-mover/blob/33499b39decab6adc26fc7d20bdf825f4aff1fc8/src/frontend/App.svelte

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants