JavaScript is great! JavaScript is also full of features and flexible options that can make it easy to introduce bugs. ESLint uses static analysis to check that your code adheres to a list of rules to help you avoid some specific runtime errors. ESLint is highly configurable, so in this lesson, we'll install ESLint and configure some baseline rules for our boilerplate.
You can also use "settings": { "react": { "version": "detect", }, }
You can also use "settings": { "react": { "version": "detect", } }
Ok, final try to get rid of extra commas 😂 "settings": { "react": { "version": "detect" } }
Hrafnkell, that’s a great tip! Thanks for sharing!
Hello Andy,
May I ask what is the purpose of this -> Warning.displayName = 'Warning' ?
Thanks
Thanks so much for this lesson, so helpful.
Property displayName it's not needed because it's automatically set up to component name. It is only needed if you want display different name for debugging purposes. https://reactjs.org/docs/react-component.html#displayname
right, displayName is not strictly required. We’re applying it here to adhere to a lint rule that enforces some standard practices across a code base. Display name is derived from the component, but it’s useful to explicitly set one when using higher order components to create a new component. The displayName shows up in error messages and in the DevTools. Ultimately, if you don’t find this useful in your code, you can disable the lint rule.