Skip to content

Add support for CSS linting with @eslint/css #713

Open
@marekdedic

Description

@marekdedic

Description

When I implemented CSS parsing, I used PostCSS to do it. Now it seems that eslint itself is steering towards using CSSTree and implements (so far quite limited) CSS linting in @eslint/css.

I think we should aim to:

  1. Enable using @eslint/css rules in Svelte files
  2. Keep existing eslint-plugin-svelte rules working

To that end, we'd need to:

  1. Migrate everything from PostCSS to CSSTree
  2. Probably parse the CSS all the time, not just on-demand like we currently do
  3. Implement SCSS (and other preprocessors) ourselves, since CSSTree explicitly doesn't aim to support them

Open Questions:

  1. Does Eslint even support multiple languages in one file? Eslint is going the way of multi-language support, but so far it seems like only one language at time is supported (not sure, but see Bug: Cannon use processor and recommended configs together eslint/markdown#353)
  2. How do we go about preprocessors?

I am willing to do some work on this eventually, but I think some discussion is needed first... Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions