Skip to content

chore(components): create eslint rule for stencil props initialization #5505

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

Open
wants to merge 30 commits into
base: main
Choose a base branch
from

Conversation

myrta2302
Copy link
Contributor

@myrta2302 myrta2302 commented May 15, 2025

📄 Description

This PR introduces a custom ESLint rule that checks for any Stencil component @prop property that lacks an initial value, is not marked as optional (?), and is not explicitly marked as definitely assigned (!). It also adds design-system-eslint as a dependency to the components package.

Must be reviewed after #4651 is merged.

📝 Checklist

  • ✅ My code follows the style guidelines of this project
  • 🛠️ I have performed a self-review of my own code
  • 📄 I have made corresponding changes to the documentation
  • ⚠️ My changes generate no new warnings or errors
  • 🧪 I have added tests that prove my fix is effective or that my feature works
  • ✔️ New and existing unit tests pass locally with my changes

Copy link

changeset-bot bot commented May 15, 2025

⚠️ No Changeset found

Latest commit: 1ae2efc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@myrta2302 myrta2302 linked an issue May 16, 2025 that may be closed by this pull request
4 tasks
@swisspost-bot
Copy link
Contributor

swisspost-bot commented May 16, 2025

Related Previews

@myrta2302 myrta2302 added the 🚂 PR train PR which follows another one. label May 16, 2025
@myrta2302 myrta2302 marked this pull request as ready for review May 16, 2025 10:01
@myrta2302 myrta2302 requested a review from a team as a code owner May 16, 2025 10:01
@myrta2302 myrta2302 requested a review from alizedebray May 16, 2025 10:01
Copy link
Contributor

@alizedebray alizedebray left a comment

Choose a reason for hiding this comment

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

Waiting for prior PR's to be merged.

Copy link

sonarqubecloud bot commented Jun 2, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚂 PR train PR which follows another one.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create custom eslint rule for strict stencil props initialization
3 participants