tools icon indicating copy to clipboard operation
tools copied to clipboard

📎 `rome init` should read `.prettierrc` and convert options

Open sebmck opened this issue 3 years ago • 7 comments

Description

This would drastically help with migration. Especially for users who have opted out of Prettier defaults. Notably we could automatically set indentStyle etc.

sebmck avatar Nov 08 '22 14:11 sebmck

Would it also be possible for it to read .prettierignore, or are the ignore formats not compatible?

joealden avatar Nov 08 '22 20:11 joealden

Would it also be possible for it to read .prettierignore, or are the ignore formats not compatible?

That should be possible once our ignore setting supports negative patterns.

MichaReiser avatar Nov 09 '22 09:11 MichaReiser

@sebmck rome init is not the correct command to do these kind of things. If you remember, we decided to remove such "import configuration from other tools" from init and use a new command called auto-config.

The old rome init was more powerful than the one we have at the moment, and it used to create various files (rome.json with some additional goodies, .editorconfig), but it wasn't meant to import configuration from other tools.

auto-config was meant to "import" configuration from other tools: prettier, eslint, typescript, etc.

ematipico avatar Nov 14 '22 10:11 ematipico

@sebmck rome init is not the correct command to do these kind of things. If you remember, we decided to remove such "import configuration from other tools" from init and use a new command called auto-config.

Let's restate the issue that there should be a way to automatically migrate the configuration. It would be interesting to understand the reasoning why that "decision" was made. Having it in rome init has the advantage that users only need to run a single command rather than 2.

MichaReiser avatar Nov 14 '22 10:11 MichaReiser

Here the first issue: https://github.com/rome/tools/issues/1112#issue-680542868

EDIT:

The old rome init command was meant to be run inside a project where rome wasn't installed. The init command was able to install it and updating the package.json. The command now doesn't do that because there's so awareness of a "project", but we will have that. So it's best to keep the two commands separated, unless we decide now to review the semantics of the command init

ematipico avatar Nov 14 '22 13:11 ematipico

👋 @rome/staff please triage this issue by adding one of the following labels: S-Bug: confirmed, S-Planned , S-Wishlist or umbrella

github-actions[bot] avatar Nov 29 '22 12:11 github-actions[bot]

This could be great if Rome supports .editorconfig.

Conaclos avatar Nov 30 '22 22:11 Conaclos