Closed lkleuver closed 2 months ago
I don't mind enabling the rule all the time without the 'development/production' difference.
If we do want to only enable it for 'production' we need to change the GitHub Actions check to also include the new environment variable.
I quite often use console.log during development (hence this PR) so enabling it in dev gives a constant stream of errors.
I changed it so that npm run lint
uses ESLINT_ENV=production
, that should still leave the rule disabled in your IDE (I assume it calls eslint
directly). This way it is also enabled in GitHub Actions.
Add a rule that prevents committing console.log statements (warn and error are allowed) the rule is only active when running through lefthook but not during development.