Skip to content

Conversation

@pieh
Copy link
Contributor

@pieh pieh commented Jan 20, 2021

Description

#28911 introduced some problems in case user has their own .eslintrc specifically when using eslint that is incompatible with version used currently by gatsby (we use ^6 now, ^7 is latest).

This change disallow using .eslintrc for minimal required config for fast-refresh rules ( 1.). But this is not sufficent change. after dissalowing the use of it, we end up with:

 ERROR #98123  WEBPACK

Generating development JavaScript bundle failed


/Users/misiek/test/i29105/src/pages/index.jsx
  1:1  error  Parsing error: The keyword 'import' is reserved

So parserOptions were added (2.) to handle that part are pretty much copy&paste from https://github.com/facebook/create-react-app/blob/0f6fc2bc71d78f0dcae67f3f08ce98a42fc0a57c/packages/eslint-config-react-app/base.js#L29-L35 which we use for our default eslint-loader setting (for cases where .eslintrc doesn't exist and we provide some generic set of rules).

Related Issues

Fixes #29105

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jan 20, 2021
@pieh pieh added topic: webpack/babel Webpack or babel and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jan 20, 2021
Copy link
Contributor

@vladar vladar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

@pieh pieh merged commit 5f0d214 into master Jan 21, 2021
@pieh pieh deleted the minimal-eslint branch January 21, 2021 11:36
vladar pushed a commit that referenced this pull request Jan 21, 2021
vladar pushed a commit that referenced this pull request Jan 21, 2021
…) (#29128)

(cherry picked from commit 5f0d214)

Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
@vladar
Copy link
Contributor

vladar commented Jan 21, 2021

Published in gatsby@2.31.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: webpack/babel Webpack or babel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Overwhelmed by ESLint errors during gatsby develop after updating to Gatsby 2.31.0

3 participants