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

Add color-hex-alpha rule #4891

Closed
wants to merge 21 commits into from
Closed

Conversation

ssivanatarajan
Copy link
Contributor

@ssivanatarajan ssivanatarajan commented Aug 8, 2020

Which issue, if any, is this issue related to?

Have added a new rule as discussed in issue #4880.

Is there anything in the PR that needs further explanation?

No need

@ssivanatarajan ssivanatarajan changed the title Added color-hex-alpha rule Add color-hex-alpha rule Aug 8, 2020
Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

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

@ssivanatarajan Thanks for the pull request. It's looking good.

I've requested some changes.

Can you also add the rule to the list in the docs, please?

lib/rules/color-hex-alpha/__tests__/index.js Show resolved Hide resolved
lib/rules/color-hex-alpha/__tests__/index.js Outdated Show resolved Hide resolved
lib/rules/color-hex-alpha/index.js Outdated Show resolved Hide resolved
lib/rules/color-hex-alpha/index.js Outdated Show resolved Hide resolved
lib/rules/color-hex-alpha/index.js Outdated Show resolved Hide resolved
lib/rules/color-hex-alpha/__tests__/index.js Show resolved Hide resolved
ssivanatarajan and others added 8 commits August 10, 2020 22:50
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
@ssivanatarajan
Copy link
Contributor Author

@jeddy3 Made the changes Please review it.

Copy link
Contributor Author

@ssivanatarajan ssivanatarajan left a comment

Choose a reason for hiding this comment

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

@jeddy3 Made the changes

@ssivanatarajan
Copy link
Contributor Author

@jeddy3 can u please review this PR

@ssivanatarajan
Copy link
Contributor Author

@jeddy3 any update on this ?

@ssivanatarajan
Copy link
Contributor Author

@ssivanatarajan Thanks for the pull request. It's looking good.

I've requested some changes.

Can you also add the rule to the list in the docs, please?

added

@ssivanatarajan
Copy link
Contributor Author

@jeddy3 is anything that needs to be changed /reviewed?

Copy link
Member

@jeddy3 jeddy3 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 making the changes.

I've looked through the PR again and requested some more changes.

lib/rules/color-hex-alpha/__tests__/index.js Outdated Show resolved Hide resolved
code: 'a { color: #{ff}; }',
description: 'scss interpolation',
},
],
Copy link
Member

Choose a reason for hiding this comment

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

Let's add an accept test for:

$var: #fff;

And a reject test for:

$var: #fffa;

The latter will likely fail until the if (!isStandardSyntaxDeclaration(decl)) return; conditional is removed.

lib/rules/color-hex-alpha/index.js Outdated Show resolved Hide resolved
lib/rules/color-hex-alpha/index.js Outdated Show resolved Hide resolved
if (!validOptions) return;

root.walkDecls((decl) => {
if (!isStandardSyntaxDeclaration(decl)) return;
Copy link
Member

Choose a reason for hiding this comment

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

Let's remove this as per #5010 (comment).

lib/rules/color-hex-alpha/index.js Outdated Show resolved Hide resolved
lib/rules/color-hex-alpha/__tests__/index.js Outdated Show resolved Hide resolved
lib/rules/color-hex-alpha/__tests__/index.js Outdated Show resolved Hide resolved
lib/rules/color-hex-alpha/__tests__/index.js Outdated Show resolved Hide resolved
lib/rules/color-hex-alpha/index.js Outdated Show resolved Hide resolved
ssivanatarajan and others added 7 commits January 4, 2021 08:08
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
ssivanatarajan and others added 2 commits January 4, 2021 18:46
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
@jeddy3 jeddy3 mentioned this pull request May 19, 2021
@jeddy3
Copy link
Member

jeddy3 commented May 29, 2021

Finished in #5316

@jeddy3 jeddy3 closed this May 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants