Skip to content

πŸ› Wrong /lint/complexity/noCommaOperator for SvelteΒ #10265

@wennerryle

Description

@wennerryle

Environment information

Details
apps/web/src/routes/(authorized)/config/_components/WifiConnection.svelte:38:53 lint/complexity/noCommaOperator

  ⚠ The comma operator is disallowed.
  
    36 β”‚                                <Toggle
    37 β”‚                                        bind:pressed={
  > 38 β”‚                                                () => viewmodel.network.status === 'connected',
       β”‚                                                                                              ^
    39 β”‚                                                (enable) => {
    40 β”‚                                                        if (enable) {
  
  β„Ή Its use is often confusing and obscures side effects.
  

apps/web/src/routes/(authorized)/devices/_components/DeviceCard.svelte:44:35 lint/complexity/noCommaOperator

  ⚠ The comma operator is disallowed.
  
    42 β”‚        <div class="flex items-center justify-between px-4">
    43 β”‚                <span>{title}</span>
  > 44 β”‚                <Toggle bind:pressed={getToggled, setToggled} />
       β”‚                                                ^
    45 β”‚        </div>
    46 β”‚        <div class="border-b border-gray-300"></div>
  
  β„Ή Its use is often confusing and obscures side effects.
  

Checked 91 files in 61ms. No fixes applied.
Found 10 warnings.
Found 7 infos.
vpozdeev@bazzite:~/Projects/esp32wol-frontend$ 

What happened?

1. fst example

2. snd example

Expected result

shouldn't warn since it's svelte syntax

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

Labels

A-ParserArea: parserL-HTMLLanguage: HTML and super languagesS-Bug-confirmedStatus: report has been confirmed as a valid bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions