We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ignoreCase
If we define rule this way:
"rules": { "react/sort-prop-types": [2, {"ignoreCase": true}] }
and if we have class with the following piece of code:
import {Component} from 'react'; const spread = { a: PropTypes.string, b: PropTypes.object, } export default class ClassWithSpreadInPropTypes extends Component { static propTypes = { ...spread, c: PropTypes.string } }
then we have the following error: TypeError: Cannot read property 'toLowerCase' of undefined
TypeError: Cannot read property 'toLowerCase' of undefined
eslint-plugin-react version 4.1.0
eslint-plugin-react
The text was updated successfully, but these errors were encountered:
I was not able to reproduce the crash.
What versions of eslint and babel-eslint are you using?
eslint
babel-eslint
Sorry, something went wrong.
Sorry, it seems that spread operator is not the only reason of this crash (my previous example is not valid). That is valid:
a.js
import {Component, PropTypes} from 'react'; export default class BaseClass extends Component { static propTypes = { a: PropTypes.string, b: PropTypes.object } }
b.js
import {PropTypes} from 'react'; import BaseClass from 'a'; export default class ClassWithSpreadInPropTypes extends BaseClass { static propTypes = { ...BaseClass.propTypes, c: PropTypes.string } }
versions:
"babel-eslint": "5.0.0", "eslint": "1.10.3", "eslint-plugin-react": "4.1.0"
0b2a18b
No branches or pull requests
If we define rule this way:
and if we have class with the following piece of code:
then we have the following error:
TypeError: Cannot read property 'toLowerCase' of undefined
eslint-plugin-react
version 4.1.0The text was updated successfully, but these errors were encountered: