Skip to content

Enhancement - no-get rule and auto-fix #1840

@ArtixZ

Description

@ArtixZ

As is mentioned here in the test file, we currently don't identify or auto-fix get on a non-string. This means when the non-string is a variable name, we deem it as valid.

This ticket propose that we identify and auto-fix for those use cases.

Expectations:

obj.get(5) ===> obj[5] // obj.get(5) is legal as I tested.

obj.get(foo) ===> obj[foo]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions