behaviorbot / sentiment-bot

Replies to toxic comments with a maintainer designated reply and a link to the repo's code of conduct
https://github.com/apps/sentiment-bot
MIT License
83 stars 12 forks source link

Swap to standard linting #13

Closed hiimbex closed 7 years ago

hiimbex commented 7 years ago

Re: https://github.com/behaviorbot/welcome/issues/8 updating to standard linting, which means: in the package.json changing: https://github.com/behaviorbot/sentiment-bot/blob/3b0aff3ff3bbbb141fb5e0c305aa299f1ba4e78c/package.json#L8 to mocha && standard and removing the unnecssary dependecnies here: https://github.com/behaviorbot/sentiment-bot/blob/3b0aff3ff3bbbb141fb5e0c305aa299f1ba4e78c/package.json#L26-L35 (xo and the eslint one). Then installing standard with npm install --save-dev standard and then running standard --fix to lint all things standard.

You will probably also need to add to the package.json this:

"standard": {
    "env": [
      "mocha"
    ]
  },

so that our tests can operate without linting errors.

Then run npm test to make sure everything works! Let me know if you have any questions.

peterblazejewicz commented 7 years ago

FYI: This one is problematic, I've tried to fulfill an issue topic with current standard version from NPM and it is still subject of Error: Failed to load plugin import: Cannot find module 'eslint-plugin-import' problems described here: https://github.com/standard/standard/issues/949 Thanks!

hiimbex commented 7 years ago

Yep, I am aware of that issue, somewhat annoying :slightly_frowning_face: The solution is to either add npm install --save-dev eslint-plugin-import or simply use a different version of npm other than 5.2.0.

peterblazejewicz commented 7 years ago

npm install --save-dev eslint-plugin-import

As you wish. The other option is somehow doomed. Done!