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

build(lint): use native stylelint config resolution #350

Merged
merged 4 commits into from
Nov 21, 2023
Merged

build(lint): use native stylelint config resolution #350

merged 4 commits into from
Nov 21, 2023

Conversation

uncenter
Copy link
Member

Prevent errors on custom elements in #346, see #346 (comment).

@uncenter uncenter marked this pull request as ready for review November 21, 2023 04:19
@nekowinston
Copy link
Contributor

I really liked the added typo protection that selector-type-no-unknown added, and I think it's rare enough where a workaround for each userstyle isn't that much effort. I'll push what I came up with.

@nekowinston
Copy link
Contributor

Lichess lint passes for me when I create ./styles/lichess/.stylelintrc.json with:

{
  "rules": {
    "selector-type-no-unknown": [
      true,
      { "ignore": ["signal", "index", "fill"] }
    ]
  }
}

@nekowinston
Copy link
Contributor

8ed27aa works but this really isn't getting any more maintainable.
Luckily it turned out that turning on nodeModulesDir and not passing in config into stylelint.lint does everything we want for us.

The config file will have to include an extends to the repo root, compared to the previous impl:

{
  "extends": "../../.stylelintrc.js",
  "rules": {
    "selector-type-no-unknown": [true, { "ignore": ["signal", "index", "fill"] }]
  }
}

Copy link
Contributor

@nekowinston nekowinston left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think this should do it.

@nekowinston nekowinston changed the title fix(lint): disable selector-type-no-unknown build(lint): use native stylelint config resolution Nov 21, 2023
@nekowinston nekowinston merged commit c7344a5 into catppuccin:main Nov 21, 2023
6 checks passed
@uncenter
Copy link
Member Author

That's way better, thanks!

@uncenter uncenter deleted the patch-1 branch November 22, 2023 02:14
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

Successfully merging this pull request may close these issues.

2 participants