Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add checkAllStrings option #10

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

Merged
colebemis merged 4 commits into main from check-all-strings
Sep 24, 2021
Merged

Add checkAllStrings option #10

colebemis merged 4 commits into main from check-all-strings
Sep 24, 2021

Conversation

@colebemis
Copy link
Contributor

@colebemis colebemis commented Sep 21, 2021
edited
Loading

Adds a checkAllStrings option to the no-deprecated-colors rule.

If checkAllStrings is set to true, the no-deprecated-colors rule will check for deprecated colors in all strings. This is useful for catching uses of deprecated colors outside system props and the sx prop.

/* eslint primer-react/no-deprecated-colors: ["warn", {"checkAllStrings": true}] */
import {Box} from '@primer/components'
function ExampleComponent() {
 const styles = {
 // Enabling `checkAllStrings` will find deprecated colors used like this:
 color: 'text.primary'
 }
 return <Box sx={styles}>Hello</Box>
}

This option was needed to find all the uses of deprecated colors in Memex.

Copy link

changeset-bot bot commented Sep 21, 2021
edited
Loading

🦋 Changeset detected

Latest commit: 31d069b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
eslint-plugin-primer-react Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@colebemis colebemis changed the title (削除) Check all strings (削除ここまで) (追記) Add checkAllStrings option (追記ここまで) Sep 21, 2021
@colebemis colebemis marked this pull request as ready for review September 24, 2021 22:40
Copy link

@dusave dusave left a comment

Choose a reason for hiding this comment

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

👏🏻 Yes! This is a great addition!!

@colebemis colebemis merged commit 689672c into main Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@dusave dusave dusave approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /