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
Conversation
👋 Hello and thanks for pinging us! An accessibility first responder will review this soon.
|
sourceType: 'module', | ||
ecmaFeatures: { | ||
jsx: true | ||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this 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?
There was a problem hiding this 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>
@owenniblock I recently just learned that you can install npm packages from a github branch! I ran the following on dotcom:
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... |
I guess I'll test this in |
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 thereact
config. Let me know if this looks wrong though.Note
I plan to cut a new release following this PR.