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

fix(prefer-to-have-style): properly handle index access of style property #266

Merged
merged 4 commits into from
May 21, 2022

Conversation

G-Rath
Copy link
Collaborator

@G-Rath G-Rath commented May 20, 2022

What:

Resolves #264
Resolves #256

Why:

Currently the rule errors due to incorrect fixes.

How:

I've adjusted the rule to handle number literals differently.

Checklist:

  • Documentation
  • Tests
  • Ready to be merged

@G-Rath G-Rath added the bug Something isn't working label May 20, 2022
@codecov
Copy link

codecov bot commented May 20, 2022

Codecov Report

Merging #266 (8f39db1) into main (9b48d90) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main      #266   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           15        15           
  Lines          563       575   +12     
  Branches       158       165    +7     
=========================================
+ Hits           563       575   +12     
Impacted Files Coverage Δ
src/rules/prefer-to-have-style.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9b48d90...8f39db1. Read the comment docs.

@G-Rath
Copy link
Collaborator Author

G-Rath commented May 20, 2022

There's a bit of a inconsistency between when we report for indexed access vs not, but I think that's probably best tackled in another issue/PR - I think we should be warning on any use of style + equality(ish) matcher, but others might feel differently.

@G-Rath G-Rath merged commit 8de3593 into main May 21, 2022
@G-Rath G-Rath deleted the fix-prefer-to-have-style branch May 21, 2022 20:56
@github-actions
Copy link

🎉 This PR is included in version 4.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[prefer-to-have-style] support index accessing of style Results of weekly scheduled smoke test
2 participants