-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
feat: add eslint loader to webpack config #4893
Conversation
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.
Looks great!
graphql: true, | ||
}, | ||
extends: `react-app`, | ||
plugins: [`graphql`], |
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.
You need to connect this too our GraphQL schema still right?
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.
The schema is in the store so should be easy to pop into here:
store.dispatch({ |
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.
ah good catch! thank you! 🙏
BTW, just wanted to double-check this works in the overlay? |
Oh, I need to check overlay too, will do that! 👍 |
e2477ca
to
62f5e0e
Compare
I've integrated the schema into eslint config and ensured proper overlay behavior, i.e. it shows overlay for errors but not warnings Let me know if I need to do anything else! |
Signed-off-by: Kurtis Kemple <[email protected]>
62f5e0e
to
a27c133
Compare
Thanks! |
This adds eslint-loader to webpack config using
eslint-config-react-app
andeslint-plugin-graphql
. This closes #1287 and closes #1564.Some notes:
This uses config very similar to what
Create React App
uses except it adds GraphQL support via theeslint-plugin-graphql
rules.I used CRA as a guideline for dependency placement in package.json. I know @KyleAMathews mentioned making eslint a peer dep in #1564.
I would love some feedback and it would be great to get this in a couple projects for confirmation!