The Airbnb Way
As a developer, working in a team or collaborating with other developers is inevitable. How can we ensure all these different developers, program following the same pattern or standard?
A style guide.
What is a style guide?
A style guide is a set of standards that outline how code should be written and organized.
What is ESLint?
Like a Spell checker for spellings, ESLint is used to find problematic patterns or code that doesn’t adhere to certain style guidelines.
How to configure ESLint?
npm install eslint --save-dev
After installing, the next step is to set up your configuration file
The primary reason ESLint was created was to allow developers to create their own linting rules, which is what the Airbnb team did.
Although, I found using ESLint a little frustrating, it was the first time I had to make sure things were done the right way. Eventually, I came to appreciate it, as it fostered code readability and made my codes easy to maintain. It helped me remain consistent, careful and considerate while coding.
For more information on how to configure ESLint, please refer to this link: https://eslint.org/docs/user-guide/getting-started