New lint regulations, optional semicolons sustain, brand-new sort-imports include, and also boosted reductions remarks.
The Rome group mores than happy to reveal Rome variation 11. The brand-new variation enhances security, functionality, Prettier compatibility and also presents some brand-new attributes in which the area revealed high passion.
You can update Rome by running the complying with command:
npm set up-- save-dev rome@latest
pnpm upgrade rome@latest
thread upgrade rome@latest
Or set up the VS Code expansion to incorporate Rome right into your editor.
What remains in Rome 11
TypeScript 4.9: satisfies
driver
This launch includes assistance for TypeScript’s brand-new satisfies
driver
const scheme = {
red: [255, 0, 0],
environment-friendly: " # 00ff00",
blue: [0, 0, 255]
} pleases Document<; Assistance for various other brand-new phrase structures presented by TypeScript 4.7 and also TypeScript 4.9 will certainly adhere to quickly. Optional Semicolons
Formerly, Rome published semicolons at the end of every declaration, course participant, and also kind participant. This launch presents the brand-new semicolons choice It sets up where the formatter prints semicolons: constantly (default)
Rome prints semicolons at the end of every declaration, course residential property, and also kind participant.
feature filter
( variety
,
predicate
) { const result =; for (
thing of variety [])
{ if( predicate( thing )
) {.
outcome press( thing );} } return result;}
as-needed (brand-new)
Rome just publishes semicolons ready that might present
ASI failings feature
filter
(
variety, predicate
) { const result = for( thing
of variety) []
{ if( predicate( thing )
) {.
outcome press( thing )} } return result.
} New Lints
This launch presents 4 brand-new advised dusts:
Rome v11 likewise ships several brand-new
baby room regulations Baby room regulations are under energetic advancement. So these regulations are rougher around the sides however enable you to opt-in to the most recent and also biggest of Rome. You can assist us by
making it possible for the speculative regulations
in your setup and also
offering responses on the regulation, the diagnostics, or the code repair. New nighttime launches allow the baby room regulations by default, permitting us to accumulate even more responses prior to maintaining regulations. We extremely suggest trying the useExhaustiveDependencies regulation if you’re utilizing React. It insists that React hook calls define all dependences. New Dust Teams (Damaging) Rome separates dusts right into various teams based upon the issues they report. This launch presents the brand-new efficiency
team and also divides the dubious team from the
accuracy
team: efficiency
: Guidelines capturing patterns that can be contacted make your code run quicker, or usually be extra reliable. accuracy
: Guidelines that identify code that is ensured
to be wrong or ineffective.
dubious
: Guidelines that identify code that ismost likely
to be wrong or ineffective. Both teams dubiousand also
accuracy are really comparable. They just vary in the assurance that some code is proper or extra. Allow’s consider 2 concrete instances to comprehend the distinction. const
a =
10;
a
= 42; The noConstAssign regulation reports the a = 42 job since appointing to a const
variable constantly
tosses a TypeError
at runtime. That’s why the noConstAssign
regulation remains in the accuracy team. feature
examination(
) {
}
examination = 10; Rome's noFunctionAssign reports the examination = 10 job since it designates the worth 10
to the feature examination
, which is most likely
not what you meant. The distinction is that this code runs with no runtime mistakes, and also there’s also a possibility that you intended to reassign examination
to 10
The reality that it’s just (extremely) likely that the reassignment is wrong is why noFunctionAssign remains in the dubious
team. This is a breaking modification since we relocated existing regulations to brand-new teams. You need to:
Update your setup if you have actually altered the intensity of any kind of relocated regulation. Update the team name in reductions remarks describing relocated regulations.
The launch Changelog
has a detailed description of just how to carry out the movement. It likewise notes all afflicted regulations.
Formerly, you needed to compose the lint-rule name in parentheses when utilizing a dust regulation reductions remark.
- if
- (
a = = 4
)
{ } Rome 11 adjustments the reductions remark phrase structure to line up the regulation name with just how Rome reveals them in diagnostics. Rather than parenthesizing the regulation name, you compose lint/rule _ name : if ( a
= = 4
)
{ } Rome remains to sustain the old phrase structure however produces a caution with an automated repair. You can either use the code repair from in your editor or for the entire task by running rome check-- use Use the recommended repair inside VS Code to move existing reductions remarks. On top of that, reductions remarks for dust regulations currently function likewise to @ts- expect-error
and also produce a caution if a subdued regulation does not produce any kind of analysis representing the remark. Suggesting the remark isn’t subduing anything and also can be securely gotten rid of. Rome currently alerts concerning extra reductions.
Reductions Code Activity (speculative)
Linter reductions remarks are just made use of sparsely in tasks to disable one-off exemptions to a guideline. Yet the reality they’re just required seldom makes it tough to bear in mind the precise phrase structure when you require to reduce a guideline. That’s where the brand-new reductions code activity comes to be helpful. It turns up as an idea on code with a dust mistake, and also using it creates the reductions remark.
Reduce a guideline right from your editor by using the brand-new reduce regulation code activity. Import Arranging (speculative)
This launch ships a speculative variation of the kind imports code activity. It types the import declarations based upon the component name utilizing all-natural purchasing. The activity types the declarations in your area per team, where a vacant line begins a brand-new team.

Rome types the import declarations by component name.
You can activate kind imports by hand utilizing the “Arrange Imports” activity (
⇧
+
Alt
+
O
) or run it on conserve by including the complying with to your editor setups: " editor.codeActionsOnSave": {” source.organizeImports.rome”: real
} We prepare to incorporate the activity right into the CLI
quickly and also include setup alternatives for even more opinionated sorting and also collection.
VS Code Expansion: Rome Resolution
Formerly, the Rome expansion constantly made use of the packed variation of Rome despite the variation defined in your task’s package.json Utilizing the packed variation can lead to inequalities in between the variation made use of by the expansion and also the variation made use of when running CLI commands. The brand-new variation of Rome fixes the rome
npm plan from the office origin. It just drops back to the packed Rome variation for untrusted work areas or tasks without a reliance on the
rome plan.
What’s following
Last month’s initial steady launch was a considerable turning point, and also we more than happy with just how well individuals obtained Rome. Yet our trip has actually simply started. Rome’s objective to be a linked internet advancement toolchain, consisting of a bundler, examination jogger, documents generator, and also extra, is extremely enthusiastic. Accomplishing it needs us to develop brand-new devices, include assistance for even more languages, and also compose even more dusts. Yet we are just able to do a few of that each time. That’s why we made use of the last couple of weeks to review our roadmap. The frustrating responses we obtained on Twitter is that several are delighted to make use of Rome however can not today since Rome does not sustain the languages they make use of in their tasks or dust regulations that are necessary to them. That's why our objective for the coming months is to make Rome an indispensable device for even more tasks by:
Including assistance for even more languages, especially JSON, HTML, CSS, and also Vue.js
layouts.
Cover one of the most typically made use of dust regulations, especially, the ESLint advised regulations,
jsx-a11y
,
- React and also React hooks
- Like all roadmaps, the advancement of these attributes will certainly undergo transform as we obtain responses from the area. Recommendations Rome had not been integrated in a day, and also absolutely not without the aid of several. Numerous many thanks to all factors that aided with Rome v11. Particularly: @denbezrukov for enhancing Rome’s Prettier compatibility and also beginning the service the JSON formatter. @realtimetodie
for including symlink and also read-only filesystem assistance.
@Conaclos
,
- @kaioduarte,
- @ 95th,
- @mzbac, and also jeysal for carrying out much of the brand-new dust regulations. @nissy- dev for carrying out parser and also formatter assistance for the satisfies driver and also including the worldwide neglect choice.
- @nstepien for all your given responses on dust regulations and also energetic involvement in conversations.