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

does more than asked for #215

Closed adrian-gierakowski closed 1 month ago

adrian-gierakowski commented 2 months ago

I've only got 1 rule enabled in .putout.json:

{
    "rules": {
        "remove-unused-variables": "on"
    }
}

but after running putout --fix path-to-my-file.ts the entire file is reformatted, including things like converting try\catch to calls to try-to-catch, chading indentation, adding semicolons etc etc.

coderaiser commented 2 months ago

All rules enabled by default, but you can disable any of them printer also highly configurable so you can configure 🐊Putout in any way you like. If you have ESLint config it will be used after 🐊Putout done it’s work.

adrian-gierakowski commented 1 month ago

@coderaiser so the rules are enabled even though they are not listed in my config? I did run putout --disable-all but it only flipped the one rule I had in my config to off

coderaiser commented 1 month ago

Yes, all rules enabled by default, that is not like ESLint, when you enable what you want, you disable what you want, if you need to set baseline use putout . β€”-disable-all this will disable all found rules violations, and then you can enable what you really want.