Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^10.0.1
->^12.0.0
Release Notes
rome/tools (rome)
v12.1.3
CLI
Other changes
rome lsp-proxy
should accept the global CLI options #4505Configuration
Other changes
nursery
were enabled when the"nursery": {}
objectwas defined #4479
Formatter
Linter
Other changes
useHookAtTopLevel
caused to returning call expressions of a hook.Parser
Other changes
v12.1.2
Configuration
Other changes
the correct rules to apply #4502
Linter
New rules
noUselessTypeConstraint
Other changes
noInnerDeclarations
: allow function declarations in nested block inside an ES module #4492.noInvalidConstructorSuper
: recognizeextends
clauses that use static member access such asextends mod.C
#4499v12.1.1
CLI
Other changes
lsp-proxy
was renamedlsp_proxy
#4489Configuration
Other changes
Linter
Other changes
noAssignInExpressions
rule replaced the operator with an invalid token, which caused other lint rules to crash. #4464noUnusedVariables
rule did not correctly detect exports when a variable and aninterface
had the same name #4468v12.1.0
CLI
Other changes
output. #4405.
rome check
can accept input fromstdin
.--stdin-file-path
to use when runningrome check
viastdin
.--formatter-enabled
to the commandrome check
to control the formatter via CLI.--linter-enabled
to the commandrome check
to control the linter via CLI.--organize-imports-enabled
to the commandrome check
to control the import sorting via CLI.rome migrate
the transform the configuration filerome.json
when there are breaking changes.
Configuration
vcs
property, to opt in the VCS integration:vcs.enabled
, to enable or not the integration;vcs.clientKind
, the supported clients;vcs.useIgnoreFile
, to ignore the files/paths inside the file;vcs.root
, an optional path to the root of the VCS;Editors
Other changes
Formatter
Other changes
lineWidth
for arrays #4351Linter
New rules
noConfusingArrow
noRedundantRoles
noNoninteractiveTabindex
noAriaUnsupportedElements
noConsoleLog
noForEach
useLiteralKeys
noConstantCondition
useGroupedTypeImport
noUselessConstructor
useLiteralEnumMembers
useHeadingContent
noAccumulatingSpread
useSimpleNumberKeys
Promoted rules
New rules are promoted, please check #4431 for more details.
Note that,
noExtraSemicolons
andnoExtraLabels
are renamed tonoExtraSemicolon
andnoUselessLabel
.Other changes
the code action is not formatted.
useShorthandArrayType
rule did not handle nested ReadonlyArray types correctly and erroneously reported TsObjectType #4354.noUndeclaredVariables
detects globals based on the file type.noUndeclaredVariables
incorrectly identifiesAggregateError
as an undeclared variable. #4365useLiteralKeys
rule doesn't ignore valid uses of square bracket notation. #4370noNonNullAssertion
to emit incorrect code actionuseButtonType
to miss some casesuseCamelCase
caused to default exported componentsuseCamelCase
caused to private class membersuseHookAtTopLevel
caused to arrow functions, export default functions and function expressions.useHookAtTopLevel
caused toas
orsatisfies
expression.noHeadeScope
caused to custom componentsnoNoninteractiveElementToInteractiveRole
andnoNoninteractiveTabindex
caused to non-interactive elements.Parser
Other changes
cts
filesexport
andexport default
. #4252VSCode
requireConfiguration
is set totrue
by defaultv12.0.0
CLI
Breaking changes
While this change is a bug fix, this could affect how the
ignore
entries are defined inside a project. We suggest to review themand make sure they still work.
--apply-suggested
is now called--apply-unsafe
rome check --apply
androme check --apply-unsafe
exits with non-zero code (error code)if there are still diagnostics to be addressed.
Other changes
rome check
now checks import statements. This is an experimental feature that needs to beenabled via configuration. Import can be sorted using
rome check --apply-unsafe
working directory, it will try to find one in the parent directories.
--config-path
. It tells Rome to try and discover arome.json
filein the given path.
Configuration
Other changes
exit anymore if there are issues with the
rome.json
file, instead it will apply its defaultsto the sections that are incorrect.
javascript.organizeImports
. This is an experimental feature and users need to opt-in.linter.rules.all
andlinter.rules.[group].all
. These options allow to enable or disable allrules, or all rules for a given group.
all
andrecommended
can't be bothtrue
.The previous example will enable all rules and disable all rules that belong to the
style
group.Editors
Other changes
rome.json
file.Formatter
Linter
New rules are promoted, please check #4239 for more
details.
Parser
VSCode
Other changes
requireConfiguration
. Enabling this option will force Rome to requirea configuration file in your workspace/project. If Rome doesn't find a
rome.json
file, it won'temit diagnostics.
v11.0.0
CLI
BREAKING CHANGES
--no-colors
has been removed, in favor of--color=off
Other changes
init
command now adds the$schema
property to the generatedrome.json
fileif
rome
is installed inside thenode_modules
folder. Follow this guide to add the$schema
propertymanually in a project with an existing
rome.json
file.--semicolons
option that configures if the formatter prints semicolons at the end of every statement (default) or at the beginning of statements when necessary to prevent ASI failures.Rome now prints the total number of errors caused in the files.
--colors
option with the valueforce
. Forcing color output can be useful if you spawn Rome as a subprocess.Rome is spawned as a process;
Configuration
$schema
property. The schema enables auto-completion by editors and...auto-completion and descriptions of all fields of the configuration file.
files.ignore
option where users can ignore files across tools.Editors
node_modules
folder.Formatter
BREAKING CHANGES
jestEach
templatesOther changes
Linter
noUselessFragments
#3668noArrayIndexKey
where some cases were not detected #3670noConstAssign
#3728noShoutyConstants
#3867noUnusedVariables
#3779noUndeclaredVariables
where some cases were not detected #3798noUndeclaredVariables
where types were incorrectly detected #3669Rules
The following rules have been stabilized:
nursery/useFlatMap
->complexity/useFlatMap
nursery/useValidForDirection
->correctness/useValidForDirection
nursery/noExplicitAny
->suspicious/noExplicitAny
nursery/noConstAssign
->correctness/noConstAssign
These rules are all recommended, so they will be enabled by default. You can simply remove those entries from your configuration file if you had enabled them manually from the
nursery
group.The following rules have been renamed:
a11y/useBlankTarget
->a11y/noBlankTarget
correctness/noMultipleSpacesInRegularExpressionLiterals
->complexity/noMultipleSpacesInRegularExpressionLiterals
style/useOptionalChain
->complexity/useOptionalChain
correctness/noUselessFragments
->complexity/noUselessFragments
correctness/noDelete
->performance/noDelete
correctness/useSingleCaseStatement
->style/useSingleCaseStatement
correctness/useWhile
->style/useWhile
correctness/noArguments
->style/noArguments
correctness/noAsyncPromiseExecutor
->suspicious/noAsyncPromiseExecutor
correctness/noCommentText
->suspicious/noCommentText
correctness/noCompareNegZero
->suspicious/noCompareNegZero
correctness/noDebugger
->suspicious/noDebugger
correctness/noDoubleEquals
->suspicious/noDoubleEquals
correctness/noShadowRestrictedNames
->suspicious/noShadowRestrictedNames
correctness/noSparseArray
->suspicious/noSparseArray
correctness/noUnsafeNegation
->suspicious/noUnsafeNegation
correctness/useValidTypeof
->suspicious/useValidTypeof
correctness/noArrayIndexKey
->suspicious/noArrayIndexKey
correctness/noCatchAssign
->suspicious/noCatchAssign
correctness/noDupeArgs
->suspicious/noDuplicateParameters
correctness/noFunctionAssign
->suspicious/noFunctionAssign
correctness/noImportAssign
->suspicious/noImportAssign
correctness/noLabelVar
->suspicious/noLabelVar
correctness/noRestrictedGlobals
->nursery/noRestrictedGlobals
nursery/noDupeKeys
->nursery/noDuplicateObjectKeys
If you were not changing the severity level of any of these rules in your configuration file, or suppressing a diagnostic emitted by those rules using suppression comments, you do not have to do anything. But if you did, Rome will now emit diagnostics for the parts of your configuration or suppression comments you need to update.
The following rules are no longer recommended:
style/noImplicitBoolean
style/noNegationElse
style/useBlockStatements
style/useShorthandArrayType
correctness/useSingleCaseStatement
/style/useSingleCaseStatement
style/noShoutyConstants
The styling decisions imposed by these rules were not deemed to be idiomatic enough in the JavaScript ecosystem to be enabled by default. If you do want to enforce those rules in your project, you will have to enable them manually in you configuration file:
Finally, the following new rules have been introduced to the nursery group in this release:
nursery/noAccessKey
nursery/noConditionalAssignment
nursery/noConstEnum
nursery/noConstructorReturn
nursery/noDistractingElements
nursery/noDuplicateObjectKeys
nursery/noEmptyInterface
nursery/noExtraNonNullAssertion
nursery/noHeaderScope
nursery/noNonNullAssertion
nursery/noPrecisionLoss
nursery/noRedundantUseStrict
nursery/noSetterReturn
nursery/noStringCaseMismatch
nursery/noUnsafeFinally
nursery/noVoidTypeReturn
nursery/useDefaultSwitchClauseLast
nursery/useNumericLiterals
nursery/useAriaPropTypes
nursery/useAriaPropsForRole
nursery/noVar
nursery/useConst
Please give them a try by manually enabling them in your configuration and please share your feedback on the rule, diagnostics, and code fixes.
Parser
JSON
;satisfies
keyword;async
used as label #3612export default function
ind.ts
files #3485await
in non-async contexts #2479VSCode
JavaScript APIs
Breaking change
backend
has been removed, in favor of the concept ofdistribution
.Other changes
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.