Giter Site home page Giter Site logo

biomejs / biome Goto Github PK

View Code? Open in Web Editor NEW
10.5K 38.0 345.0 189.44 MB

A toolchain for web projects, aimed to provide functionalities to maintain them. Biome offers formatter and linter, usable via CLI and LSP.

Home Page: https://biomejs.dev

License: Apache License 2.0

Shell 0.03% JavaScript 16.12% Rust 72.56% TypeScript 4.45% CSS 1.77% SCSS 0.26% Astro 0.70% Just 0.03% MDX 4.09% HTML 0.01%
css formatter javascript jsx linter static-code-analysis typescript web json

biome's People

Contributors

arendjr avatar bitpshr avatar boshen avatar conaclos avatar denbezrukov avatar diokey avatar eduardolopes avatar ematipico avatar faultyserver avatar iwanabethatguy avatar jer3m01 avatar justbeyou avatar kelbie avatar leops avatar macovedj avatar mattcompiles avatar michareiser avatar nhedger avatar nissy-dev avatar ooflorent avatar sebmck avatar sec-ant avatar togami2864 avatar unvalley avatar vasucp1207 avatar victor-teles avatar victorhom avatar xunilrj avatar yassere avatar yeonjuan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

biome's Issues

πŸ“Ž Implement `json.parser.allowTrailingCommas`

Description

As reported in #83, some config files support trailing comma.
json.parser.allowTrailingCommas: true enables trailing commas in json and jsonc files, making the following example valid:

{
  "prop1": [
    1,
    2,
  ],
  "prop2": 0,
}

Similar to json.parser.allowComments, json.parser.allowTrailingCommas: true should be enabled by default when parsing files such as tsconfig.json, VSCode config files, and others?

πŸ› `useEnumInitializers` should not emit diagnostics in ambient namespaces

Environment information

main branch.

What happened?

The following code should not emit diagnostics:

declare namespace X {
  enum Enum {
    A,
    B,
  }
}

Here the namespace creates an ambient context, making Enum an ambient enum.
The rule thinks that Enum is a concrete enum.

Note that the issue is recursive:

export declare namespace X {
    export namespace Y {
        export enum Enum {
            A,
            B,
        }
    }
}

See this example in the playground.

Expected result

Enum should be recognized as an ambient enum and thus the rule should ignore the enum.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

πŸ› Multiple VS Code sessions causing an error

Environment information

CLI:
  Version:                      1.0.0
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v18.17.1"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "yarn/3.6.2"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Workspace:
  Open Documents:               0


CLI:
  Version:                      1.0.0
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v18.17.1"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "yarn/3.6.2"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Workspace:
  Open Documents:               0

Discovering running Biome servers...

Incompatible Biome Server: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

β„Ή Rage discovered this running server using an incompatible version of Biome.

Server:
  Version:                      <=10.0.0

What happened?

  1. user1 starts VS Code with remote connection to Ubuntu Server 22.04.3 LTS
  2. user2 starts VS Code with remote connection to Ubuntu Server 22.04.3 LTS
  3. user2 receives permissions error relating to connecting to the the existing LSP
[cli-stderr] data 216
[cli-stderr] end
[cli-stdout] end
[cli] exit 1
[Error - 11:56:39 AM] Biome client: couldn't create connection to server.
Error: Command "/home/user2/.vscode-server/extensions/biomejs.biome-1.0.1-linux-x64/server/biome __print_socket" exited with code 1
Output:
internalError/io ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  Γ— Errors occurred while executing I/O operations.
    
    Caused by:
      Permission denied (os error 13)
  


	at getSocket (/home/user2/.vscode-server/extensions/biomejs.biome-1.0.1-linux-x64/out/main.js:19599:11)
	at processTicksAndRejections (node:internal/process/task_queues:96:5)
	at async createMessageTransports (/home/user2/.vscode-server/extensions/biomejs.biome-1.0.1-linux-x64/out/main.js:19614:16)
	at async LanguageClient2.createConnection (/home/user2/.vscode-server/extensions/biomejs.biome-1.0.1-linux-x64/out/main.js:15576:28)
	at async LanguageClient2.start (/home/user2/.vscode-server/extensions/biomejs.biome-1.0.1-linux-x64/out/main.js:15152:30)
	at async activate (/home/user2/.vscode-server/extensions/biomejs.biome-1.0.1-linux-x64/out/main.js:19406:3)
	at async p.n (/home/user2/.vscode-server/bin/6c3e3dba23e8fadc360aed75ce363ba185c49794/out/vs/workbench/api/node/extensionHostProcess.js:103:6206)
	at async p.m (/home/user2/.vscode-server/bin/6c3e3dba23e8fadc360aed75ce363ba185c49794/out/vs/workbench/api/node/extensionHostProcess.js:103:6169)
	at async p.l (/home/user2/.vscode-server/bin/6c3e3dba23e8fadc360aed75ce363ba185c49794/out/vs/workbench/api/node/extensionHostProcess.js:103:5626)
[cli-stdout] close
[cli] close 1
[cli-stderr] close

Expected result

LSP would be started under a different socket/port and connected normally.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

πŸ› lint/suspicious/noRedeclare breaks *.d.ts files

Environment information

CLI:
  Version:                      1.0.0
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v20.3.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "pnpm/8.6.0"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Workspace:
  Open Documents:               0

Discovering running Biome servers...

Incompatible Biome Server: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

i Rage discovered this running server using an incompatible version of Biome.

Server:
  Version:                      <=10.0.0

What happened?

Not sure it is related to Rome or Biome. Error exists on a commonly pre-generated react types file.

screencapture 2023-09-04 135257

Expected result

It should not throw an error. Or is there any configuration i missed?

Code of Conduct

  • I agree to follow Biome's Code of Conduct

πŸ“Ž Implement `biome lint --summary`

Description

See rome#4747 for some context.

biome lint --summary should print a summary which allows figuring out which rule raised diagnostics and how many.

$ biome lint --summary src

Rule name                          Diagnostics
nursery/useNamingConvention        2509
style/useSingleCaseStatement       2000
...

Checked 657 file(s) in 3s
Skipped 2 file(s)

The summary should avoid unnecessary works (no need to call diagnostic and action on the rules).

We could suggest using --summary when the number of diagnostics exceeds max-diagnostics:

$ rome lint src
...
src/services/types.ts:1121:5 lint/nursery/useNamingConvention ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ⚠ This property name should be in camelCase.
  
  > 1121 β”‚     InsertSpaceAfterConstructor?: boolean;
         β”‚     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  
  β„Ή The name could be renamed to `insertSpaceAfterConstructor`.


The number of diagnostics exceeds the number allowed by Biome.
Diagnostics not shown: 7564.
Checked 657 file(s) in 3s
Skipped 2 file(s)

Run `biome lint --summary src` to print a summary of the rules that emitted diagnistics.

πŸ“Ž Support `biome-ignore` comment

Description

For now, we still use rome-ignore comment.
We should support both and emit a deprecation diagnostic for rome-ignore comments.

The migration command should turn rome-ignore into biome-ignore.

  • Update comment parsing in the formatter
  • Update comment parsing in the linter
  • #156
  • Create rule to update // rome-ignore to // biome-ignore

πŸ“Ž Implement `biome lint --rule=<rule-name>`

Description

Executing biome lint --rule=<rule-name> should only run the rule with name <rule-name>, otherwise it will throw an error. See rome#4747 for more context.

EDIT: --rule=<rule-name> should override the config, i.e. run <rule-name> even if the rule is disabled in the config. However, the rule options and severity level should be taken into account.

If the option is combined with --summary (e.g. biome lint --summary --rule=<rule-name>) we should restrict the summary to <rule-name>. See #57 for more details about the --summary option.

An example:

$ biome lint --rule useSingleCaseStatement src

src/services/types.ts:1121:5 lint/nursery/useNamingConvention ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ⚠ This property name should be in camelCase.
  
  > 1121 β”‚     InsertSpaceAfterConstructor?: boolean;
         β”‚     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  
  β„Ή The name could be renamed to `insertSpaceAfterConstructor`.


$ biome lint --summary --rule useSingleCaseStatement src

Rule name                          Diagnostics
nursery/useSingleCaseStatement        1

Possible extensions

  • Multi rule filtering (keeping diagnostics of a given set of rules)
  • reverse filtering, i.e. keeping all diagnostics except the diagnostics of a given rule

πŸ“Ž Implement `lint/useConsistentArrayType` - `typescript-eslint/array-type`

Description

@typescript-eslint/array-type

This should integrate and eventually replace useShorthandArrayType.

The difference is that useConsistentArrayType provides a setting to enforce Array<T> syntax instead of the shorthand T[].

Want to contribute? Lets we know you are interested! We will assign you to the issue to prevent several people to work on the same issue. Don't worry, we can unassign you later if you are no longer interested in the issue! Read our contributing guide and analyzer contributing guide.

πŸ› Prefer biome.json over rome.json

Environment information

You have both a rome.json and biome.json file while you migrate your build system.

What happened?

If you have both a rome.json file (for reasons) and a biome.json file, biome reads the rome.json file and ignores the biome.json file.

Expected result

It should prefer the biome config file and fall back to the rome one if not found.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

πŸ› `lint/correctness/noUndeclaredVariables` doesn't recognize type Uppercase

Environment information

CLI:
  Version:                      1.0.0  
  Color support:                true   

Platform:
  CPU Architecture:             x86_64 
  OS:                           windows

Environment:
  BIOME_LOG_DIR:                unset  
  NO_COLOR:                     unset
  TERM:                         unset
  JS_RUNTIME_VERSION:           "v20.3.1"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/9.6.7"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Workspace:
  Open Documents:               0

Discovering running Biome servers...

Incompatible Biome Server: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

i Rage discovered this running server using an incompatible version of Biome.

Server:
  Version:                      <=10.0.0

What happened?

// The Uppercase variable is undeclared lint/correctness/noUndeclaredVariables
export type AnyStringToUpper<T extends string> = Uppercase<T>;

playground

Expected result

No error

Code of Conduct

  • I agree to follow Biome's Code of Conduct

πŸ› `noUnusedVariables` not looking at inner functions against a declared variable for a match

Environment information

CLI:
  Version:                      1.0.0
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v16.14.2"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/8.5.0"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           true
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Workspace:
  Open Documents:               0

Discovering running Biome servers...

Incompatible Biome Server: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

β„Ή Rage discovered this running server using an incompatible version of Biome.

Server:
  Version:                      12.1.3

Incompatible Biome Server: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

β„Ή Rage discovered this running server using an incompatible version of Biome.

Server:
  Version:                      <=10.0.0

Running Biome Server: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

β„Ή The client isn't connected to any server but rage discovered this running Biome server.

Server:
  Version:                      1.0.0
  Name:                         rome_lsp
  CPU Architecture:             aarch64
  OS:                           macos

Workspace:
  Open Documents:               0

Other Active Server Workspaces:

Workspace:
  Open Documents:               4
  Client Name:                  Visual Studio Code
  Client Version:               1.81.1

Biome Server Log:

⚠ Please review the content of the log file before sharing it publicly as it may contain sensitive information:
  * Path names that may reveal your name, a project name, or the name of your employer.
  * Source code

INFO tower_lsp::service::layers shutdown request received, shutting down
INFO tower_lsp::service::layers exit notification received, stopping
ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
INFO rome_cli::commands::daemon Received shutdown signal
INFO rome_cli::service::unix Trying to connect to socket /var/folders/0v/w61lqyb97l37zrp46x8s24900000gn/T/rome-socket-1.0.0
INFO rome_cli::service::unix Remove socket folder /var/folders/0v/w61lqyb97l37zrp46x8s24900000gn/T/rome-socket-1.0.0
ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
INFO rome_lsp::server Starting Biome Language Server...
WARN rome_lsp::server The Biome Server was initialized with the deprecated `root_path` parameter: this is not supported, use `root_uri` instead
WARN rome_lsp::server The Biome Server was initialized with the `workspace_folders` parameter: this is unsupported at the moment, use `root_uri` instead
INFO rome_lsp::server Attempting to load the configuration from 'biome.json' file
ERROR rome_fs::fs Could not read the file from "/rome.json", reason:
 No such file or directory (os error 2)
INFO rome_lsp::session Loaded workspace settings: Configuration {
    schema: Some(
        "https://biomejs.dev/schemas/1.0.0/schema.json",
    ),
    vcs: None,
    files: Some(
        FilesConfiguration {
            max_size: None,
            ignore: Some(
                StringSet(
                    {
                        "*.json",
                        "client/src/components/api.ts",
                        "seed/src/components/api.ts",
                        "client/src/components/model/translationKeys.ts",
                        "server/src/components/translations/translationKeys.ts",
                        "shared/version.ts",
                    },
                ),
            ),
            ignore_unknown: None,
        },
    ),
    formatter: Some(
        FormatterConfiguration {
            enabled: Some(
                false,
            ),
            format_with_errors: Some(
                false,
            ),
            indent_style: Some(
                Tab,
            ),
            indent_size: Some(
                2,
            ),
            line_width: Some(
                LineWidth(
                    80,
                ),
            ),
            ignore: None,
        },
    ),
    organize_imports: Some(
        OrganizeImports {
            enabled: Some(
                true,
            ),
            ignore: None,
        },
    ),
    linter: Some(
        LinterConfiguration {
            enabled: Some(
                true,
            ),
            rules: Some(
                Rules {
                    recommended: Some(
                        true,
                    ),
                    all: None,
                    a11y: None,
                    complexity: Some(
                        Complexity {
                            recommended: None,
                            all: None,
                            no_extra_boolean_cast: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_for_each: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_multiple_spaces_in_regular_expression_literals: None,
                            no_useless_catch: None,
                            no_useless_constructor: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_useless_fragments: None,
                            no_useless_label: None,
                            no_useless_rename: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_useless_switch_case: None,
                            no_useless_type_constraint: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_with: None,
                            use_flat_map: None,
                            use_literal_keys: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            use_optional_chain: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            use_simple_number_keys: None,
                            use_simplified_logic_expression: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                        },
                    ),
                    correctness: Some(
                        Correctness {
                            recommended: None,
                            all: None,
                            no_children_prop: None,
                            no_const_assign: None,
                            no_constructor_return: None,
                            no_empty_pattern: None,
                            no_global_object_calls: None,
                            no_inner_declarations: None,
                            no_invalid_constructor_super: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_new_symbol: None,
                            no_precision_loss: None,
                            no_render_return_value: None,
                            no_setter_return: None,
                            no_string_case_mismatch: None,
                            no_switch_declarations: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_undeclared_variables: None,
                            no_unnecessary_continue: None,
                            no_unreachable: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_unreachable_super: None,
                            no_unsafe_finally: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_unsafe_optional_chaining: None,
                            no_unused_labels: None,
                            no_unused_variables: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_void_elements_with_children: None,
                            no_void_type_return: None,
                            use_is_nan: None,
                            use_valid_for_direction: None,
                            use_yield: None,
                        },
                    ),
                    nursery: Some(
                        Nursery {
                            recommended: None,
                            all: None,
                            no_accumulating_spread: None,
                            no_aria_unsupported_elements: None,
                            no_banned_types: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_confusing_arrow: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_constant_condition: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_control_characters_in_regex: None,
                            no_duplicate_json_keys: None,
                            no_excessive_complexity: None,
                            no_fallthrough_switch_clause: None,
                            no_global_is_finite: None,
                            no_global_is_nan: None,
                            no_noninteractive_tabindex: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_nonoctal_decimal_escape: None,
                            no_redundant_roles: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_self_assign: None,
                            no_static_only_class: None,
                            no_unsafe_declaration_merging: None,
                            no_useless_empty_export: None,
                            no_useless_this_alias: None,
                            no_void: None,
                            use_aria_prop_types: None,
                            use_arrow_function: None,
                            use_exhaustive_dependencies: None,
                            use_getter_return: None,
                            use_grouped_type_import: None,
                            use_hook_at_top_level: None,
                            use_import_restrictions: None,
                            use_is_array: None,
                            use_literal_enum_members: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            use_naming_convention: None,
                        },
                    ),
                    performance: Some(
                        Performance {
                            recommended: None,
                            all: None,
                            no_delete: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                        },
                    ),
                    security: None,
                    style: Some(
                        Style {
                            recommended: None,
                            all: None,
                            no_arguments: None,
                            no_comma_operator: None,
                            no_implicit_boolean: None,
                            no_inferrable_types: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_namespace: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_negation_else: None,
                            no_non_null_assertion: None,
                            no_parameter_assign: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_parameter_properties: None,
                            no_restricted_globals: None,
                            no_shouty_constants: None,
                            no_unused_template_literal: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_var: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            use_block_statements: None,
                            use_const: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            use_default_parameter_last: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            use_enum_initializers: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            use_exponentiation_operator: None,
                            use_fragment_syntax: None,
                            use_numeric_literals: None,
                            use_self_closing_elements: None,
                            use_shorthand_array_type: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            use_single_case_statement: None,
                            use_single_var_declarator: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            use_template: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            use_while: None,
                        },
                    ),
                    suspicious: Some(
                        Suspicious {
                            recommended: None,
                            all: None,
                            no_array_index_key: None,
                            no_assign_in_expressions: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_async_promise_executor: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_catch_assign: None,
                            no_class_assign: None,
                            no_comment_text: None,
                            no_compare_neg_zero: None,
                            no_confusing_labels: None,
                            no_console_log: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_const_enum: None,
                            no_debugger: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_double_equals: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_duplicate_case: None,
                            no_duplicate_class_members: None,
                            no_duplicate_jsx_props: None,
                            no_duplicate_object_keys: None,
                            no_duplicate_parameters: None,
                            no_empty_interface: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_explicit_any: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_extra_non_null_assertion: None,
                            no_function_assign: None,
                            no_import_assign: None,
                            no_label_var: None,
                            no_prototype_builtins: None,
                            no_redeclare: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_redundant_use_strict: None,
                            no_self_compare: None,
                            no_shadow_restricted_names: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_sparse_array: None,
                            no_unsafe_negation: None,
                            use_default_switch_clause_last: None,
                            use_namespace_keyword: None,
                            use_valid_typeof: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                        },
                    ),
                },
            ),
            ignore: None,
        },
    ),
    javascript: Some(
        JavascriptConfiguration {
            formatter: Some(
                JavascriptFormatter {
                    quote_style: Some(
                        Single,
                    ),
                    jsx_quote_style: None,
                    quote_properties: None,
                    trailing_comma: Some(
                        Es5,
                    ),
                    semicolons: None,
                    arrow_parentheses: None,
                },
            ),
            parser: Some(
                JavascriptParser {
                    unsafe_parameter_decorators_enabled: Some(
                        true,
                    ),
                },
            ),
            globals: None,
            organize_imports: None,
        },
    ),
    json: None,
    extends: None,
}
INFO rome_lsp::session Loaded client configuration: Object {
    "lspBin": Null,
    "rename": Null,
    "requireConfiguration": Bool(true),
}
INFO rome_lsp::session Unregister capabilities "textDocument/rangeFormatting, textDocument/onTypeFormatting, workspace/didChangeWatchedFiles, textDocument/rename, textDocument/formatting, workspace/didChangeConfiguration"
INFO rome_lsp::session Register capabilities "textDocument/rangeFormatting, textDocument/onTypeFormatting, workspace/didChangeWatchedFiles, textDocument/formatting, workspace/didChangeConfiguration"
INFO rome_lsp::session Loaded client configuration: Object {
    "lspBin": Null,
    "rename": Null,
    "requireConfiguration": Bool(true),
}
INFO rome_lsp::session Unregister capabilities "textDocument/rangeFormatting, textDocument/onTypeFormatting, textDocument/rename, workspace/didChangeConfiguration, workspace/didChangeWatchedFiles, textDocument/formatting"
INFO rome_lsp::session Register capabilities "textDocument/rangeFormatting, textDocument/onTypeFormatting, workspace/didChangeConfiguration, workspace/didChangeWatchedFiles, textDocument/formatting"
WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
ERROR rome_fs::fs Could not read the file from "/rome.json", reason:
 No such file or directory (os error 2)
INFO rome_lsp::session Loaded workspace settings: Configuration {
    schema: Some(
        "https://biomejs.dev/schemas/1.0.0/schema.json",
    ),
    vcs: None,
    files: Some(
        FilesConfiguration {
            max_size: None,
            ignore: Some(
                StringSet(
                    {
                        "*.json",
                        "client/src/components/api.ts",
                        "seed/src/components/api.ts",
                        "client/src/components/model/translationKeys.ts",
                        "server/src/components/translations/translationKeys.ts",
                        "shared/version.ts",
                    },
                ),
            ),
            ignore_unknown: None,
        },
    ),
    formatter: Some(
        FormatterConfiguration {
            enabled: Some(
                false,
            ),
            format_with_errors: Some(
                false,
            ),
            indent_style: Some(
                Tab,
            ),
            indent_size: Some(
                2,
            ),
            line_width: Some(
                LineWidth(
                    80,
                ),
            ),
            ignore: None,
        },
    ),
    organize_imports: Some(
        OrganizeImports {
            enabled: Some(
                true,
            ),
            ignore: None,
        },
    ),
    linter: Some(
        LinterConfiguration {
            enabled: Some(
                true,
            ),
            rules: Some(
                Rules {
                    recommended: Some(
                        true,
                    ),
                    all: None,
                    a11y: None,
                    complexity: Some(
                        Complexity {
                            recommended: None,
                            all: None,
                            no_extra_boolean_cast: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_for_each: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_multiple_spaces_in_regular_expression_literals: None,
                            no_useless_catch: None,
                            no_useless_constructor: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_useless_fragments: None,
                            no_useless_label: None,
                            no_useless_rename: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_useless_switch_case: None,
                            no_useless_type_constraint: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_with: None,
                            use_flat_map: None,
                            use_literal_keys: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            use_optional_chain: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            use_simple_number_keys: None,
                            use_simplified_logic_expression: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                        },
                    ),
                    correctness: Some(
                        Correctness {
                            recommended: None,
                            all: None,
                            no_children_prop: None,
                            no_const_assign: None,
                            no_constructor_return: None,
                            no_empty_pattern: None,
                            no_global_object_calls: None,
                            no_inner_declarations: None,
                            no_invalid_constructor_super: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_new_symbol: None,
                            no_precision_loss: None,
                            no_render_return_value: None,
                            no_setter_return: None,
                            no_string_case_mismatch: None,
                            no_switch_declarations: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_undeclared_variables: None,
                            no_unnecessary_continue: None,
                            no_unreachable: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_unreachable_super: None,
                            no_unsafe_finally: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_unsafe_optional_chaining: None,
                            no_unused_labels: None,
                            no_unused_variables: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_void_elements_with_children: None,
                            no_void_type_return: None,
                            use_is_nan: None,
                            use_valid_for_direction: None,
                            use_yield: None,
                        },
                    ),
                    nursery: Some(
                        Nursery {
                            recommended: None,
                            all: None,
                            no_accumulating_spread: None,
                            no_aria_unsupported_elements: None,
                            no_banned_types: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_confusing_arrow: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_constant_condition: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_control_characters_in_regex: None,
                            no_duplicate_json_keys: None,
                            no_excessive_complexity: None,
                            no_fallthrough_switch_clause: None,
                            no_global_is_finite: None,
                            no_global_is_nan: None,
                            no_noninteractive_tabindex: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_nonoctal_decimal_escape: None,
                            no_redundant_roles: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_self_assign: None,
                            no_static_only_class: None,
                            no_unsafe_declaration_merging: None,
                            no_useless_empty_export: None,
                            no_useless_this_alias: None,
                            no_void: None,
                            use_aria_prop_types: None,
                            use_arrow_function: None,
                            use_exhaustive_dependencies: None,
                            use_getter_return: None,
                            use_grouped_type_import: None,
                            use_hook_at_top_level: None,
                            use_import_restrictions: None,
                            use_is_array: None,
                            use_literal_enum_members: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            use_naming_convention: None,
                        },
                    ),
                    performance: Some(
                        Performance {
                            recommended: None,
                            all: None,
                            no_delete: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                        },
                    ),
                    security: None,
                    style: Some(
                        Style {
                            recommended: None,
                            all: None,
                            no_arguments: None,
                            no_comma_operator: None,
                            no_implicit_boolean: None,
                            no_inferrable_types: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_namespace: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_negation_else: None,
                            no_non_null_assertion: None,
                            no_parameter_assign: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_parameter_properties: None,
                            no_restricted_globals: None,
                            no_shouty_constants: None,
                            no_unused_template_literal: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_var: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            use_block_statements: None,
                            use_const: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            use_default_parameter_last: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            use_enum_initializers: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            use_exponentiation_operator: None,
                            use_fragment_syntax: None,
                            use_numeric_literals: None,
                            use_self_closing_elements: None,
                            use_shorthand_array_type: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            use_single_case_statement: None,
                            use_single_var_declarator: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            use_template: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            use_while: None,
                        },
                    ),
                    suspicious: Some(
                        Suspicious {
                            recommended: None,
                            all: None,
                            no_array_index_key: None,
                            no_assign_in_expressions: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_async_promise_executor: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_catch_assign: None,
                            no_class_assign: None,
                            no_comment_text: None,
                            no_compare_neg_zero: None,
                            no_confusing_labels: None,
                            no_console_log: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_const_enum: None,
                            no_debugger: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_double_equals: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_duplicate_case: None,
                            no_duplicate_class_members: None,
                            no_duplicate_jsx_props: None,
                            no_duplicate_object_keys: None,
                            no_duplicate_parameters: None,
                            no_empty_interface: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_explicit_any: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_extra_non_null_assertion: None,
                            no_function_assign: None,
                            no_import_assign: None,
                            no_label_var: None,
                            no_prototype_builtins: None,
                            no_redeclare: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_redundant_use_strict: None,
                            no_self_compare: None,
                            no_shadow_restricted_names: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_sparse_array: None,
                            no_unsafe_negation: None,
                            use_default_switch_clause_last: None,
                            use_namespace_keyword: None,
                            use_valid_typeof: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                        },
                    ),
                },
            ),
            ignore: None,
        },
    ),
    javascript: Some(
        JavascriptConfiguration {
            formatter: Some(
                JavascriptFormatter {
                    quote_style: Some(
                        Single,
                    ),
                    jsx_quote_style: None,
                    quote_properties: None,
                    trailing_comma: Some(
                        Es5,
                    ),
                    semicolons: None,
                    arrow_parentheses: None,
                },
            ),
            parser: Some(
                JavascriptParser {
                    unsafe_parameter_decorators_enabled: Some(
                        true,
                    ),
                },
            ),
            globals: None,
            organize_imports: None,
        },
    ),
    json: None,
    extends: None,
}
INFO rome_lsp::session Unregister capabilities "workspace/didChangeWatchedFiles, textDocument/rangeFormatting, textDocument/rename, textDocument/formatting, workspace/didChangeConfiguration, textDocument/onTypeFormatting"
INFO rome_lsp::session Register capabilities "workspace/didChangeWatchedFiles, textDocument/rangeFormatting, textDocument/formatting, workspace/didChangeConfiguration, textDocument/onTypeFormatting"
INFO rome_lsp::server Starting Biome Language Server...
ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)

What happened?

See screenshot, inner function variable reference is not being considered even though it's being used.

I am using rxjs for that subscribe/unsubscribe functionality.

I notice a simpler example fails too:

const y = () => {
								console.info(y);
							}
Screenshot 2023-09-01 at 10 00 01

Expected result

It shouldn't be throwing a lint error

Code of Conduct

  • I agree to follow Biome's Code of Conduct

πŸ› `noUnusedVariables` misreporting imports used for type definitions

Environment information

CLI:
  Version:                      1.0.0
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v16.14.2"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/8.5.0"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           true
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Workspace:
  Open Documents:               0

Discovering running Biome servers...

Incompatible Biome Server: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

β„Ή Rage discovered this running server using an incompatible version of Biome.

Server:
  Version:                      12.1.3

Incompatible Biome Server: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

β„Ή Rage discovered this running server using an incompatible version of Biome.

Server:
  Version:                      <=10.0.0

Running Biome Server: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

β„Ή The client isn't connected to any server but rage discovered this running Biome server.

Server:
  Version:                      1.0.0
  Name:                         rome_lsp
  CPU Architecture:             aarch64
  OS:                           macos

Workspace:
  Open Documents:               0

Other Active Server Workspaces:

Workspace:
  Open Documents:               4
  Client Name:                  Visual Studio Code
  Client Version:               1.81.1

Biome Server Log:

⚠ Please review the content of the log file before sharing it publicly as it may contain sensitive information:
  * Path names that may reveal your name, a project name, or the name of your employer.
  * Source code

INFO tower_lsp::service::layers shutdown request received, shutting down
INFO tower_lsp::service::layers exit notification received, stopping
ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
INFO rome_cli::commands::daemon Received shutdown signal
INFO rome_cli::service::unix Trying to connect to socket /var/folders/0v/w61lqyb97l37zrp46x8s24900000gn/T/rome-socket-1.0.0
INFO rome_cli::service::unix Remove socket folder /var/folders/0v/w61lqyb97l37zrp46x8s24900000gn/T/rome-socket-1.0.0
ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)
INFO rome_lsp::server Starting Biome Language Server...
WARN rome_lsp::server The Biome Server was initialized with the deprecated `root_path` parameter: this is not supported, use `root_uri` instead
WARN rome_lsp::server The Biome Server was initialized with the `workspace_folders` parameter: this is unsupported at the moment, use `root_uri` instead
INFO rome_lsp::server Attempting to load the configuration from 'biome.json' file
ERROR rome_fs::fs Could not read the file from "/rome.json", reason:
 No such file or directory (os error 2)
INFO rome_lsp::session Loaded workspace settings: Configuration {
    schema: Some(
        "https://biomejs.dev/schemas/1.0.0/schema.json",
    ),
    vcs: None,
    files: Some(
        FilesConfiguration {
            max_size: None,
            ignore: Some(
                StringSet(
                    {
                        "*.json",
                        "client/src/components/api.ts",
                        "seed/src/components/api.ts",
                        "client/src/components/model/translationKeys.ts",
                        "server/src/components/translations/translationKeys.ts",
                        "shared/version.ts",
                    },
                ),
            ),
            ignore_unknown: None,
        },
    ),
    formatter: Some(
        FormatterConfiguration {
            enabled: Some(
                false,
            ),
            format_with_errors: Some(
                false,
            ),
            indent_style: Some(
                Tab,
            ),
            indent_size: Some(
                2,
            ),
            line_width: Some(
                LineWidth(
                    80,
                ),
            ),
            ignore: None,
        },
    ),
    organize_imports: Some(
        OrganizeImports {
            enabled: Some(
                true,
            ),
            ignore: None,
        },
    ),
    linter: Some(
        LinterConfiguration {
            enabled: Some(
                true,
            ),
            rules: Some(
                Rules {
                    recommended: Some(
                        true,
                    ),
                    all: None,
                    a11y: None,
                    complexity: Some(
                        Complexity {
                            recommended: None,
                            all: None,
                            no_extra_boolean_cast: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_for_each: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_multiple_spaces_in_regular_expression_literals: None,
                            no_useless_catch: None,
                            no_useless_constructor: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_useless_fragments: None,
                            no_useless_label: None,
                            no_useless_rename: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_useless_switch_case: None,
                            no_useless_type_constraint: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_with: None,
                            use_flat_map: None,
                            use_literal_keys: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            use_optional_chain: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            use_simple_number_keys: None,
                            use_simplified_logic_expression: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                        },
                    ),
                    correctness: Some(
                        Correctness {
                            recommended: None,
                            all: None,
                            no_children_prop: None,
                            no_const_assign: None,
                            no_constructor_return: None,
                            no_empty_pattern: None,
                            no_global_object_calls: None,
                            no_inner_declarations: None,
                            no_invalid_constructor_super: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_new_symbol: None,
                            no_precision_loss: None,
                            no_render_return_value: None,
                            no_setter_return: None,
                            no_string_case_mismatch: None,
                            no_switch_declarations: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_undeclared_variables: None,
                            no_unnecessary_continue: None,
                            no_unreachable: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_unreachable_super: None,
                            no_unsafe_finally: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_unsafe_optional_chaining: None,
                            no_unused_labels: None,
                            no_unused_variables: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_void_elements_with_children: None,
                            no_void_type_return: None,
                            use_is_nan: None,
                            use_valid_for_direction: None,
                            use_yield: None,
                        },
                    ),
                    nursery: Some(
                        Nursery {
                            recommended: None,
                            all: None,
                            no_accumulating_spread: None,
                            no_aria_unsupported_elements: None,
                            no_banned_types: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_confusing_arrow: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_constant_condition: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_control_characters_in_regex: None,
                            no_duplicate_json_keys: None,
                            no_excessive_complexity: None,
                            no_fallthrough_switch_clause: None,
                            no_global_is_finite: None,
                            no_global_is_nan: None,
                            no_noninteractive_tabindex: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_nonoctal_decimal_escape: None,
                            no_redundant_roles: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_self_assign: None,
                            no_static_only_class: None,
                            no_unsafe_declaration_merging: None,
                            no_useless_empty_export: None,
                            no_useless_this_alias: None,
                            no_void: None,
                            use_aria_prop_types: None,
                            use_arrow_function: None,
                            use_exhaustive_dependencies: None,
                            use_getter_return: None,
                            use_grouped_type_import: None,
                            use_hook_at_top_level: None,
                            use_import_restrictions: None,
                            use_is_array: None,
                            use_literal_enum_members: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            use_naming_convention: None,
                        },
                    ),
                    performance: Some(
                        Performance {
                            recommended: None,
                            all: None,
                            no_delete: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                        },
                    ),
                    security: None,
                    style: Some(
                        Style {
                            recommended: None,
                            all: None,
                            no_arguments: None,
                            no_comma_operator: None,
                            no_implicit_boolean: None,
                            no_inferrable_types: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_namespace: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_negation_else: None,
                            no_non_null_assertion: None,
                            no_parameter_assign: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_parameter_properties: None,
                            no_restricted_globals: None,
                            no_shouty_constants: None,
                            no_unused_template_literal: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_var: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            use_block_statements: None,
                            use_const: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            use_default_parameter_last: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            use_enum_initializers: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            use_exponentiation_operator: None,
                            use_fragment_syntax: None,
                            use_numeric_literals: None,
                            use_self_closing_elements: None,
                            use_shorthand_array_type: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            use_single_case_statement: None,
                            use_single_var_declarator: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            use_template: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            use_while: None,
                        },
                    ),
                    suspicious: Some(
                        Suspicious {
                            recommended: None,
                            all: None,
                            no_array_index_key: None,
                            no_assign_in_expressions: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_async_promise_executor: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_catch_assign: None,
                            no_class_assign: None,
                            no_comment_text: None,
                            no_compare_neg_zero: None,
                            no_confusing_labels: None,
                            no_console_log: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_const_enum: None,
                            no_debugger: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_double_equals: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_duplicate_case: None,
                            no_duplicate_class_members: None,
                            no_duplicate_jsx_props: None,
                            no_duplicate_object_keys: None,
                            no_duplicate_parameters: None,
                            no_empty_interface: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_explicit_any: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_extra_non_null_assertion: None,
                            no_function_assign: None,
                            no_import_assign: None,
                            no_label_var: None,
                            no_prototype_builtins: None,
                            no_redeclare: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_redundant_use_strict: None,
                            no_self_compare: None,
                            no_shadow_restricted_names: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_sparse_array: None,
                            no_unsafe_negation: None,
                            use_default_switch_clause_last: None,
                            use_namespace_keyword: None,
                            use_valid_typeof: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                        },
                    ),
                },
            ),
            ignore: None,
        },
    ),
    javascript: Some(
        JavascriptConfiguration {
            formatter: Some(
                JavascriptFormatter {
                    quote_style: Some(
                        Single,
                    ),
                    jsx_quote_style: None,
                    quote_properties: None,
                    trailing_comma: Some(
                        Es5,
                    ),
                    semicolons: None,
                    arrow_parentheses: None,
                },
            ),
            parser: Some(
                JavascriptParser {
                    unsafe_parameter_decorators_enabled: Some(
                        true,
                    ),
                },
            ),
            globals: None,
            organize_imports: None,
        },
    ),
    json: None,
    extends: None,
}
INFO rome_lsp::session Loaded client configuration: Object {
    "lspBin": Null,
    "rename": Null,
    "requireConfiguration": Bool(true),
}
INFO rome_lsp::session Unregister capabilities "textDocument/rangeFormatting, textDocument/onTypeFormatting, workspace/didChangeWatchedFiles, textDocument/rename, textDocument/formatting, workspace/didChangeConfiguration"
INFO rome_lsp::session Register capabilities "textDocument/rangeFormatting, textDocument/onTypeFormatting, workspace/didChangeWatchedFiles, textDocument/formatting, workspace/didChangeConfiguration"
INFO rome_lsp::session Loaded client configuration: Object {
    "lspBin": Null,
    "rename": Null,
    "requireConfiguration": Bool(true),
}
INFO rome_lsp::session Unregister capabilities "textDocument/rangeFormatting, textDocument/onTypeFormatting, textDocument/rename, workspace/didChangeConfiguration, workspace/didChangeWatchedFiles, textDocument/formatting"
INFO rome_lsp::session Register capabilities "textDocument/rangeFormatting, textDocument/onTypeFormatting, workspace/didChangeConfiguration, workspace/didChangeWatchedFiles, textDocument/formatting"
WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
ERROR rome_fs::fs Could not read the file from "/rome.json", reason:
 No such file or directory (os error 2)
INFO rome_lsp::session Loaded workspace settings: Configuration {
    schema: Some(
        "https://biomejs.dev/schemas/1.0.0/schema.json",
    ),
    vcs: None,
    files: Some(
        FilesConfiguration {
            max_size: None,
            ignore: Some(
                StringSet(
                    {
                        "*.json",
                        "client/src/components/api.ts",
                        "seed/src/components/api.ts",
                        "client/src/components/model/translationKeys.ts",
                        "server/src/components/translations/translationKeys.ts",
                        "shared/version.ts",
                    },
                ),
            ),
            ignore_unknown: None,
        },
    ),
    formatter: Some(
        FormatterConfiguration {
            enabled: Some(
                false,
            ),
            format_with_errors: Some(
                false,
            ),
            indent_style: Some(
                Tab,
            ),
            indent_size: Some(
                2,
            ),
            line_width: Some(
                LineWidth(
                    80,
                ),
            ),
            ignore: None,
        },
    ),
    organize_imports: Some(
        OrganizeImports {
            enabled: Some(
                true,
            ),
            ignore: None,
        },
    ),
    linter: Some(
        LinterConfiguration {
            enabled: Some(
                true,
            ),
            rules: Some(
                Rules {
                    recommended: Some(
                        true,
                    ),
                    all: None,
                    a11y: None,
                    complexity: Some(
                        Complexity {
                            recommended: None,
                            all: None,
                            no_extra_boolean_cast: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_for_each: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_multiple_spaces_in_regular_expression_literals: None,
                            no_useless_catch: None,
                            no_useless_constructor: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_useless_fragments: None,
                            no_useless_label: None,
                            no_useless_rename: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_useless_switch_case: None,
                            no_useless_type_constraint: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_with: None,
                            use_flat_map: None,
                            use_literal_keys: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            use_optional_chain: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            use_simple_number_keys: None,
                            use_simplified_logic_expression: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                        },
                    ),
                    correctness: Some(
                        Correctness {
                            recommended: None,
                            all: None,
                            no_children_prop: None,
                            no_const_assign: None,
                            no_constructor_return: None,
                            no_empty_pattern: None,
                            no_global_object_calls: None,
                            no_inner_declarations: None,
                            no_invalid_constructor_super: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_new_symbol: None,
                            no_precision_loss: None,
                            no_render_return_value: None,
                            no_setter_return: None,
                            no_string_case_mismatch: None,
                            no_switch_declarations: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_undeclared_variables: None,
                            no_unnecessary_continue: None,
                            no_unreachable: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_unreachable_super: None,
                            no_unsafe_finally: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_unsafe_optional_chaining: None,
                            no_unused_labels: None,
                            no_unused_variables: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_void_elements_with_children: None,
                            no_void_type_return: None,
                            use_is_nan: None,
                            use_valid_for_direction: None,
                            use_yield: None,
                        },
                    ),
                    nursery: Some(
                        Nursery {
                            recommended: None,
                            all: None,
                            no_accumulating_spread: None,
                            no_aria_unsupported_elements: None,
                            no_banned_types: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_confusing_arrow: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_constant_condition: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_control_characters_in_regex: None,
                            no_duplicate_json_keys: None,
                            no_excessive_complexity: None,
                            no_fallthrough_switch_clause: None,
                            no_global_is_finite: None,
                            no_global_is_nan: None,
                            no_noninteractive_tabindex: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_nonoctal_decimal_escape: None,
                            no_redundant_roles: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_self_assign: None,
                            no_static_only_class: None,
                            no_unsafe_declaration_merging: None,
                            no_useless_empty_export: None,
                            no_useless_this_alias: None,
                            no_void: None,
                            use_aria_prop_types: None,
                            use_arrow_function: None,
                            use_exhaustive_dependencies: None,
                            use_getter_return: None,
                            use_grouped_type_import: None,
                            use_hook_at_top_level: None,
                            use_import_restrictions: None,
                            use_is_array: None,
                            use_literal_enum_members: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            use_naming_convention: None,
                        },
                    ),
                    performance: Some(
                        Performance {
                            recommended: None,
                            all: None,
                            no_delete: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                        },
                    ),
                    security: None,
                    style: Some(
                        Style {
                            recommended: None,
                            all: None,
                            no_arguments: None,
                            no_comma_operator: None,
                            no_implicit_boolean: None,
                            no_inferrable_types: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_namespace: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_negation_else: None,
                            no_non_null_assertion: None,
                            no_parameter_assign: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_parameter_properties: None,
                            no_restricted_globals: None,
                            no_shouty_constants: None,
                            no_unused_template_literal: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_var: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            use_block_statements: None,
                            use_const: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            use_default_parameter_last: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            use_enum_initializers: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            use_exponentiation_operator: None,
                            use_fragment_syntax: None,
                            use_numeric_literals: None,
                            use_self_closing_elements: None,
                            use_shorthand_array_type: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            use_single_case_statement: None,
                            use_single_var_declarator: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            use_template: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            use_while: None,
                        },
                    ),
                    suspicious: Some(
                        Suspicious {
                            recommended: None,
                            all: None,
                            no_array_index_key: None,
                            no_assign_in_expressions: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_async_promise_executor: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_catch_assign: None,
                            no_class_assign: None,
                            no_comment_text: None,
                            no_compare_neg_zero: None,
                            no_confusing_labels: None,
                            no_console_log: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_const_enum: None,
                            no_debugger: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_double_equals: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_duplicate_case: None,
                            no_duplicate_class_members: None,
                            no_duplicate_jsx_props: None,
                            no_duplicate_object_keys: None,
                            no_duplicate_parameters: None,
                            no_empty_interface: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                            no_explicit_any: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_extra_non_null_assertion: None,
                            no_function_assign: None,
                            no_import_assign: None,
                            no_label_var: None,
                            no_prototype_builtins: None,
                            no_redeclare: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_redundant_use_strict: None,
                            no_self_compare: None,
                            no_shadow_restricted_names: Some(
                                Plain(
                                    Off,
                                ),
                            ),
                            no_sparse_array: None,
                            no_unsafe_negation: None,
                            use_default_switch_clause_last: None,
                            use_namespace_keyword: None,
                            use_valid_typeof: Some(
                                Plain(
                                    Error,
                                ),
                            ),
                        },
                    ),
                },
            ),
            ignore: None,
        },
    ),
    javascript: Some(
        JavascriptConfiguration {
            formatter: Some(
                JavascriptFormatter {
                    quote_style: Some(
                        Single,
                    ),
                    jsx_quote_style: None,
                    quote_properties: None,
                    trailing_comma: Some(
                        Es5,
                    ),
                    semicolons: None,
                    arrow_parentheses: None,
                },
            ),
            parser: Some(
                JavascriptParser {
                    unsafe_parameter_decorators_enabled: Some(
                        true,
                    ),
                },
            ),
            globals: None,
            organize_imports: None,
        },
    ),
    json: None,
    extends: None,
}
INFO rome_lsp::session Unregister capabilities "workspace/didChangeWatchedFiles, textDocument/rangeFormatting, textDocument/rename, textDocument/formatting, workspace/didChangeConfiguration, textDocument/onTypeFormatting"
INFO rome_lsp::session Register capabilities "workspace/didChangeWatchedFiles, textDocument/rangeFormatting, textDocument/formatting, workspace/didChangeConfiguration, textDocument/onTypeFormatting"
INFO rome_lsp::server Starting Biome Language Server...
ERROR tower_lsp::transport failed to encode message: failed to encode response: Socket is not connected (os error 57)

What happened?

see code example. imports sometimes are useful for type references, shouldn't be throwing an error here.

Screenshot 2023-09-01 at 09 56 41

Expected result

should let me use the import as a type only

Code of Conduct

  • I agree to follow Biome's Code of Conduct

β˜‚οΈ Deprecate `rome.json`

Description

Biome should emit a deprecation diagnostic if rome.json is used instead of biome.json.

Should we emit a deprecation if both biome.js and rome.json are found?

Tasks to do:

πŸ› noDuplicateJsxProps should be case-sensitive

Environment information

N/A

What happened?

The current implementation of the noDuplicateJsxProps rule is case-sensitive but JSX handles props in a case-insensitive manner so 2 props with the same name but different cases are treated separately and are valid.

A good example of this is the MUI TextField component which has inputProps and InputProps props which when used cause the Biome lint command to fail.

Note that this bug isn't about the semantics of whether or not using 2 props with the same name is good practice or not (IMO it's bad practice).

Expected result

The noDuplicateJsxProps rule should be case-sensitive.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

πŸ› lint/style/noCommaOperator incorrectly alerts on 3-update for loop

What happened?

lint/style/noCommaOperator will alert on a for loop with three or more update expressions.

for (let i = 0, j = 1, k = 2; i < 100; i++, j++, k++) {}

this will alert on the comma after i++ with default settings.

https://biomejs.dev/playground/?code=ZgBvAHIAIAAoAGwAZQB0ACAAaQAgAD0AIAAwACwAIABqACAAPQAgADEALAAgAGsAIAA9ACAAMgA7ACAAaQAgADwAIAAxADAAMAA7ACAAaQArACsALAAgAGoAKwArACwAIABrACsAKwApACAAewB9AA%3D%3D

Expected result

lint/style/noCommaOperator should not apply to the top level of for loop update expressions.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

πŸ“Ž Implement `lint/noElseReturn` - `eslint/noElseReturn`

Description

eslint/no-else-return.

The rule should be implemented with the Control Flow Graph query.

Question: should we use the name noUselessElse instead?

Want to contribute? Lets you know you are interested! We will assign you to the issue to prevent several people to work on the same issue. Don't worry, we can unassign you later if you are no longer interested in the issue! Read our contributing guide and analyzer contributing guide.

πŸ› Can't install biome

Environment information

I couldn't install biome

What happened?

I am attempting to create a Docker image using the most recent Node.js installation.

I encountered an exception when attempting to compile the docker image.

image

The Docker image I used is:

# syntax=docker/dockerfile:1
FROM python:3.10-slim-bullseye

ENV PYTHONUNBUFFERED="1" \
    PIP_DISABLE_PIP_VERSION_CHECK="1" \
    PIP_NO_CACHE_DIR="1" \
    NODE_MAJOR="18"

RUN mkdir /code
WORKDIR /code
COPY bin/install_extra_packages requirements.txt dev-requirements.txt /code/

# install nodejs source
RUN apt-get update \
    && apt-get install --no-install-recommends -y curl ca-certificates curl gnupg \
    mkdir -p /etc/apt/keyrings \
    curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
    echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_MAJOR}.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list

RUN apt-get update \
    && apt-get install --no-install-recommends -y libc6-dev gcc git libmagic-dev libproj-dev nodejs npm \
    && ./install_extra_packages \
    && apt-get autoremove -y --purge \
    && rm -rf /var/lib/apt/lists/* /usr/share/doc /usr/share/man \
    && apt-get clean

RUN npm install -g pnpm \
    && npm cache clean --force

Expected result

Install the biome

Code of Conduct

  • I agree to follow Biome's Code of Conduct

πŸ› VS Code extension prints warning although biome is not being used

Environment information

CLI:
  Version:                      1.0.0
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           macos

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v18.13.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "null"

Biome Configuration:
  Status:                       unset

Workspace:
  Open Documents:               0

Discovering running Biome servers...

Incompatible Biome Server: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

β„Ή Rage discovered this running server using an incompatible version of Biome.

Server:
  Version:                      <=10.0.0

What happened?

The biome VS Code extension shows a warning message in a project that does not use biome at all.

The extension is configured with Biome: require configuration set to true.

The extension couldn't resolve @biomejs/cli-darwin-x64/package.json or @biomejs/cli-darwin-x64/biome.
If you installed "@biomejs/biome", it's a resolving issue due to your package manager. 
Check the troubleshooting section of the extension for more information on how to fix the issue.

Expected result

The VS Code extension does not activate Biome in projects that do not use Biome.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

πŸ› Biome cpu spinning forverr on save, suspected sluggish organizeImports behaviour

Environment information

CLI:
  Version:                      1.0.0
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v16.14.2"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/8.5.0"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           true
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Workspace:
  Open Documents:               0

Discovering running Biome servers...

Incompatible Biome Server: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

β„Ή Rage discovered this running server using an incompatible version of Biome.

Server:
  Version:                      12.1.3

Incompatible Biome Server: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

β„Ή Rage discovered this running server using an incompatible version of Biome.

Server:
  Version:                      <=10.0.0

Server:
  Status:                       stopped

What happened?

  1. pull down this repo and npm install: https://github.com/jpike88/biome-slow
  2. open the code workspace in root directory
  3. tweak something in eventDefinitions.ts, hit save.
  4. observe as it's stuck saving, and biome maxes out cpu indefinitely

this problem happened in Rome as well, it's same as rome/tools#4757

Expected result

it should just work

Code of Conduct

  • I agree to follow Biome's Code of Conduct

πŸ› Playground console has no scroll

Environment information

Tested on Firefox 117 and Chromium 116.

What happened?

It is no longer possible to scroll in the console of the playground.
The bug is not present on the rome playground.

Expected result

Scrolling should be possible.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

πŸ› `IndentWidth` does not work with `IndentStyle::Tab`

Environment information

main branch

What happened?

Check the playground.

Expected result

The result of prettier is the expected behavior.
Although tab is only one character, it should treat indent width as visual width, which will affect the calculation of line width.

Let's paste the biome result into editor.

You will find that the visual width of the code exceeds the limit of 80 characters.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

πŸ“Ž Accept `biome.json` as config file

Description

Currently, Biome uses rome.json as configuration file.

We should also accept biome.json.
We should continue to support rome.json and emit a deprecation diagnostic when it is used in place of biome.json.

Question: Should we adopt biome.jsonc instead of biome.json in order to allow comments in the config file?

πŸ“Ž Broken heading link in blog post announcing the fork

Description

Need to update the ref so that it points to https://biomejs.dev/blog/annoucing-biome#enters-biome

I want to give you some background and context, which could help you to get why the core team created a new project with a new name. If you're not interested, feel free to jump to the [next section](#enter-biome)

- (#enter-biome) 
+ (#enters-biome) 

Or update the actual heading so that it matches the current ref:

πŸ› Some arrow functions with comments are not formatted correctly

Environment information

Biome 1.0.0, happens everywhere, including the playground, but just in case:

CLI:
  Version:                      1.0.0
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           windows

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         unset
  JS_RUNTIME_VERSION:           "v20.5.1"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/9.6.4"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              true
  Organize imports disabled:    false
  VCS disabled:                 false

Workspace:
  Open Documents:               0

Discovering running Biome servers...

Running Biome Server: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

i The client isn't connected to any server but rage discovered this running Biome server.

Server:
  Version:                      1.0.0
  Name:                         rome_lsp
  CPU Architecture:             x86_64
  OS:                           windows

Workspace:
  Open Documents:               0

Other Active Server Workspaces:

Workspace:
  Open Documents:               1
  Client Name:                  Visual Studio Code
  Client Version:               1.81.1

Biome Server Log:

! Please review the content of the log file before sharing it publicly as it may contain sensitive information:
  * Path names that may reveal your name, a project name, or the name of your employer.
  * Source code

INFO rome_lsp::server Starting Biome Language Server...
WARN rome_lsp::server The Biome Server was initialized with the deprecated `root_path` parameter: this is not supported, use `root_uri` 
instead
WARN rome_lsp::server The Biome Server was initialized with the `workspace_folders` parameter: this is unsupported at the moment, use `root_uri` instead
INFO rome_lsp::server Attempting to load the configuration from 'biome.json' file
ERROR rome_fs::fs Could not read the file from "c:\\rome.json", reason:
 The system cannot find the file specified. (os error 2)
INFO rome_lsp::session Loaded workspace settings: Configuration {
    schema: Some(
        "./node_modules/@biomejs/biome/configuration_schema.json",
    ),
    vcs: Some(
        VcsConfiguration {
            client_kind: Some(
                Git,
            ),
            enabled: Some(
                true,
            ),
            use_ignore_file: Some(
                true,
            ),
            root: None,
        },
    ),
    files: None,
    formatter: Some(
        FormatterConfiguration {
            enabled: Some(
                true,
            ),
            format_with_errors: Some(
                false,
            ),
            indent_style: Some(
                Space,
            ),
            indent_size: Some(
                2,
            ),
            line_width: Some(
                LineWidth(
                    120,
                ),
            ),
            ignore: None,
        },
    ),
    organize_imports: Some(
        OrganizeImports {
            enabled: Some(
                true,
            ),
            ignore: None,
        },
    ),
    linter: Some(
        LinterConfiguration {
            enabled: Some(
                false,
            ),
            rules: Some(
                Rules {
                    recommended: Some(
                        true,
                    ),
                    all: None,
                    a11y: None,
                    complexity: None,
                    correctness: None,
                    nursery: None,
                    performance: None,
                    security: None,
                    style: None,
                    suspicious: None,
                },
            ),
            ignore: None,
        },
    ),
    javascript: Some(
        JavascriptConfiguration {
            formatter: Some(
                JavascriptFormatter {
                    quote_style: Some(
                        Single,
                    ),
                    jsx_quote_style: None,
                    quote_properties: None,
                    trailing_comma: Some(
                        None,
                    ),
                    semicolons: Some(
                        Always,
                    ),
                    arrow_parentheses: Some(
                        AsNeeded,
                    ),
                },
            ),
            parser: None,
            globals: None,
            organize_imports: None,
        },
    ),
    json: None,
    extends: None,
}
INFO rome_lsp::session Loaded client configuration: Object {
    "lspBin": Null,
    "rename": Null,
    "requireConfiguration": Bool(true),
}
INFO rome_lsp::session Unregister capabilities "workspace/didChangeConfiguration, textDocument/rangeFormatting, textDocument/onTypeFormatting, textDocument/formatting, textDocument/rename, workspace/didChangeWatchedFiles"
INFO rome_lsp::session Register capabilities "workspace/didChangeConfiguration, textDocument/rangeFormatting, textDocument/onTypeFormatting, textDocument/formatting, workspace/didChangeWatchedFiles"
WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
WARN tower_lsp Got a textDocument/didSave notification, but it is not implemented
INFO rome_lsp::server Starting Biome Language Server...

What happened?

  1. paste the following code:
(a) => // h
  {}
  1. depending on the arrowParentheses config option, one of two things will happen:
    • if set to always it will produce the following, which isn't correct as formatting the resulting code transforms it again
      •  (
           a,
         ) => {}; // h
    • produces a syntax error if set to asNeeded
      • a,
          => {}; // h

Expected result

Format it in a way that doesn't produce syntax errors or inconsistent formatting, for example this is what prettier formats it to in both cases:

(
	a, // h
) => {};

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.