iamturns / eslint-config-airbnb-typescript

Airbnb's ESLint config with TypeScript support
MIT License
1.05k stars 97 forks source link

react/static-property-placement for class components #243

Open penx opened 3 years ago

penx commented 3 years ago

As per the question here:

https://stackoverflow.com/q/57490998/1582783

and the issue here

https://github.com/airbnb/javascript/issues/2139

There is a conflict between TS and the airbnb eslint config on where to set defaultProps on a class based component.

Should eslint-config-airbnb-typescript override the react/static-property-placement setting in order to allow static defaultProps on class based components?

e.g. to 'react/static-property-placement': ['error', 'static public field']

penx commented 3 years ago

Also 👋 I realised we briefly worked together in 2016 😄

Thanks for this project!