eslint-plugin-react
eslint-plugin-react copied to clipboard
Can we separate 'utils' into its own package?
Are there any plans to make the lib/util directory its own package?
I ask as i was looking to create my own JSX-aware eslint rules and it would be super handy to use the existing code from this repo.
I'm fully aware that doing this will likely add more on-going work (managing multiple repos/monorepo etc) with no real payoff so its understandable if this not a priority.
I think you’ve nailed it; you can already require any file in the package that you want, so you can depend on this plugin for it at the risk that it’s not part of the public API, so it might break in a non-major.
I’ll look into extracting it, though, since there might be a benefit for eslint-plugin-jsx-a11y.
Fantastic!
If theres anything I can do to assist I'd be more than happy to help.
I think we wouldn't be making the whole directory separate, so it might help if you could list which parts you'd want to leverage.
I found the Components and jsx files helpful.
I was specifcally creating some rules based off of identifying a function as returning JSX or not.
I havent used it yet, but also have some ideas around using the props utils too.
Adding a +1 to this request with the additional context that I'm looking to figure out whether a given ESLint node is a component or not. As a result, utils/Components would be massively helpful for our needs.