coderaiser / putout

🐊 Pluggable and configurable JavaScript Linter, code transformer and formatter, drop-in ESLint superpower replacement 💪 with built-in support for js, jsx, typescript, flow, markdown, yaml and json. Write declarative codemods in a simplest possible way 😏
https://putout.cloudcmd.io/
MIT License
698 stars 40 forks source link

path is missing for ruler toggler #200

Closed milahu closed 7 months ago

milahu commented 7 months ago

repro

run putout in an empty dir

no package.json no .putout.json

cd $(mktemp -d)
echo 'console.log(123)' >test.js
putout --enable-all

actual

🐊 `path` is missing for ruler toggler (`--enable-all`, `--disable-all`)

expected

use the current workdir as path

workaround

putout --enable-all .
coderaiser commented 7 months ago

That’s interesting idea, but you can see in Usage section:

putout [options] [path]

—-enable-all is one of options flag, and path should be provided. That’s interesting idea to set . as default flag, but what to do with —-staged flag? It doesn’t work in current directory it works with staged files only.

And ESLint has similar behavior when you don’t provide path, it just exists.

milahu commented 7 months ago

nevermind, its better this way