lo1tuma / eslint-plugin-mocha

ESLint rules for mocha
MIT License
281 stars 61 forks source link

[documentation] add overrides into docs #267

Closed dlqqq closed 3 years ago

dlqqq commented 4 years ago

Thanks for writing this plugin! I couldn't get this plugin to work without specifying env in my .eslint.json as follows:

  "overrides": [
    {
      "files": ["test/**/*.js"],
      "env": { "mocha": true }
    }
  ]

Since some people install the corresponding eslint plugin before using mocha (like me), we wouldn't know that we need to add this option before continuing, though it seems obvious in hindsight. Can you add this to the docs to save future people some time? Thanks.

lo1tuma commented 3 years ago

The overrides are not needed. I think you are referring to the env setting. However even the env setting is independent from this plugin. This plugin doesn’t do anything with that setting. I guess you got some error reported from ESLint core rules due to missing setting.