-
Notifications
You must be signed in to change notification settings - Fork 10
Basic ESLint setup
Michael Hulse edited this page Mar 10, 2019
·
2 revisions
$ npm i -D eslint
// This will help you to generate an eslint file:
$ ./node_modules/.bin/eslint --init
$ npm i -g eslint
$ eslint --init
$ ./node_modules/.bin/eslint --init
? How would you like to use ESLint? To check syntax and find problems
? What type of modules does your project use? CommonJS (require/exports)
? Which framework does your project use? None of these
? Where does your code run? (Press <space> to select, <a> to toggle all, <i> to invert selection)Browser
? What format do you want your config file to be in? JavaScript
Successfully created .eslintrc.js file in /Users/mhulse/dev/github/mhulse/parallel-image-downloader
module.exports = {
"env": {
"browser": true,
"commonjs": true,
"es6": true
},
"extends": "eslint:recommended",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018
},
"rules": {
}
};