Skip to content

Releases: biomejs/biome

Intellij Plugin v0.0.6

31 Oct 08:26
af24597
Compare
Choose a tag to compare

Analyzer

Bug fixes

CLI

Bug fixes

  • Fix how overrides behave. Now ignore and include apply or not the override pattern, so they override each other.
    Now the options inside overrides override the top-level options.
  • Bootstrap the logger only when needed. Contributed by @ematipico

Editors

Bug fixes

  • Fix #592, by changing binary resolution in the IntelliJ plugin. Contributed by @Joshuabaker2

Formatter

Bug fixes

  • Apply the correct layout when the right hand of an assignment expression is a await expression or a yield expression. Contributed by @ematipico
  • Fix #303, where nested arrow functions didn't break. Contributed by @victor-teles

Linter

Bug fixes

  • Fix #175 which made noRedeclare report index signatures using the name of a variable in the parent scope.

  • Fix #557 which made noUnusedImports report imported types used in typeof expression. Contributed by @Conaclos

  • Fix #576 by removing some erroneous logic in noSelfAssign. Contributed by @ematipico

  • Fix #595 by updating unsafe-apply logic to avoid unexpected errors in noUselessFragments. Contributed by @nissy-dev

  • Fix #591 which made noRedeclare report type parameters with identical names but in different method signatures. Contributed by @Conaclos

  • Support more a11y roles and fix some methods for a11y lint rules Contributed @nissy-dev

  • Fix useExhaustiveDependencies, by removing useContext, useId and useSyncExternalStore from the known hooks. Contributed by @msdlisper

Parser

Enhancements

  • Support RegExp v flag. Contributed by @nissy-dev
  • Improve error messages. Contributed by @ematipico

What's Changed

Other changes

  • ci(release_cli): add homebrew formula bumper by @nhedger in #569
  • docs(website): fix useYield source reference by @unvalley in #583
  • fix: check elseClause inside noUselessLoneBlockStatements by @vasucp1207 in #584
  • docs(lint/useNamingConvention): type prop and method names in camelCase by @Conaclos in #588
  • chore: fix hook linting message grammar by @crutchcorn in #580
  • fix(project): changed structure to correctly emit schema for overrides by @ematipico in #602
  • fix(intellij): binary resolution execution sequence by @Joshuabaker2 in #601
  • refactor(linter-config): remove dead code and deduplicate code by @Conaclos in #612
  • refactor(json_deserialize): improve map_to_* API by @Conaclos in #616
  • refactor(json_deserailize): remove visit_member_name by @Conaclos in #618
  • fix: bug with useContext/useSyncExternalStore (#609) by @msdlisper in #621
  • feat(css_parser): CSS Parser pseudo element selector #268 by @denbezrukov in #600
  • fix(biome_js_parser): report error when using u and v flag at the same time by @nissy-dev in #631
  • ci(release_cli): continue on error when bumping homebrew formula by @nhedger in #637

New Contributors

Full Changelog: cli/v1.3.1...lsp-intellij/v0.0.6

CLI v1.3.3

31 Oct 08:20
af24597
Compare
Choose a tag to compare

Analyzer

Bug fixes

CLI

Bug fixes

  • Fix how overrides behave. Now ignore and include apply or not the override pattern, so they override each other.
    Now the options inside overrides override the top-level options.
  • Bootstrap the logger only when needed. Contributed by @ematipico

Editors

Bug fixes

  • Fix #592, by changing binary resolution in the IntelliJ plugin. Contributed by @Joshuabaker2

Formatter

Bug fixes

  • Apply the correct layout when the right hand of an assignment expression is a await expression or a yield expression. Contributed by @ematipico
  • Fix #303, where nested arrow functions didn't break. Contributed by @victor-teles

Linter

Bug fixes

  • Fix #175 which made noRedeclare report index signatures using the name of a variable in the parent scope.

  • Fix #557 which made noUnusedImports report imported types used in typeof expression. Contributed by @Conaclos

  • Fix #576 by removing some erroneous logic in noSelfAssign. Contributed by @ematipico

  • Fix #595 by updating unsafe-apply logic to avoid unexpected errors in noUselessFragments. Contributed by @nissy-dev

  • Fix #591 which made noRedeclare report type parameters with identical names but in different method signatures. Contributed by @Conaclos

  • Support more a11y roles and fix some methods for a11y lint rules Contributed @nissy-dev

  • Fix useExhaustiveDependencies, by removing useContext, useId and useSyncExternalStore from the known hooks. Contributed by @msdlisper

Parser

Enhancements

  • Support RegExp v flag. Contributed by @nissy-dev
  • Improve error messages. Contributed by @ematipico

What's Changed

Other changes

  • ci(release_cli): add homebrew formula bumper by @nhedger in #569
  • docs(website): fix useYield source reference by @unvalley in #583
  • fix: check elseClause inside noUselessLoneBlockStatements by @vasucp1207 in #584
  • docs(lint/useNamingConvention): type prop and method names in camelCase by @Conaclos in #588
  • chore: fix hook linting message grammar by @crutchcorn in #580
  • fix(project): changed structure to correctly emit schema for overrides by @ematipico in #602
  • fix(intellij): binary resolution execution sequence by @Joshuabaker2 in #601
  • refactor(linter-config): remove dead code and deduplicate code by @Conaclos in #612
  • refactor(json_deserialize): improve map_to_* API by @Conaclos in #616
  • refactor(json_deserailize): remove visit_member_name by @Conaclos in #618
  • fix: bug with useContext/useSyncExternalStore (#609) by @msdlisper in #621
  • feat(css_parser): CSS Parser pseudo element selector #268 by @denbezrukov in #600
  • fix(biome_js_parser): report error when using u and v flag at the same time by @nissy-dev in #631
  • ci(release_cli): continue on error when bumping homebrew formula by @nhedger in #637

New Contributors

Full Changelog: cli/v1.3.1...cli/v1.3.3

VSCode Extension v1.6.1

20 Oct 10:57
7d9080c
Compare
Choose a tag to compare

CLI

Bug fixes

  • Fix rage command, now it doesn't print info about running servers. Contributed by @ematipico

Editors

Bug fixes

  • Fix #552, where the formatter isn't correctly triggered in Windows systems. Contributed by @victor-teles

Linter

Bug fixes

What's Changed

Other changes

New Contributors

Full Changelog: cli/v1.3.0...lsp/v1.6.1

Intellij Plugin v0.0.5

20 Oct 10:58
7d9080c
Compare
Choose a tag to compare

CLI

Bug fixes

  • Fix rage command, now it doesn't print info about running servers. Contributed by @ematipico

Editors

Bug fixes

  • Fix #552, where the formatter isn't correctly triggered in Windows systems. Contributed by @victor-teles

Linter

Bug fixes

What's Changed

Other changes

New Contributors

Full Changelog: cli/v1.3.0...lsp-intellij/v0.0.5

CLI v1.3.1

20 Oct 10:57
7d9080c
Compare
Choose a tag to compare

CLI

Bug fixes

  • Fix rage command, now it doesn't print info about running servers. Contributed by @ematipico

Editors

Bug fixes

  • Fix #552, where the formatter isn't correctly triggered in Windows systems. Contributed by @victor-teles

Linter

Bug fixes

What's Changed

Other changes

New Contributors

Full Changelog: cli/v1.3.0...cli/v1.3.1

VSCode Extension v1.6.0

19 Oct 09:05
5dcae83
Compare
Choose a tag to compare

Analyzer

Enhancements

  • Import sorting is safe to apply now, and it will be applied when running check --apply instead of check --apply-unsafe.

  • Import sorting now handles Bun imports bun:<name>, absolute path imports /<path>, and Node's subpath imports #<name>. See our documentation for more details. Contributed by @Conaclos

CLI

Bug fixes

  • Fix #319. The command biome lint now shows the correct options. Contributed by @ematipico
  • Fix #312. Running biome --version now exits with status code 0 instead of 1. Contributed by @nhedger
  • Fix a bug where the extends functionality doesn't carry over organizeImports.ignore. Contributed by @ematipico
  • The CLI now returns the original content when using stdin and the original content doesn't change. Contributed by @ematipico

New features

  • Add support for BIOME_BINARY environment variable to override the location of the binary. Contributed by @ematipico

  • Add option --indent-width, and deprecated the option --indent-size. Contributed by @ematipico

  • Add option --javascript-formatter-indent-width, and deprecated the option --javascript-formatter-indent-size. Contributed by @ematipico

  • Add option --json-formatter-indent-width, and deprecated the option --json-formatter-indent-size. Contributed by @ematipico

  • Add option --daemon-logs to biome rage. The option is required to view Biome daemon server logs. Contributed by @unvalley

  • Add support for logging. By default, Biome doesn't log anything other than diagnostics. Logging can be enabled with the new option --log-level:

    biome format --log-level=info ./src

    There are four different levels of logging, from the most verbose to the least verbose: debug, info, warn and error. Here's how an INFO log will look like:

    2023-10-05T08:27:01.954727Z  INFO  Analyze file ./website/src/playground/components/Resizable.tsx
      at crates/biome_service/src/file_handlers/javascript.rs:298 on biome::worker_5
      in Pulling diagnostics with categories: RuleCategories(SYNTAX)
      in Processes formatting with path: "./website/src/playground/components/Resizable.tsx"
      in Process check with path: "./website/src/playground/components/Resizable.tsx"
    

    You can customize how the log will look like with a new option --log-kind. The supported kinds are: pretty, compact and json.

    pretty is the default logging. Here's how a compact log will look like:

    2023-10-05T08:29:04.864247Z  INFO biome::worker_2 Process check:Processes linting:Pulling diagnostics: crates/biome_service/src/file_handlers/javascript.rs: Analyze file ./website/src/playground/components/Resizable.tsx path="./website/src/playground/components/Resizable.tsx" path="./website/src/playground/components/Resizable.tsx" categories=RuleCategories(LINT)
    2023-10-05T08:29:04.864290Z  INFO biome::worker_7 Process check:Processes formatting: crates/biome_service/src/file_handlers/javascript.rs: Format file ./website/src/playground/components/Tabs.tsx path="./website/src/playground/components/Tabs.tsx" path="./website/src/playground/components/Tabs.tsx"
    2023-10-05T08:29:04.879332Z  INFO biome::worker_2 Process check:Processes formatting:Pulling diagnostics: crates/biome_service/src/file_handlers/javascript.rs: Analyze file ./website/src/playground/components/Resizable.tsx path="./website/src/playground/components/Resizable.tsx" path="./website/src/playground/components/Resizable.tsx" categories=RuleCategories(SYNTAX)
    2023-10-05T08:29:04.879383Z  INFO biome::worker_2 Process check:Processes formatting: crates/biome_service/src/file_handlers/javascript.rs: Format file ./website/src/playground/components/Resizable.tsx path="./website/src/playground/components/Resizable.tsx" path="./website/src/playground/components/Resizable.tsx"
    

Enhancements

  • Deprecated the environment variable ROME_BINARY. Use BIOME_BINARY instead. Contributed by @ematipico
  • Biome doesn't check anymore the presence of the .git folder when VCS support is enabled. Contributed by @ematipico
  • biome rage doesn't print the logs of the daemon, use biome rage --daemon-logs to print them. Contributed by @unvalley

Configuration

New features

  • Add option formatter.indentWidth, and deprecated the option formatter.indentSize. Contributed by @ematipico

  • Add option javascript.formatter.indentWidth, and deprecated the option javascript.formatter.indentSize. Contributed by @ematipico

  • Add option json.formatter.indentWidth, and deprecated the option json.formatter.indentSize. Contributed by @ematipico

  • Add option include to multiple sections of the configuration

    • files.include;
    • formatter.include;
    • linter.include;
    • organizeImports.include;
      When include and ignore are both specified, ignore takes precedence over include
  • Add option overrides, where users can modify the behaviour of the tools for certain files or paths.

    For example, it's possible to modify the formatter lineWidth, and even quoteStyle for certain files that are included in glob path generated/**:

    {
      "formatter": {
        "lineWidth": 100
      },
      "overrides": [
        {
          "include": ["generated/**"],
          "formatter": {
            "lineWidth": 160
          },
          "javascript": {
            "formatter": {
              "quoteStyle": "single"
            }
          }
        }
      ]
    }

    Or, you can disable certain rules for certain path, and disable the linter for other paths:

    {
      "linter": {
        "enabled": true,
        "rules": {
          "recommended": true
        }
      },
      "overrides": [
        {
          "include": ["lib/**"],
          "linter": {
            "rules": {
              "suspicious": {
                "noDebugger": "off"
              }
            }
          }
        },
        {
          "include": ["shims/**"],
          "linter": {
            "enabled": false
          }
        }
      ]
    }

Bug fixes

  • Fix #343, extends was incorrectly applied to the biome.json file. Contributed by @ematipico

Editors

Bug fixes

  • Fix #404. Biome intellij plugin now works on Windows. Contributed by @victor-teles

  • Fix #402. Biome format on intellij plugin now recognize biome.json. Contributed by @victor-teles

Formatter

Enhancements

  • Use OnceCell for the Memoized memory because that's what the RefCell<Option> implemented. Contributed by @denbezrukov

Linter

Promoted rules

The following rules are now recommended:

Bug fixes

New features

Read more

Intellij Plugin v0.0.4

19 Oct 09:10
5dcae83
Compare
Choose a tag to compare

Analyzer

Enhancements

  • Import sorting is safe to apply now, and it will be applied when running check --apply instead of check --apply-unsafe.

  • Import sorting now handles Bun imports bun:<name>, absolute path imports /<path>, and Node's subpath imports #<name>. See our documentation for more details. Contributed by @Conaclos

CLI

Bug fixes

  • Fix #319. The command biome lint now shows the correct options. Contributed by @ematipico
  • Fix #312. Running biome --version now exits with status code 0 instead of 1. Contributed by @nhedger
  • Fix a bug where the extends functionality doesn't carry over organizeImports.ignore. Contributed by @ematipico
  • The CLI now returns the original content when using stdin and the original content doesn't change. Contributed by @ematipico

New features

  • Add support for BIOME_BINARY environment variable to override the location of the binary. Contributed by @ematipico

  • Add option --indent-width, and deprecated the option --indent-size. Contributed by @ematipico

  • Add option --javascript-formatter-indent-width, and deprecated the option --javascript-formatter-indent-size. Contributed by @ematipico

  • Add option --json-formatter-indent-width, and deprecated the option --json-formatter-indent-size. Contributed by @ematipico

  • Add option --daemon-logs to biome rage. The option is required to view Biome daemon server logs. Contributed by @unvalley

  • Add support for logging. By default, Biome doesn't log anything other than diagnostics. Logging can be enabled with the new option --log-level:

    biome format --log-level=info ./src

    There are four different levels of logging, from the most verbose to the least verbose: debug, info, warn and error. Here's how an INFO log will look like:

    2023-10-05T08:27:01.954727Z  INFO  Analyze file ./website/src/playground/components/Resizable.tsx
      at crates/biome_service/src/file_handlers/javascript.rs:298 on biome::worker_5
      in Pulling diagnostics with categories: RuleCategories(SYNTAX)
      in Processes formatting with path: "./website/src/playground/components/Resizable.tsx"
      in Process check with path: "./website/src/playground/components/Resizable.tsx"
    

    You can customize how the log will look like with a new option --log-kind. The supported kinds are: pretty, compact and json.

    pretty is the default logging. Here's how a compact log will look like:

    2023-10-05T08:29:04.864247Z  INFO biome::worker_2 Process check:Processes linting:Pulling diagnostics: crates/biome_service/src/file_handlers/javascript.rs: Analyze file ./website/src/playground/components/Resizable.tsx path="./website/src/playground/components/Resizable.tsx" path="./website/src/playground/components/Resizable.tsx" categories=RuleCategories(LINT)
    2023-10-05T08:29:04.864290Z  INFO biome::worker_7 Process check:Processes formatting: crates/biome_service/src/file_handlers/javascript.rs: Format file ./website/src/playground/components/Tabs.tsx path="./website/src/playground/components/Tabs.tsx" path="./website/src/playground/components/Tabs.tsx"
    2023-10-05T08:29:04.879332Z  INFO biome::worker_2 Process check:Processes formatting:Pulling diagnostics: crates/biome_service/src/file_handlers/javascript.rs: Analyze file ./website/src/playground/components/Resizable.tsx path="./website/src/playground/components/Resizable.tsx" path="./website/src/playground/components/Resizable.tsx" categories=RuleCategories(SYNTAX)
    2023-10-05T08:29:04.879383Z  INFO biome::worker_2 Process check:Processes formatting: crates/biome_service/src/file_handlers/javascript.rs: Format file ./website/src/playground/components/Resizable.tsx path="./website/src/playground/components/Resizable.tsx" path="./website/src/playground/components/Resizable.tsx"
    

Enhancements

  • Deprecated the environment variable ROME_BINARY. Use BIOME_BINARY instead. Contributed by @ematipico
  • Biome doesn't check anymore the presence of the .git folder when VCS support is enabled. Contributed by @ematipico
  • biome rage doesn't print the logs of the daemon, use biome rage --daemon-logs to print them. Contributed by @unvalley

Configuration

New features

  • Add option formatter.indentWidth, and deprecated the option formatter.indentSize. Contributed by @ematipico

  • Add option javascript.formatter.indentWidth, and deprecated the option javascript.formatter.indentSize. Contributed by @ematipico

  • Add option json.formatter.indentWidth, and deprecated the option json.formatter.indentSize. Contributed by @ematipico

  • Add option include to multiple sections of the configuration

    • files.include;
    • formatter.include;
    • linter.include;
    • organizeImports.include;
      When include and ignore are both specified, ignore takes precedence over include
  • Add option overrides, where users can modify the behaviour of the tools for certain files or paths.

    For example, it's possible to modify the formatter lineWidth, and even quoteStyle for certain files that are included in glob path generated/**:

    {
      "formatter": {
        "lineWidth": 100
      },
      "overrides": [
        {
          "include": ["generated/**"],
          "formatter": {
            "lineWidth": 160
          },
          "javascript": {
            "formatter": {
              "quoteStyle": "single"
            }
          }
        }
      ]
    }

    Or, you can disable certain rules for certain path, and disable the linter for other paths:

    {
      "linter": {
        "enabled": true,
        "rules": {
          "recommended": true
        }
      },
      "overrides": [
        {
          "include": ["lib/**"],
          "linter": {
            "rules": {
              "suspicious": {
                "noDebugger": "off"
              }
            }
          }
        },
        {
          "include": ["shims/**"],
          "linter": {
            "enabled": false
          }
        }
      ]
    }

Bug fixes

  • Fix #343, extends was incorrectly applied to the biome.json file. Contributed by @ematipico

Editors

Bug fixes

  • Fix #404. Biome intellij plugin now works on Windows. Contributed by @victor-teles

  • Fix #402. Biome format on intellij plugin now recognize biome.json. Contributed by @victor-teles

Formatter

Enhancements

  • Use OnceCell for the Memoized memory because that's what the RefCell<Option> implemented. Contributed by @denbezrukov

Linter

Promoted rules

The following rules are now recommended:

Bug fixes

New features

Read more

CLI v1.3.0

19 Oct 09:04
5dcae83
Compare
Choose a tag to compare

Analyzer

Enhancements

  • Import sorting is safe to apply now, and it will be applied when running check --apply instead of check --apply-unsafe.

  • Import sorting now handles Bun imports bun:<name>, absolute path imports /<path>, and Node's subpath imports #<name>. See our documentation for more details. Contributed by @Conaclos

CLI

Bug fixes

  • Fix #319. The command biome lint now shows the correct options. Contributed by @ematipico
  • Fix #312. Running biome --version now exits with status code 0 instead of 1. Contributed by @nhedger
  • Fix a bug where the extends functionality doesn't carry over organizeImports.ignore. Contributed by @ematipico
  • The CLI now returns the original content when using stdin and the original content doesn't change. Contributed by @ematipico

New features

  • Add support for BIOME_BINARY environment variable to override the location of the binary. Contributed by @ematipico

  • Add option --indent-width, and deprecated the option --indent-size. Contributed by @ematipico

  • Add option --javascript-formatter-indent-width, and deprecated the option --javascript-formatter-indent-size. Contributed by @ematipico

  • Add option --json-formatter-indent-width, and deprecated the option --json-formatter-indent-size. Contributed by @ematipico

  • Add option --daemon-logs to biome rage. The option is required to view Biome daemon server logs. Contributed by @unvalley

  • Add support for logging. By default, Biome doesn't log anything other than diagnostics. Logging can be enabled with the new option --log-level:

    biome format --log-level=info ./src

    There are four different levels of logging, from the most verbose to the least verbose: debug, info, warn and error. Here's how an INFO log will look like:

    2023-10-05T08:27:01.954727Z  INFO  Analyze file ./website/src/playground/components/Resizable.tsx
      at crates/biome_service/src/file_handlers/javascript.rs:298 on biome::worker_5
      in Pulling diagnostics with categories: RuleCategories(SYNTAX)
      in Processes formatting with path: "./website/src/playground/components/Resizable.tsx"
      in Process check with path: "./website/src/playground/components/Resizable.tsx"
    

    You can customize how the log will look like with a new option --log-kind. The supported kinds are: pretty, compact and json.

    pretty is the default logging. Here's how a compact log will look like:

    2023-10-05T08:29:04.864247Z  INFO biome::worker_2 Process check:Processes linting:Pulling diagnostics: crates/biome_service/src/file_handlers/javascript.rs: Analyze file ./website/src/playground/components/Resizable.tsx path="./website/src/playground/components/Resizable.tsx" path="./website/src/playground/components/Resizable.tsx" categories=RuleCategories(LINT)
    2023-10-05T08:29:04.864290Z  INFO biome::worker_7 Process check:Processes formatting: crates/biome_service/src/file_handlers/javascript.rs: Format file ./website/src/playground/components/Tabs.tsx path="./website/src/playground/components/Tabs.tsx" path="./website/src/playground/components/Tabs.tsx"
    2023-10-05T08:29:04.879332Z  INFO biome::worker_2 Process check:Processes formatting:Pulling diagnostics: crates/biome_service/src/file_handlers/javascript.rs: Analyze file ./website/src/playground/components/Resizable.tsx path="./website/src/playground/components/Resizable.tsx" path="./website/src/playground/components/Resizable.tsx" categories=RuleCategories(SYNTAX)
    2023-10-05T08:29:04.879383Z  INFO biome::worker_2 Process check:Processes formatting: crates/biome_service/src/file_handlers/javascript.rs: Format file ./website/src/playground/components/Resizable.tsx path="./website/src/playground/components/Resizable.tsx" path="./website/src/playground/components/Resizable.tsx"
    

Enhancements

  • Deprecated the environment variable ROME_BINARY. Use BIOME_BINARY instead. Contributed by @ematipico
  • Biome doesn't check anymore the presence of the .git folder when VCS support is enabled. Contributed by @ematipico
  • biome rage doesn't print the logs of the daemon, use biome rage --daemon-logs to print them. Contributed by @unvalley

Configuration

New features

  • Add option formatter.indentWidth, and deprecated the option formatter.indentSize. Contributed by @ematipico

  • Add option javascript.formatter.indentWidth, and deprecated the option javascript.formatter.indentSize. Contributed by @ematipico

  • Add option json.formatter.indentWidth, and deprecated the option json.formatter.indentSize. Contributed by @ematipico

  • Add option include to multiple sections of the configuration

    • files.include;
    • formatter.include;
    • linter.include;
    • organizeImports.include;
      When include and ignore are both specified, ignore takes precedence over include
  • Add option overrides, where users can modify the behaviour of the tools for certain files or paths.

    For example, it's possible to modify the formatter lineWidth, and even quoteStyle for certain files that are included in glob path generated/**:

    {
      "formatter": {
        "lineWidth": 100
      },
      "overrides": [
        {
          "include": ["generated/**"],
          "formatter": {
            "lineWidth": 160
          },
          "javascript": {
            "formatter": {
              "quoteStyle": "single"
            }
          }
        }
      ]
    }

    Or, you can disable certain rules for certain path, and disable the linter for other paths:

    {
      "linter": {
        "enabled": true,
        "rules": {
          "recommended": true
        }
      },
      "overrides": [
        {
          "include": ["lib/**"],
          "linter": {
            "rules": {
              "suspicious": {
                "noDebugger": "off"
              }
            }
          }
        },
        {
          "include": ["shims/**"],
          "linter": {
            "enabled": false
          }
        }
      ]
    }

Bug fixes

  • Fix #343, extends was incorrectly applied to the biome.json file. Contributed by @ematipico

Editors

Bug fixes

  • Fix #404. Biome intellij plugin now works on Windows. Contributed by @victor-teles

  • Fix #402. Biome format on intellij plugin now recognize biome.json. Contributed by @victor-teles

Formatter

Enhancements

  • Use OnceCell for the Memoized memory because that's what the RefCell<Option> implemented. Contributed by @denbezrukov

Linter

Promoted rules

The following rules are now recommended:

Bug fixes

New features

Read more

VSCode Extension v1.5.20231014

14 Oct 07:19
Compare
Choose a tag to compare
Pre-release

Analyzer

Enhancements

  • Import sorting is safe to apply now, and it will be applied when running check --apply instead of check --apply-unsafe.

  • Import sorting now handles Bun imports bun:<name>, absolute path imports /<path>, and Node's subpath imports #<name>. See our documentation for more details. Contributed by @Conaclos

CLI

Bug fixes

  • Fix #319. The command biome lint now shows the correct options. Contributed by @ematipico
  • Fix #312. Running biome --version now exits with status code 0 instead of 1. Contributed by @nhedger
  • Fix a bug where the extends functionality doesn't carry over organizeImports.ignore. Contributed by @ematipico

New features

  • Add support for BIOME_BINARY environment variable to override the location of the binary. Contributed by @ematipico

  • Add option --indent-width, and deprecated the option --indent-size. Contributed by @ematipico

  • Add option --javascript-formatter-indent-width, and deprecated the option --javascript-formatter-indent-size. Contributed by @ematipico

  • Add option --json-formatter-indent-width, and deprecated the option --json-formatter-indent-size. Contributed by @ematipico

  • Add option --daemon-logs to biome rage. The option is required to view Biome daemon server logs. Contributed by @unvalley

  • Add support for logging. By default, Biome doesn't log anything other than diagnostics. Logging can be enabled with the new option --log-level:

    biome format --log-level=info ./src

    There are four different levels of logging, from the most verbose to the least verbose: debug, info, warn and error. Here's how an INFO log will look like:

    2023-10-05T08:27:01.954727Z  INFO  Analyze file ./website/src/playground/components/Resizable.tsx
      at crates/biome_service/src/file_handlers/javascript.rs:298 on biome::worker_5
      in Pulling diagnostics with categories: RuleCategories(SYNTAX)
      in Processes formatting with path: "./website/src/playground/components/Resizable.tsx"
      in Process check with path: "./website/src/playground/components/Resizable.tsx"
    

    You can customize how the log will look like with a new option --log-kind. The supported kinds are: pretty, compact and json.

    pretty is the default logging. Here's how a compact log will look like:

    2023-10-05T08:29:04.864247Z  INFO biome::worker_2 Process check:Processes linting:Pulling diagnostics: crates/biome_service/src/file_handlers/javascript.rs: Analyze file ./website/src/playground/components/Resizable.tsx path="./website/src/playground/components/Resizable.tsx" path="./website/src/playground/components/Resizable.tsx" categories=RuleCategories(LINT)
    2023-10-05T08:29:04.864290Z  INFO biome::worker_7 Process check:Processes formatting: crates/biome_service/src/file_handlers/javascript.rs: Format file ./website/src/playground/components/Tabs.tsx path="./website/src/playground/components/Tabs.tsx" path="./website/src/playground/components/Tabs.tsx"
    2023-10-05T08:29:04.879332Z  INFO biome::worker_2 Process check:Processes formatting:Pulling diagnostics: crates/biome_service/src/file_handlers/javascript.rs: Analyze file ./website/src/playground/components/Resizable.tsx path="./website/src/playground/components/Resizable.tsx" path="./website/src/playground/components/Resizable.tsx" categories=RuleCategories(SYNTAX)
    2023-10-05T08:29:04.879383Z  INFO biome::worker_2 Process check:Processes formatting: crates/biome_service/src/file_handlers/javascript.rs: Format file ./website/src/playground/components/Resizable.tsx path="./website/src/playground/components/Resizable.tsx" path="./website/src/playground/components/Resizable.tsx"
    

Enhancements

  • Deprecated the environment variable ROME_BINARY. Contributed by @ematipico
  • Biome doesn't check anymore the presence of the .git folder when VCS support is enabled. Contributed by @ematipico

Configuration

New features

  • Add option formatter.indentWidth, and deprecated the option formatter.indentSize. Contributed by @ematipico
  • Add option javascript.formatter.indentWidth, and deprecated the option javascript.formatter.indentSize. Contributed by @ematipico
  • Add option json.formatter.indentWidth, and deprecated the option json.formatter.indentSize. Contributed by @ematipico
  • Add option include to multiple sections of the configuration
    • files.include;
    • formatter.include;
    • linter.include;
    • organizeImports.include;
      When include and ignore are both specified, ignore takes precedence over include

Bug fixes

  • Fix #343, extends was incorrectly applied to the biome.json file. Contributed by @ematipico

Editors

Bug fixes

  • Fix #404. Biome intellij plugin now works on Windows. Contributed by @victor-teles

  • Fix #402. Biome format on intellij plugin now recognize biome.json. Contributed by @victor-teles

Formatter

Enhancements

  • Use OnceCell for the Memoized memory because that's what the RefCell<Option> implemented. Contributed by @denbezrukov

JavaScript APIs

Linter

Bug fixes

New features

Enhancements

Bug fixes

Read more

VSCode Extension v1.5.20231006

06 Oct 18:37
9264c09
Compare
Choose a tag to compare
Pre-release

Analyzer

Enhancements

  • Import sorting is safe to apply now, and it will be applied when running check --apply instead of check --apply-unsafe.

CLI

Bug fixes

  • Fix #319. The command biome lint now shows the correct options. Contributed by @ematipico
  • Fix #312. Running biome --version now exits with status code 0 instead of 1. Contributed by @nhedger
  • Fix a bug where the extends functionality doesn't carry over organizeImports.ignore. Contributed by @ematipico

New features

  • Add support for BIOME_BINARY environment variable to override the location of the binary. Contributed by @ematipico

  • Add option --indent-width, and deprecated the option --indent-size. Contributed by @ematipico

  • Add option --javascript-formatter-indent-width, and deprecated the option --javascript-formatter-indent-size. Contributed by @ematipico

  • Add option --json-formatter-indent-width, and deprecated the option --json-formatter-indent-size. Contributed by @ematipico

  • Add option --daemon-logs to biome rage. The option is required to view Biome daemon server logs. Contributed by @unvalley

  • Add support for logging. By default, Biome doesn't log anything other than diagnostics. Logging can be enabled with the new option --log-level:

    biome format --log-level=info ./src

    There are four different levels of logging, from the most verbose to the least verbose: debug, info, warn and error. Here's how an INFO log will look like:

    2023-10-05T08:27:01.954727Z  INFO  Analyze file ./website/src/playground/components/Resizable.tsx
      at crates/biome_service/src/file_handlers/javascript.rs:298 on biome::worker_5
      in Pulling diagnostics with categories: RuleCategories(SYNTAX)
      in Processes formatting with path: "./website/src/playground/components/Resizable.tsx"
      in Process check with path: "./website/src/playground/components/Resizable.tsx"
    

    You can customize how the log will look like with a new option --log-kind. The supported kinds are: pretty, compact and json.

    pretty is the default logging. Here's how a compact log will look like:

    2023-10-05T08:29:04.864247Z  INFO biome::worker_2 Process check:Processes linting:Pulling diagnostics: crates/biome_service/src/file_handlers/javascript.rs: Analyze file ./website/src/playground/components/Resizable.tsx path="./website/src/playground/components/Resizable.tsx" path="./website/src/playground/components/Resizable.tsx" categories=RuleCategories(LINT)
    2023-10-05T08:29:04.864290Z  INFO biome::worker_7 Process check:Processes formatting: crates/biome_service/src/file_handlers/javascript.rs: Format file ./website/src/playground/components/Tabs.tsx path="./website/src/playground/components/Tabs.tsx" path="./website/src/playground/components/Tabs.tsx"
    2023-10-05T08:29:04.879332Z  INFO biome::worker_2 Process check:Processes formatting:Pulling diagnostics: crates/biome_service/src/file_handlers/javascript.rs: Analyze file ./website/src/playground/components/Resizable.tsx path="./website/src/playground/components/Resizable.tsx" path="./website/src/playground/components/Resizable.tsx" categories=RuleCategories(SYNTAX)
    2023-10-05T08:29:04.879383Z  INFO biome::worker_2 Process check:Processes formatting: crates/biome_service/src/file_handlers/javascript.rs: Format file ./website/src/playground/components/Resizable.tsx path="./website/src/playground/components/Resizable.tsx" path="./website/src/playground/components/Resizable.tsx"
    

Enhancements

  • Deprecated the environment variable ROME_BINARY. Contributed by @ematipico
  • Biome doesn't check anymore the presence of the .git folder when VCS support is enabled. Contributed by @ematipico

Configuration

New features

  • Add option formatter.indentWidth, and deprecated the option formatter.indentSize. Contributed by @ematipico
  • Add option javascript.formatter.indentWidth, and deprecated the option javascript.formatter.indentSize. Contributed by @ematipico
  • Add option json.formatter.indentWidth, and deprecated the option json.formatter.indentSize. Contributed by @ematipico
  • Add option include to multiple sections of the configuration
    • files.include;
    • formatter.include;
    • linter.include;
    • organizeImports.include;
      When include and ignore are both specified, ignore takes precedence over include

Editors

Bug fixes

  • Fix #404. Biome intellij plugin now works on Windows. Contributed by @victor-teles

  • Fix #402. Biome format on intellij plugin now recognize biome.json. Contributed by @victor-teles

Formatter

Enhancements

  • Use OnceCell for the Memoized memory because that's what the RefCell<Option> implemented. Contributed by @denbezrukov

JavaScript APIs

Linter

Bug fixes

New features

Enhancements

Bug fixes

Parser

  • Enhance diagnostic for infer type handling in the parser. The 'infer' keyword can only be utilized within the 'extends' clause of a conditional type. Using it outside of this context will result in an error. Ensure that any type declarations using 'infer' are correctly placed within the conditional type structure to avoid parsing issues. Contributed by @denbezrukov

  • Add support for parsing trailing commas inside JSON files:

    {
      "json": {
        "parser": {
          "allowTrailingCommas": true
        }
      }
    }

    Contributed by @nissy-dev

VSCode

What's Changed

Other changes

  • chore: improve diagnostic message for `n...
Read more