DanyDin1801 / Product-Portal

0 stars 2 forks source link

Setup linter with Airbnb JavaScript style guide #19

Open arreche opened 8 years ago

arreche commented 8 years ago

Run it with: npm run lint

rhgksrua commented 8 years ago

When eslint detects any errors, it will exit with non zero status. Right now, if there is an error with eslint, npm will also error. Si it looks like eslint isn't working correctly. Running eslint public test || true or npm run lint --silent will hide npm errors.

I actually don't care if npm shows its own errors, but others might get confused.

Also, if any one is running npm version 3 or greater, it doesn't install peer dependencies automatically. So npm run lint will break.

rhgksrua commented 8 years ago

Right now it looks like the current airbnb config is for ES6. You might have to switch to eslint-config-airbnb-base package and use airbnb-base/legacy in eslint.js to lint ES5. Also, adding another package to suppress jasmine errors would nice (errors for describe and expect).

rhgksrua commented 8 years ago

I have some things I realized while I was running the linter.

rhgksrua commented 8 years ago

Everything looks good. You should merge it once another person takes a look.