eslint-plugin-diff
eslint-plugin-diff copied to clipboard
clarify how to enable plugin in CI only
Hi, thanks for this great project!
The README.md says:
If you want to enable the plugin in CI only, you can use extend the config with the the plugin locally, but enable it
but this sentence doesn't really make sense. Based on other docs elsewhere, I guess that we should extend the config with plugin:diff/ci
and then ensure that the CI sets the environment variables CI
and ESLINT_PLUGIN_DIFF_COMMIT
- is that right?
What we do is follow the instructions to set the CI
and ESLINT_PLUGIN_DIFF_COMMIT
variables in our github workflow, then our .eslintrc.js file has the following
module.exports = { extends: [ ...(process.env.CI ? ['plugin:diff/ci'] : []),