Skip to content

Update latest as ecmaVersion property in parserOptions #60

Open
@htoo-eain-lwin

Description

@htoo-eain-lwin

Why

I think the current version set up in here is 2018. It's a little bit outdated. Ref

For one of the things missing from ecmaVersion 2018 is it does not support the "static" syntax used in the codebase.
This leads to parsing errors and unexpected token issues when running yarn eslint, specifically with statements like static targets = ['foo', 'bar'];.

We use static in stimulus controllers in our rails project.

Screenshot 2023-07-11 at 11 55 59

Setting latest or above and equal to 13 as the property value will fix the issue.

Who Benefits?

Developers who try to run yarn eslint on stimulus controllers.

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