Closed tetsuok closed 1 year ago
I'd like to define the binary target to apply auto fix using the eslint's --fix
option. I want to avoid installing eslint
using package managers such as npm
or pnpm
.
eslint is a tricky one; this thread on Bazel slack may help https://bazelbuild.slack.com/archives/CEZUUKQ6P/p1677122456932899
@gregmagolan Thanks for the info, I'll take a look!
My plan for this is to make first-class support for eslint (with TypeScript of course) under https://github.com/aspect-build/rules_lint Come chat with us in slack.bazel.build in the #linting-wg channel if you'd like to get involved :)
I see there are three examples that define
eslint_bin.eslint_test
targets in this repo, but it is not trivial for me how to defineeslint_bin.eslint_binary
so that users can run the binary for TypeScript projects, usingtsconfig.json
and eslint config files that specify thetsconfig.json
file in theparserOptions.project
. It would be nice to have an example how to set up the eslint binary target.I've been trying to figure it out by modifying the
react-cra
example. Below is local changes I have in my machine:Below is the errors when I run the target
src:eslint_bin