LibCST icon indicating copy to clipboard operation
LibCST copied to clipboard

Make .libcst.codemod.yaml location an optional argument for CLI usage

Open akanter opened this issue 4 years ago • 1 comments

This way you do not need to run LibCST from the same directory in which you have the configuration. This is helpful if you want to commit a per-team LibCST configuration into a monorepo and not conflict with other teams' LibCST configurations (which also might need to be in that same top level directory).

This also means that it becomes easier to package the configuration alongside codemods with a build system and create your own per-team CLI.

akanter avatar Jun 18 '20 01:06 akanter

That looks like a good use case. The existing configuration file based on the assumption that a project can build its custom codemod commands and add a yaml file at project root directory. We didn't think of the case that the same configuration will be used in multiple project directories.

Feel free to submit a PR to make the change!

jimmylai avatar Jun 18 '20 03:06 jimmylai