Day 31

aronson(25)
Published in
#code
Words
175
Reading
1 min
Listen
Play
9y

February 13th 2018

Hello! At the ES6 course by Wes Bos I learned some more about about ESLint, how to use it and how to set it up in Sublime Text Editor. We used the Airbnb style guide, in other words Airbnb has its own lint which we can use to check our code. To install it we have to write the following in the terminal

npm install -g  eslint-config-airbnb eslint-plugin-import eslint-plugin-react eslint-plugin-jsx-a11y

Also, we have to change the eslintrc file by adding “airbnb” to “extends,
{
"env": {
"es6": true,
"browser": true
},
"extends":"airbnb",
"rules": {
"no-console": 0
}
}

In order to make eslint fix problems in our code we can use:

         eslint bad-code.js --fix  to fix problems

Furthermore there are plugins that can be installed to check non js files for errors too.

          npm install -g eslint-plugin-html

However, you cannot use --fix on html or markdown files.

At the Web Development Bootcamp I learned some more about Backend development, and started to use a cool development platform Cloud9 for making apps.
Cheers!

Day 31 | Ecency