Shenrak/neKo

Linting

Opened this issue · 3 comments

Because @Shenrak closed #4, I'm saying this here.

Linting the code is extremely important

You have the following options:

  • Use eslint and figure out a configuration.
  • Use standard and understand the choices (no semicolon, commas...)

I prefer standard, because its choices do make sense, and it's just a npm i --save-dev standard away.

But I'd like that #6 is fixed before doing so

Okay so I've finally gone with xo, which is a bit like standardjs (not much config), but with the possibility to configure a bit more.

Right now, it checks only before pushing, but don't hesitate to run npm run lint to run xo.

The best approach is still to use one of the editor plugins, and this is explained in the README.
But keep in mind that most of the time, the plugin will only lint one file at a time, so you might miss some errors. To catch them, just use npm run lint.

The tests are configured to pass only if xo doesn't output any errors.

Anyway, I'm satisfied with the current state, but we should keep this issue opened if you have some problems setting up the linter.

@Shenrak, could you please give it a go?