Questions tagged [airbnb]

For questions about complying with one of Airbnb's JavaScript style guides (located on GitHub). For questions about ESLint configurations, use [eslint-config-airbnb] instead.

Airbnb offers several JavaScript style guides, for ES, Ruby, React, and more.

For more information about the Airbnb JavaScript style guide, visit https://github.com/airbnb/javascript

131 questions
51
votes
4 answers

Why does the Airbnb style guide say that relying on function name inference is discouraged?

// bad class Listing extends React.Component { render() { return
{this.props.hello}
; } } // bad (relying on function name inference is discouraged) const Listing = ({ hello }) => (
{hello}
); // good function…
xiaofan2406
  • 3,042
  • 3
  • 22
  • 33
50
votes
1 answer

Solving linter error no-undef for document

I am using airbnb extension for linting my React Project. Now, in my index.js I have: import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; ReactDOM.render( , document.getElementById('root'), ); linter…
FacundoGFlores
  • 6,508
  • 9
  • 53
  • 87