Because wtf would you have --stdin and not --stdout…
  • JavaScript 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2024-03-28 12:58:20 -05:00
src i mean, this should work… 2024-03-27 17:20:39 -05:00
.gitignore Init it to win it 2024-03-25 15:03:08 -05:00
bun.lockb Init it to win it 2024-03-25 15:03:08 -05:00
package.json as good as it gets for now 2024-03-28 12:58:20 -05:00
README.md as good as it gets for now 2024-03-28 12:58:20 -05:00

eslint-formatter-stdout

npm install eslint-formatter-stdout

Does this work?

cat $PATH_TO_FILE | eslint --format stdout --stdin --fix-dry-run --stdin-filename $PATH_TO_FILE

No.

Well, does this work?

cat $PATH_TO_FILE | eslint --format eslint-formatter-stdout --stdin --fix-dry-run --stdin-filename $PATH_TO_FILE

No.

Does this package work at all?

Yeah, but not like you want it to. Why? Who knows. But if you set --format to the fully qualified path of the formatter index.js it works.

cat $PATH_TO_FILE | eslint --format "$PATH_TO_NODE_MODULES/eslint-formatter-stdout/src/index.cjs" --stdin --fix-dry-run --stdin-filename $PATH_TO_FILE

Why do you have to do something stupid like this? Idk—take it up with eslint. Their docs indicate that it automatically looks in node_modules for packages starting with eslint-formatter-.

But how do I see the linting errors and warnings?

Literally every other formatter does that. If you don't have a use for printing the linted code to stdout instead you're in the wrong place.