Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency rome to v12 #117

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kuro-kuroite
Copy link
Owner

This PR contains the following updates:

Package Type Update Change
rome (source) devDependencies major ^10.0.4-beta -> ^12.0.0

Release Notes

rome/tools

v12.0.0

CLI
Breaking changes
  • Review how the traversal of the file system works. Now Rome won't navigate folders that are ignored.
    While this change is a bug fix, this could affect how the ignore entries are defined inside a project. We suggest to review them
    and make sure they still work.
  • --apply-suggested is now called --apply-unsafe
  • rome check --apply and rome 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 be
    enabled via configuration. Import can be sorted using rome check --apply-unsafe
  • Rome is able to auto discover the configuration file. If Rome doesn't fine a configuration in the
    working directory, it will try to find one in the parent directories.
  • Add a new global options called --config-path. It tells Rome to try and discover a rome.json file
    in the given path.
    shell rome format --config-path=../../other/path/ rome check --config-path=../../other/path/
Configuration
Other changes
  • Rome now uses the internal JSON parser to validate the configuration file. This means Rome won't
    exit anymore if there are issues with the rome.json file, instead it will apply its defaults
    to the sections that are incorrect.
  • Add javascript.organizeImports. This is an experimental feature and users need to opt-in.
{
  "organizeImports": {
    "enabled": true,
    "ignore": ["trickyFile.js"]
  }
}
  • Add linter.rules.all and linter.rules.[group].all. These options allow to enable or disable all
    rules, or all rules for a given group. all and recommended can't be both true.
{
  "linter": {
    "rules": {
      "all": true,
      "style" : {
        "all": false
      }
    }
  }
}

The previous example will enable all rules and disable all rules that belong to the style group.

Editors
Other changes
  • Add support to display diagnostics for JSON files.
  • Add support to format JSON files.
  • Pull diagnostics when parsing a rome.json file.
  • Imports sorting is not applied for files that are not supported or ignored.
Formatter
  • Add support for JSON files
  • Add support for TypeScript 4.7
  • Add support for TypeScript 5.0
Linter

New rules are promoted, please check #​4239 for more
details.

Parser
  • Support for TypeScript 4.7
  • Support for TypeScript 5.0
VSCode
Other changes
  • Add a new option called requireConfiguration. Enabling this option will force Rome to require
    a configuration file in your workspace/project. If Rome doesn't find a rome.json file, it won't
    emit diagnostics.

v11.0.0

CLI
BREAKING CHANGES
  • the argument --no-colors has been removed, in favor of --color=off
Other changes
  • The init command now adds the $schema property to the generated rome.json file
    if rome is installed inside the node_modules folder. Follow this guide to add the $schema property
    manually in a project with an existing rome.json file.
  • A new --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 exits with an error code if it doesn't process any file.
  • Fixed how the maximum number of diagnostics is calculated #​3869.
    Rome now prints the total number of errors caused in the files.
  • Rome now traverses symbolic links and emits warnings if it detects loops, and continues processing the next file during the directory traversal.
  • You can force color output using the new global --colors option with the value force. Forcing color output can be useful if you spawn Rome as a subprocess.
    Rome is spawned as a process;
Configuration
  • Added the JSON schema $schema property. The schema enables auto-completion by editors and...
    auto-completion and descriptions of all fields of the configuration file.
  • Added a new files.ignore option where users can ignore files across tools.
Editors
Formatter
BREAKING CHANGES
Other changes
  • Added support for omitting semicolons.
Linter
  • Fixed false positives emitted by noUselessFragments #​3668
  • Fixed noArrayIndexKey where some cases were not detected #​3670
  • Fixed false positives emitted by noConstAssign #​3728
  • Fixed false positives emitted by noShoutyConstants #​3867
  • Fixed false positives emitted by noUnusedVariables #​3779
  • Fixed noUndeclaredVariables where some cases were not detected #​3798
  • Fixed noUndeclaredVariables where types were incorrectly detected #​3669
Rules

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:

{
  "linter": {
    "rules": {
        "style": {
            "useBlockStatements": "warn"
        }
    }
  }
}

Finally, the following new rules have been introduced to the nursery group in this release:

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
  • Added support for JSON;
  • Added support satisfies keyword;
  • Fixed parse for async used as label #​3612
  • Fixed parse of export default function in d.ts files #​3485
  • Improved the parsing of await in non-async contexts #​2479
VSCode
  • Removed the "preview" label from the extension.
  • Improved logging when the extension can't connect to the server. #​3920
JavaScript APIs
Breaking change
  • The concept of backend has been removed, in favor of the concept of distribution.
  • Removed the possibility to connect to the daemon, for the time being.
  • The APIs are asynchronous anymore.
Other changes
  • The package has been marked as unstable and in alpha state.

Configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻️ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box.

This PR has been generated by Renovate Bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants