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

feat: add eslint loader to webpack config #4893

Merged
merged 1 commit into from
Apr 14, 2018
Merged

Conversation

kkemple
Copy link
Contributor

@kkemple kkemple commented Apr 9, 2018

This adds eslint-loader to webpack config using eslint-config-react-app and eslint-plugin-graphql. This closes #1287 and closes #1564.

apr-13-2018 15-42-54

Some notes:
This uses config very similar to what Create React App uses except it adds GraphQL support via the eslint-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!

@ghost ghost assigned kkemple Apr 9, 2018
@ghost ghost added the review label Apr 9, 2018
Copy link
Contributor

@KyleAMathews KyleAMathews left a 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`],
Copy link
Contributor

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?

Copy link
Contributor

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:

Copy link
Contributor Author

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! 🙏

@KyleAMathews
Copy link
Contributor

BTW, just wanted to double-check this works in the overlay?

@kkemple
Copy link
Contributor Author

kkemple commented Apr 10, 2018

Oh, I need to check overlay too, will do that! 👍

@m-allanson m-allanson removed the review label Apr 13, 2018
@kkemple kkemple force-pushed the topics/add-eslint-loader branch from e2477ca to 62f5e0e Compare April 13, 2018 19:41
@kkemple
Copy link
Contributor Author

kkemple commented Apr 13, 2018

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!

@kkemple kkemple force-pushed the topics/add-eslint-loader branch from 62f5e0e to a27c133 Compare April 14, 2018 12:51
@KyleAMathews
Copy link
Contributor

Thanks!

@KyleAMathews KyleAMathews merged commit f086f7e into v2 Apr 14, 2018
@KyleAMathews KyleAMathews deleted the topics/add-eslint-loader branch April 14, 2018 21:23
@kkemple kkemple mentioned this pull request Apr 16, 2018
@eleith eleith mentioned this pull request May 17, 2018
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.

3 participants