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

feat: Adds negative z-index rule to stylelint #4

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

orangevolon
Copy link
Contributor

@orangevolon orangevolon commented Nov 12, 2024

Description

Following up the AWSUI-53531 issue, this rule is added to remind the devs to avoid negative z-index values.

Why not to use an existing stylelint rule?

  1. The existing stylelint rule is stylelint-z-index-value-constraint which despite having min and max values, doesn't support negative z-index values.
  2. Custom error message to explain "why" this value should not be used.
  3. Expanding it in the future to cover other z-index recommendations.

Related links, issue #, if available: AWSUI-55594

How has this been tested?

  1. Unit tests.
  2. Verified the build artifacts with the components repo.
Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link

codecov bot commented Nov 12, 2024

Codecov Report

Attention: Patch coverage is 95.55556% with 2 lines in your changes missing coverage. Please review.

Project coverage is 93.44%. Comparing base (9d4dc30) to head (0a3f65d).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/stylelint/index.js 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #4      +/-   ##
==========================================
+ Coverage   92.43%   93.44%   +1.01%     
==========================================
  Files           4        5       +1     
  Lines         185      229      +44     
  Branches       40       47       +7     
==========================================
+ Hits          171      214      +43     
- Misses         13       14       +1     
  Partials        1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@orangevolon orangevolon marked this pull request as ready for review November 12, 2024 09:53
@orangevolon orangevolon requested a review from a team as a code owner November 12, 2024 09:53
@orangevolon orangevolon requested review from michaeldowseza and removed request for a team November 12, 2024 09:53
@orangevolon orangevolon changed the title feat: Adds negative z-index rule feat: Adds negative z-index rule to stylelint Nov 12, 2024
@orangevolon orangevolon merged commit a88fceb into main Nov 14, 2024
38 checks passed
@orangevolon orangevolon deleted the feat/adds-negative-z-index-value-rule branch November 14, 2024 08:12
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