Skip to content

feat: add css-baseline preset #887

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

Merged
merged 3 commits into from
Jul 23, 2025
Merged

feat: add css-baseline preset #887

merged 3 commits into from
Jul 23, 2025

Conversation

sakupi01
Copy link
Collaborator

@sakupi01 sakupi01 commented Jul 8, 2025

🏁 Outline

This PR mainly adds a ruleset that checks Baseline Widely Available feature for CSS.

📝 Description

@eslint/css has been added, as well as the minimum common rules.

  • css/use-baseline: warns on the feature that is less than Widely Available
  • css/no-duplicate-imports: errors on the duplicated @import declarations
  • tolerant parsing: use the browser parse error reconciliation

✅ Test

The tests mainly check:

  • flat config syntax
  • css/use-baseline & css/no-duplicate-imports error/success cases

see,
test/flat/preset-css-baseline-test.js

@sakupi01 sakupi01 requested review from b4h0-c4t and sajikix as code owners July 8, 2025 06:08
@sakupi01 sakupi01 self-assigned this Jul 8, 2025
@sakupi01 sakupi01 changed the title add @eslint/css & baseline rules feat: add css-baseline preset Jul 8, 2025
@@ -76,8 +76,6 @@ module.exports = {

### `eslint.config.js` (Flat Config)

> [!NOTE]
> Flat Config support is experimental. The applicable rules and scope may have changed.

Choose a reason for hiding this comment

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

👍

},
},
]
};

Choose a reason for hiding this comment

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

Could you please run Prettier formatting on this code?

Copy link
Contributor

@sajikix sajikix Jul 23, 2025

Choose a reason for hiding this comment

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

↑ fixed ! 👍 🙏

Copy link
Contributor

@sajikix sajikix left a comment

Choose a reason for hiding this comment

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

LGTM!

@sajikix sajikix merged commit 8bca849 into master Jul 23, 2025
4 checks passed
@sajikix sajikix deleted the css/baseline branch July 23, 2025 01:53
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.

3 participants