Skip to content

Flag d should not be considered valid in ES2021 #208

Closed
@fasttime

Description

@fasttime

Regexp flag d was introduced in ES2022. It should not be considered valid with ecmaVersion: 2021, i.e.:

import { RegExpValidator } from "@eslint-community/regexpp";
const validator = new RegExpValidator({ ecmaVersion: 2021 });
validator.validateFlags("d");

The above code should throw an error. It did so with version 4.11.2, but in version 4.12.0, no error is thrown.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions