-
Notifications
You must be signed in to change notification settings - Fork 0
Back-pin eslint-plugin-react to avoid linting syntax errors #11
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
Conversation
The recent release of [eslint-plugin-react#7.15.0](https://github.com/yannickcr/eslint-plugin-react/releases/tag/v7.15.0) chokes any time it runs into a property with JSX inside it ([example code](https://github.com/fs-webdev/babylon/blob/master/packages/person/src/Person.js#L391)). Example error from babylon: > TypeError: Cannot read property 'substring' of undefined Occurred while linting /Users/clif/sandbox/frontier/fs-components/babylon/packages/attribution/src/Attribution.js:45 at Object.fix (/Users/clif/sandbox/frontier/fs-components/babylon/node_modules/eslint-plugin-react/lib/rules/jsx-curly-brace-presence.js:129:30) at normalizeFixes (/Users/clif/sandbox/frontier/fs-components/babylon/node_modules/eslint/lib/util/report-translator.js:176:28) at args (/Users/clif/sandbox/frontier/fs-components/babylon/node_modules/eslint/lib/util/report-translator.js:278:18) at Object.report (/Users/clif/sandbox/frontier/fs-components/babylon/node_modules/eslint/lib/linter.js:721:41) at reportUnnecessaryCurly (/Users/clif/sandbox/frontier/fs-components/babylon/node_modules/eslint-plugin-react/lib/rules/jsx-curly-brace-presence.js:117:15) at lintUnnecessaryCurly (/Users/clif/sandbox/frontier/fs-components/babylon/node_modules/eslint-plugin-react/lib/rules/jsx-curly-brace-presence.js:198:9) at JSXExpressionContainer (/Users/clif/sandbox/frontier/fs-components/babylon/node_modules/eslint-plugin-react/lib/rules/jsx-curly-brace-presence.js:278:11) at listeners.(anonymous function).forEach.listener (/Users/clif/sandbox/frontier/fs-components/babylon/node_modules/eslint/lib/util/safe-emitter.js:45:58) at Array.forEach (<anonymous>) at Object.emit (/Users/clif/sandbox/frontier/fs-components/babylon/node_modules/eslint/lib/util/safe-emitter.js:45:38)
This is totally breaking our linting hardcore, this morning (https://travis-ci.com/fs-webdev/babylon/builds/129871120). |
Does this appear to be the underlying issue? |
Need to update the package-lock |
Potentially. We often spread props into our JSX sub-elements. There's no way I can manage four months' worth of changes on your package lock. |
you don't. you delete it, rebuild, and commit it again typically |
Rephrase: There is no way that I can verify full functionality for the 50 other changes that would consume. |
Thanks for figuring this out. It seems to also be blocking our PR https://github.com/fs-webdev/zion/pull/562 |
The recent release of eslint-plugin-react#7.15.0 chokes any time it runs into a property with JSX inside it (example code).
Example error from babylon: