That's the JetBrains IDE's Duplicated Code Fragment inspection which you can configure, disable, etc., under
Settings/Preferences>Editor>Inspections>General>Duplicated code fragment.:
You can just disable it entirely for JavaScript if you'd like.
If you want to keep the inspection enabled but only suppress particular instances, you can use Alt+Enter (Windows) / Opt+Enter (Mac) to show the contextual actions for the reported inspection infraction, then press CursorRight to show suppression options:
Regards,
Scott Wells