You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 3, 2024. It is now read-only.
// minimal reproducer if relevantconstformat=(n: string)=>{// const n = digits(string)// const fmt = new l.AsYouType()constinput=fmt.input(n)// if (!input) return 'foo'returninput}
Expected behavior
Rule fix is applied. Commented blocks remain inside a function.
Actual behavior
constformat=(n: string)=>{// const n = digits(string)// const fmt = new l.AsYouType()returnfmt.input(n)}
eslint-plugin-sonarjs version: 0.5.0
eslint version: 6.8.0
Node.js version: 12
Rule key: sonarjs/prefer-immediate-return
The text was updated successfully, but these errors were encountered:
vilchik-elena
changed the title
sonarjs/prefer-immediate-return removes user comments completely
Fix prefer-immediate-return: keep comments when fixing
Jul 1, 2021
vilchik-elena
changed the title
Fix prefer-immediate-return: keep comments when fixing
Improve prefer-immediate-return: keep comments when fixing
Jul 1, 2021
I want to report a bug.
Reproducer
Expected behavior
Rule fix is applied. Commented blocks remain inside a function.
Actual behavior
eslint-plugin-sonarjs version: 0.5.0
eslint version: 6.8.0
Node.js version: 12
Rule key: sonarjs/prefer-immediate-return
The text was updated successfully, but these errors were encountered: