eslint-config-airbnb

Prevent using this.state within a this.setState (react/no-access-state-in-setstate)

For this piece of code, !this.state.dark I am getting an ESlint (airbnb config) error: Use callback in setState when referencing the previous state. I tried refactoring the code using following the ESlint documentation . But I'm having a hard time figuring it out. Any suggestions on how I can solve...

How do I set PropTypes for Higher Order Functional Component?

I'm using airbnb configuration for eslint and it's giving me this warning: [eslint] 'isLoading' is missing in props validation (react/prop-types) Is there a way to set PropTypes for isLoading? const withLoading = Component => ({ isLoading, ...rest }) => (isLoading ? <LoadingSpinner /> : <Component {...

JSX not allowed in files with extension &#39; .js&#39; with eslint-config-airbnb

I've installed eslint-config-airbnb that is supposed to pre configure ESLINT for React: Our default export contains all of our ESLint rules, including ECMAScript 6+ and React. It requires eslint, eslint-plugin-import, eslint-plugin-react, and eslint-plugin-jsx-a11y. My .eslintrc extending its...