How to create your own shared esLint, prettier and stylelint configuration

Stefan Natter
9 min readAug 23, 2018

Linters and code formatters make a developer’s life easier. They help you to follow coding and formatting standards, without constantly thinking about it. Or in other words, based on the great work the authors Sendhil Mullainathan and Eldar Shafir (Scarcity: Why Having Too Little Means So Much Kindle Edition): They reduce the tax on the cognitive bandwidth (bandwidth tax) and developers can focus on other actions.

Let’s take a look at the different coding styles, linters and the formatter prettier. How you can create your own configuration and use it in all your projects will be covered in this article. Let’s first talk about the basics.

Code Style Standards

What is a style guide and why do you need one?

Basically, a coding style guide is a set of rules, that define how proper code should look like and how it should be organized.

Why do you need one? Consider the following scenario. Three developers work for your company. John, Dan, and Jane. Each of them writes code differently. John prefers spaces, Dan tabs and Jane does not care. But Jane prefers semicolons, whereas the other two do not. That is fine, as long as they work on their own code. In the context of the company…

--

--

Stefan Natter
Stefan Natter

Written by Stefan Natter

I am a Software Engineer from Austria 🇦🇹. I write about JavaScript, TypeScript, ReactJS and NodeJS. 📧 Weekly NL Series: https://newsletter.natterstefan.me

No responses yet