3 ms·
What if the diff adds a new linter rule, should we only run it on the linter config file? What if the linter uses more context than a single file, a type-check
by OJFord 3y ago
What if the diff adds a new linter rule, should we only run it on the linter config file?
What if the linter uses more context than a single file, a type-checker for example or even just checking the correct number of arguments (regardless of type) are passed to an imported function - or that that symbol is indeed even callable? Should we only run the linter on the caller's file, or the callee's, when they haven't both changed?
- ehutch79 3y agoRun the linter on the code base then, when you make the change? Not every check-in on the off chance a rule changed. Or, add some logic that the CI runs it against the whole code base only when the rules changed, otherwise just the relevant files to the commit/pr Also, ESLint doesn't do type checking. That's typescripts job, and apparently typescripts runtime isn't an issue.