google / eslint-config-google

ESLint shareable config for the Google JavaScript style guide
Apache License 2.0
1.74k stars 140 forks source link

[added] JSX support #17

Closed appsforartists closed 7 years ago

appsforartists commented 8 years ago

Although we don't use JSX internally, we should still address it with our eslint config to support not only our own examples/tutorials, but also external parties who both want to follow our style guide and use React. Therefore, I've extended our rules to apply to JSX also.

These changes should be mostly innocuous for non-JSX code. The biggest impact is the switch to the babel-eslint parser. It's useful not-just for JSX, but for adding support for new JS features/proposals too. Overall, it seems more robust/configurable than the default parser, but it does introduce a new dependency (even for projects that aren't otherwise using Babel).

addyosmani commented 8 years ago

I'll take a look at this again shortly. Could we look at the Travis build failures @appsforartists? :) https://travis-ci.org/google/eslint-config-google/builds/139904799

appsforartists commented 8 years ago

Crap - it looks like I typoed package.json. Should have been "eslint-plugin-react": "5.2.2" (not config).

Will fix when I get to work, in 2ish hours. Left my laptop there last night.

addyosmani commented 8 years ago

@appsforartists Do we know what the latest status on internal conversations regarding JSX support for the config ended up? Is there any further follow-up work required here?

appsforartists commented 8 years ago

Honestly, I forgot I even had this open. Searched my e-mail and couldn't find the thread your asking about.