Hello!
I know Google generally doesn’t use Blaze/Bazel for linting, but I have seen conflicting opinions online and don’t necessarily understand why. I was looking into doing so for our NodeJS project. The main motivations here are twofold:
- Ideally, all major tasks (lint/build/test/maybe deploy) would be done using the same interface in every project/language. I think Bazel is great for this.
- Package.json sucks. I’d like to have a better way to define my build/test/lint scripts in a modular way that allows me to separate out common scripts to packages used by multiple projects and have more/clearer control over the process. The main
things I want more control over are
- Dependencies
- Sources to lint
- Formatting of the script definitions
- COMMENTS!!!
Now, using Bazel for linting is not a hill I will die on. I could be convinced that it is a bad idea, and accept that maybe I just don’t fully understand the reasoning yet. All I really got for arguments against is that a build system should only
be used for producing build artifacts, but I don’t really see why that matters. I also would argue that, if that were the case, wouldn’t it also not be used for testing or deployment? Anyway, if someone wants to provide arguments either way, I’m all ears,
but would also like to hear more about how this could be done.
Thanks!