Right now the rome lint command will run the linter AND build a dependency graph to construct module resolution errors.
The usage of "lint" in Rome is a lot more general than other tools like ESLint. We use it to mean "detect any problems" rather than just simple per-file static analysis.
Possibly renaming to rome check would make the intent behind this command more obvious. And in the future if we were to add things like dead file detection (not imported anywhere), and type checking, it wouldn't feel out of place.
What do you all think?
I like the idea of rome check with rome check --fix as the flag to save changes.
I feel like rome check is better. And i prefere --fix rather than --save. Or even --save-fix, following the verbosity rule.
--save is used instead of --fix to avoid overloading the term “fix”. The flag only applies formatting and “recommended fixes”. We have the suggestions API which are also “fixes”. Do you not think it’s an issue in practice?
Good point. I can see how it might be a bit confusing if check --fix doesn't fix everything that's fixable.
I don't think that check --save fully conveys what it does, but I also don't have a better suggestion off the top of my head.
You can do rome lint --save --format-only too which wont apply "recommended fixes". I don't know what the right balance of terminology is here.
I do think it would be nice to have some sort of global --fix flag. Whenever we are doing parsing or normalization we almost always actually produce a result despite errors. Things like invalid package.json, syntax errors etc. We can automatically fix a bunch of stuff. Although maybe that should be an alternate flag called --unsafe-fix or something. But would it be used that often? I dunno, this seems really hard to balance.
yea, good point! i'm with @yassere and i don't have a better suggestion either.
I like rome check --save or rome check --apply.
Ohh I like rome check --apply!
Most helpful comment
I like
rome check --saveorrome check --apply.