Node.js : Setup Minimal ESLint Config in 1 Minute

tanut aran
Mar 20, 2021

--

You can simple init the file by

$ eslint --init

and go through the interactive prompt

Minor Fix

Even when you choose Node in the interactive.

It shows few problem like Node’s default module , process is not defined.

So here is the fixes:

{
"env": {
"node": true, // <---- THIS LINE
"es2021": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"rules": {}
}

Hope this help.

Cheers !

--

--

tanut aran
tanut aran

Written by tanut aran

Co-founder and Coder at work !

No responses yet