I am using Bazel rules in NodeJS in my application. The aim is to simply lint a set of files and fail the build if linting fails. What I'm currently experiencing is that the build is successful despite lint errors.
Here's a part of my BUILD file:
load("@npm//htmlhint:index.bzl", "htmlhint")
filegroup(
    name = "htmldata",
    srcs = glob(["**/*.html"]),
)
htmlhint(
  name = "compile",
  data = [
      "htmlhint.conf",
      "//:htmldata"
  ],
  args = [
      "--config",
      "htmlhint.conf",
      "$(locations //:htmldata)"
  ]
)
I first load the hinting library, then I define a filegroup for all the HTML files that I want to lint. Afterward, I use the rule with its data and arguments.
To run the build, I use the default option via npm script: bazel build //...
 
    