Skip to content

Create custom lint to prevent incorrect use of JSON.parse #511

@glevco

Description

@glevco

There can be a way to prevent JSON.parse without reviver as a custom eslint rule.
May be too much but checking CallExpression:exit where JSON.parse(...) only has 1 argument should be enough.

Originally posted by @r4mmer in #509 (comment)


We could create this custom lint rule and apply it to all our JS repos.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions