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(rules): added rule for prefer-to-have-class #118

Merged
merged 6 commits into from
Dec 3, 2020

Conversation

benmonro
Copy link
Member

@benmonro benmonro commented Dec 3, 2020

What: a new rule for prefer-to-have-class

Why: all the matchers!

How:

Checklist:

  • Documentation
  • Tests
  • Ready to be merged

@codecov
Copy link

codecov bot commented Dec 3, 2020

Codecov Report

Merging #118 (f0470db) into master (043e7bf) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #118   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           13        14    +1     
  Lines          259       312   +53     
  Branches        37        42    +5     
=========================================
+ Hits           259       312   +53     
Impacted Files Coverage Δ
src/rules/prefer-to-have-class.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 043e7bf...f0470db. Read the comment docs.

@benmonro
Copy link
Member Author

benmonro commented Dec 3, 2020

@AntonNiklasson mind giving this a once over? if you think of any additional use cases let me know.

Copy link
Contributor

@AntonNiklasson AntonNiklasson left a comment

Choose a reason for hiding this comment

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

Just a few minor things. Also, did you consider supporting something like el.classList.contains('foo') here?

docs/rules/prefer-to-have-class.md Outdated Show resolved Hide resolved
docs/rules/prefer-to-have-class.md Outdated Show resolved Hide resolved
docs/rules/prefer-to-have-class.md Show resolved Hide resolved
@benmonro benmonro merged commit 00b65fa into master Dec 3, 2020
@benmonro benmonro deleted the feature/prefer-to-have-class branch December 3, 2020 19:15
@github-actions
Copy link

github-actions bot commented Dec 3, 2020

🎉 This PR is included in version 3.6.0 🎉

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants