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

Fixed 'is undefined' error and prop checking in Async example #2474

Closed
wants to merge 1 commit into from

Conversation

leiming
Copy link

@leiming leiming commented Jun 26, 2017

Fix the same error as #2464 #2459 for Async example.

If it is acceptable, I will fix all examples which includes #2469

@timdorr
Copy link
Member

timdorr commented Jun 26, 2017

Does our/CRA's eslint config not support class properties and statics?

@leiming
Copy link
Author

leiming commented Jun 27, 2017

Thanks for replying, @timdorr.

I think CRA's ESLint has supported babel-plugin-transform-class-properties. However it doesn't take effort in example cases.

I try to add a .eslintrc file in redux/examples/real-world/src, and even install both babel-plugin-transform-class-properties and babel-preset-react-app:

{
  "extends": "react-app",
  "plugins": ["transform-class-properties"]
}

then:

cd redux/examples/real-world/src
yarn add -D babel-preset-react-app babel-plugin-transform-class-properties
yarn start

It still throws error, seems ignore all ESLint config:

Failed to compile.

./src/containers/App.js
  Line 9:   'propTypes' is not defined           no-undef
  Line 18:  'handleDismissClick' is not defined  no-undef
  Line 23:  'handleChange' is not defined        no-undef

Search for the keywords to learn more about each error.

@timdorr
Copy link
Member

timdorr commented Jun 27, 2017

Oh, this looks like it's coming from the eslint install at the root of the repo: facebook/create-react-app#2604 (comment)

Downgrading back to eslint 3.x should fix it, I believe.

@leiming
Copy link
Author

leiming commented Jun 28, 2017

OK, I will keep track of facebook/create-react-app#2644

@timdorr
Copy link
Member

timdorr commented Jun 28, 2017

Since it's something that will be fixed upstream, I'll wait on that fix before making code changes here. Thanks for bringing this to our attention!

@timdorr timdorr closed this Jun 28, 2017
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.

2 participants