You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[formatter.eslint]
command = "eslint"options = ["--fix", "--quiet"]
includes = [ "*.js", "*.jsx", "*.ts", "*.tsx" ] # But I'm not sure what to put here, as eslint is able to format MANY files 🤔excludes = []
It's a work project so I can't show you the whole flake, but here's the relevant part of my custom formatter config for ESLint, somewhat complicated to handle the fact that I'm using a monorepo with different configurations in different directories.
treefmt.config={settings={formatter={"eslint"={command=lib.getExepkgs.bash;options=["-euc"'' cd "$(dirname "$1")"${lib.getExe'pkgs.eslint"eslint"} --fix --quiet "$(basename "$1")" ''"--"];includes=["*.js""*.mjs""*.cjs""*.jsx""*.mjsx""*.ts""*.tsx""*.mtsx"];excludes=[];};};};};
(Originally requested in upstream: numtide/treefmt#537)
Would be awesome to have eslint integration - especially with the new formatter rules:
https://eslint.style/
I use https://github.com/antfu/eslint-config for most of my JS projects 👍
The text was updated successfully, but these errors were encountered: