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

Update README with component mapping setting #284

Merged
merged 4 commits into from Jul 22, 2022

Conversation

khiga8
Copy link
Contributor

@khiga8 khiga8 commented Jul 21, 2022

Context

In #283 we introduced a config that allows custom components to be mapped to an HTML element for our JSX rules.

Changes

This adds a README that explains how the component mapping works. I marked this feature as experimental because it is new and subject to change.

This PR also updates the parserOptions for the react config. Let me know if this looks wrong though.

Note

I plan to cut a new release following this PR.

@khiga8 khiga8 requested a review from a team July 21, 2022 19:54
@khiga8 khiga8 requested a review from a team as a code owner July 21, 2022 19:54
@khiga8 khiga8 requested a review from jfuchs July 21, 2022 19:54
@accessibility-bot
Copy link

👋 Hello and thanks for pinging us! An accessibility first responder will review this soon.

  • 💻 On PRs for our review: please provide a review environment with steps to validate, screenshots (with alt text), or videos demonstrating functionality we should be checking. This will help speed up our review and feedback cycle.
  • ⚠️ If this is urgent, please visit us in #accessibility on Slack and tag the first responder(s) listed in the channel topic.

sourceType: 'module',
ecmaFeatures: {
jsx: true
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe this is the configuration we want for React linting based on language options guide and the config in primer-react/recommended.

Copy link
Member

@owenniblock owenniblock left a comment

Choose a reason for hiding this comment

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

Great docs (especially the note on is the as isn't defined. I can't comment on the configuration change unfortunately, is there an easy way to test it before we merge?

README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@lindseywild lindseywild 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 adding these docs! ✨

Co-authored-by: Owen Niblock <owenniblock@github.com>
@khiga8
Copy link
Contributor Author

khiga8 commented Jul 22, 2022

@owenniblock I recently just learned that you can install npm packages from a github branch! I ran the following on dotcom:

npm i git://github.com/github/eslint-plugin-github.git#kh-add-docs-for-component-config  --save

The lint ran fine and caught some issues. But also I didn't run into issues with the previous config so I'm not really sure what I'm supposed to expect. This looks more right though...

@khiga8
Copy link
Contributor Author

khiga8 commented Jul 22, 2022

I guess I'll test this in memex too! If it looks good I shall merge this.

@khiga8 khiga8 merged commit 55f10dc into main Jul 22, 2022
@khiga8 khiga8 deleted the kh-add-docs-for-component-config branch July 22, 2022 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants