Node.js : Setup Minimal ESLint Config in 1 Minute
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 !
CODEMONDAY - Web App | Mobile App | Digital & IT Solution and Software Development Company
Realize your idea and ship it online. web application, website, mobile, Digital & IT Solution, desktop applications, e-commerce. Want your business to shine in the digital world? We are here to help.
