Socket
Socket
Sign inDemoInstall

@biomejs/biome

Package Overview
Dependencies
8
Maintainers
4
Versions
62
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
Previous123567Next

1.4.1-nightly.efc084c

Diff

dominionl
published 1.4.1-nightly.e087146 •

dominionl
published 1.4.1-nightly.570d680 •

dominionl
published 1.4.1-nightly.bc772a3 •

dominionl
published 1.4.1 •

Changelog

Source

1.4.1 (2023-11-30)

Editors

Bug fixes
  • Fix #933. Some files are properly ignored in the LSP too. E.g. package.json, tsconfig.json, etc.
  • Fix #1394, by inferring the language extension from the internal saved files. Now newly created files JavaScript correctly show diagnostics.

Formatter

Bug fixes
  • Fix some accidental line breaks when printing array expressions within arrow functions and other long lines #917. Contributed by @faultyserver

  • Match Prettier's breaking strategy for ArrowChain layouts #934. Contributed by @faultyserver

  • Fix double-printing of leading comments in arrow chain expressions #951. Contributed by @faultyserver

Linter

Bug fixes
  • Fix #910, where the rule noSvgWithoutTitle should skip elements that have aria-hidden attributes. Contributed by @vasucp1207
New features
  • Add useForOf rule. The rule recommends a for-of loop when the loop index is only used to read from an array that is being iterated. Contributed by @victor-teles
Enhancement
  • Address #924 and #920. noUselessElse now ignores else clauses that follow at least one if statement that doesn't break early. Contributed by @Conaclos

    For example, the following code is no longer reported by the rule:

    function f(x) {
        if (x < 0) {
          // this `if` doesn't break early.
        } else if (x > 0) {
            return x;
        } else {
            // This `else` block was previously reported as useless.
        }
    }
    
Bug fixes

Fix #918. useSimpleNumberKeys no longer repports false positive on comments. Contributed by @kalleep

  • Fix #953. noRedeclare no longer reports type parameters with the same name in different mapped types as redeclarations. Contributed by @Conaclos

Fix #608. useExhaustiveDependencies no longer repports missing dependencies for React hooks without dependency array. Contributed by @kalleep

Parser

dominionl
published 1.4.0 •

Changelog

Source

1.4.0 (2023-11-27)

CLI

  • Remove the CLI options from the lsp-proxy, as they were never meant to be passed to that command. Contributed by @ematipico

  • Add option --config-path to lsp-proxy and start commands. It's now possible to tell the Daemon server to load biome.json from a custom path. Contributed by @ematipico

  • Add option --diagnostic-level. It lets users control the level of diagnostics printed by the CLI. Possible values are: "info", "warn", and "hint". Contributed by @simonxabris

  • Add option --line-feed to the format command. Contributed by @SuperchupuDev

  • Add option --bracket-same-line to the format command. Contributed by @faultyserver

  • Add option --bracket-spacing to the format command. Contributed by @faultyserver

Bug fixes
  • Fix the command format, now it returns a non-zero exit code when if there pending diffs. Contributed by @ematipico

Formatter

New features
  • Add the configuration formatter.lineFeed. It allows changing the type of line endings. Contributed by @SuperchupuDev

  • Add the configuration javascript.formatter.bracketSameLine. It allows controlling whether ending > of a multi-line JSX element should be on the last attribute line or not. #627. Contributed by @faultyserver

  • Add the configuration javascript.formatter.bracketSpacing. It allows controlling whether spaces are inserted around the brackets of object literals. #627. Contributed by @faultyserver

Bug fixes
  • Fix #832, the formatter no longer keeps an unnecessary trailing comma in type parameter lists. Contributed by @Conaclos

    - class A<T,> {}
    + class A<T> {}
    
  • Fix #301, the formatter should not break before the in keyword. Contributed by @ematipico

Linter

Promoted rules

The following rules are now recommended:

The following rules are now deprecated:

New features
  • Add noDefaultExport which disallows export default. Contributed by @Conaclos

  • Add noAriaHiddenOnFocusable which reports hidden and focusable elements. Contributed by @vasucp1207

  • Add noImplicitAnyLet that reports variables declared with let and without initialization and type annotation. Contributed by @TaKO8Ki and @b4s36t4

  • Add useAwait that reports async functions that don't use an await expression.

  • Add useValidAriaRole. Contributed by @vasucp1207

  • Add useRegexLiterals that suggests turning call to the regex constructor into regex literals. COntributed by @Yuiki

Enhancements
Bug fixes
  • Fix #639 by ignoring unused TypeScript's mapped key. Contributed by @Conaclos

  • Fix #565 by handling several infer with the same name in extends clauses of TypeScript's conditional types. Contributed by @Conaclos

Fix #653. noUnusedImports now correctly removes the entire line where the unused import is. Contributed by @Conaclos

  • Fix #607 useExhaustiveDependencies, ignore optional chaining, Contributed by @msdlisper

  • Fix #676, by using the correct node for the "noreferrer" when applying the code action. Contributed by @ematipico

  • Fix #455. The CLI can now print complex emojis to the console correctly.

Fix #727. noInferrableTypes now correctly keeps type annotations when the initialization expression is null. Contributed by @Conaclos

Fix #784, noSvgWithoutTitle fixes false-positives to aria-label and reports svg's role attribute is implicit. Contributed by @unvalley

Parser

Bug fixes
  • Fix #846 that erroneously parsed <const T,>() => {} as a JSX tag instead of an arrow function when both TypeScript and JSX are enabled.

VSCode

dominionl
published 1.3.3-nightly.38797b7 •

dominionl
published 1.3.3-nightly.ced82da •

dominionl
published 1.3.3-nightly.8475169 •

dominionl
published 1.3.3 •

Changelog

Source

1.3.3 (2023-10-31)

Analyzer

Bug fixes
  • Fix #604 which made noConfusingVoidType report false positives when the void type is used in a generic type parameter. Contributed by @unvalley

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
  • Fix how overrides are run. The properties ignore and include have different semantics and only apply/not apply an override. 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 an await expression or a yield expression. Contributed by @ematipico

  • Fix #303, where nested arrow functions didn't break. Contributed by @victor-teles

Linter

New features
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 #861 that made noUnusedVariables always reports the parameter of a non-parenthesize arrow function as unused.

  • 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 #609 useExhaustiveDependencies, by removing useContext, useId and useSyncExternalStore from the known hooks. Contributed by @msdlisper

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

  • Fix #871 and #610. Now useHookAtTopLevel correctly handles nested functions. Contributed by @arendjr

  • The options of the rule useHookAtTopLevel are deprecated and will be removed in Biome 2.0. The rule now determines the hooks using the naming convention set by React.

    {
      "linter": {
        "rules": {
          "correctness": {
    +        "useHookAtTopLevel": "error",
    -        "useHookAtTopLevel": {
    -          "level": "error",
    -          "options": {
    -            "hooks": [
    -              {
    -                "name": "useLocation",
    -                "closureIndex": 0,
    -                "dependenciesIndex": 1
    -              },
    -              { "name": "useQuery", "closureIndex": 1, "dependenciesIndex": 0 }
    -            ]
    -          }
    -        }
          }
        }
      }
    }
    

Parser

Enhancements
  • Support RegExp v flag. Contributed by @nissy-dev
  • Improve error messages. Contributed by @ematipico
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc