optimism
optimism copied to clipboard
CI not surfacing certain linting issues
Describe the bug I noticed that CI is not surfacing certain linting issues. For example, this CI run had a linting warning but completed successfully. I think these sort of warnings should be treated as errors since we inevitably have to go back and fix the linting issues eventually anyway. Might as well catch the problems up front.
Expected behavior CI linting warnings like the one linked above should be treated as errors so that we can catch issues up front.
If I'm not mistaken, simple lint issues are being automatically fixed before checking, in the current setup.
Since this is being used: yarn lint:fix && yarn lint:check
But in the case of integration-test/package.json we would need to change it in order to be the same as in every other place.
"lint": "yarn lint:fix && yarn lint:check",
"lint:fix": "yarn lint:check --fix", => needs to be => "lint:fix": "eslint . --fix",
"lint:check": "eslint .",
And if you want it to fail on warning in CI, then this fix step should be removed and probably added --max-warnings=0 while running eslint.
@0xB548E I think CI is currently set up to execute lint:check as to not automatically fix the issues before reporting warnings. But I am a bit confused because other lint warnings do usually show up as linting failures but this warning does not. I'll try to make a branch to see what's going on...