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.
I believe this is the configuration we want for React linting based on language options guide and the config in primer-react/recommended.
owenniblock
left a comment
There was a problem hiding this comment.
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?
lindseywild
left a comment
There was a problem hiding this comment.
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
parserOptionsfor thereactconfig. Let me know if this looks wrong though.Note
I plan to cut a new release following this PR.