Skip to content

More human-friendly autofix variables #53

@blackswanny

Description

@blackswanny

When rule applied during autofix, it extracts inline code into variables usually by adding underscore prefix to avoid duplicates, for instance _onClick, __onClick, ___onClick.
We suggest to add different human-friendly approach, since underscore is not common in Javascript naming.
For instance, camelCase with number in the end:

onClickOne
onClickTwo
onClickThree

or ideally with semantic context reading some sibling attributes, properties, which is harder to implement

onClickSubmit
onClickApply

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions