Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[generic-type-naming] Support regex literal for config properties that accept regex string #143

Closed
Labels
@sindresorhus

Description

@sindresorhus

Would be nice to be able to use regex literals to not have to double-escape certain characters when using JS-based ESLint config.

Before

'@typescript-eslint/generic-type-naming':['error','^[A-Z][a-zA-Z\\d]+$'],

After

'@typescript-eslint/generic-type-naming':['error',/^[A-Z][a-zA-Z\d]+$/],

It also means it becomes syntax highlighted and ESLint (through some built-in rules) can prevent some common mistakes when you lint the config itself.

This would require changes to the following rules:

  • @typescript-eslint/generic-type-naming
  • @typescript-eslint/member-naming
  • @typescript-eslint/no-unused-vars

Related ESLint issue:eslint/eslint#11318

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


      [8]ページ先頭

      ©2009-2025 Movatter.jp