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: add optional attr support #75

Merged
merged 7 commits into from
Feb 24, 2023

Conversation

tivac
Copy link
Contributor

@tivac tivac commented Feb 19, 2023

Fixes #74

Adds support for appending a ? to the end of an attribute config entry to make it optional. Optional attributes will be checked if they exist, but if they are missing and rule::whitelist is set it will not fail validation.

I'll update docs once this looks good to a maintainer.

@tivac
Copy link
Contributor Author

tivac commented Feb 19, 2023

Oops, checks on node 12 failed, probably because I used ??. I'll update here in a bit.

Copy link
Collaborator

@ericcornelissen ericcornelissen left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @tivac. The code changes looks pretty good already, I just have two suggestions for improvements.

Oops, checks on node 12 failed, probably because I used ??. I'll update here in a bit.

Thanks for pro-actively updating based on the CI results!

src/rules/attr.js Outdated Show resolved Hide resolved
test/attr.spec.js Outdated Show resolved Hide resolved
@ericcornelissen

This comment was marked as resolved.

@tivac

This comment was marked as resolved.

src/rules/attr.js Outdated Show resolved Hide resolved
Co-authored-by: Eric Cornelissen <ericornelissen@gmail.com>
@ericcornelissen ericcornelissen merged commit 1df672e into simple-icons:master Feb 24, 2023
@github-actions
Copy link

🎉 This PR is included in version 2.3.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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Whitelisting and optional attributes
2 participants