Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

🐛 noUnusedVariables not looking at inner functions against a declared variable for a match #105

Closed
1 task done
jpike88 opened this issue Sep 1, 2023 · 0 comments · Fixed by #256
Closed
1 task done
Assignees
Labels
A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@jpike88
Copy link

jpike88 commented Sep 1, 2023

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
@Conaclos Conaclos added this to the Biome 1.1.0 milestone Sep 1, 2023
@Conaclos Conaclos added S-Bug-confirmed Status: report has been confirmed as a valid bug L-JavaScript Language: JavaScript and super languages A-Linter Area: linter labels Sep 1, 2023
@Conaclos Conaclos modified the milestones: Biome 1.1, Biome 1.2 Sep 5, 2023
@Conaclos Conaclos self-assigned this Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants