Skip to content

[naming-convention] modifier export - Allow selecting only exported members #2239

@RebeccaStevens

Description

@RebeccaStevens

Repro

{
  "rules": {
    "@typescript-eslint/naming-convention": [
      "error",
      { "selector": "variable", "format": ["camelCase"] },
      // { "selector": "variable", "modifiers": ["export"], "format": ["UPPER_CASE"] }
    ]
  }
}
export const FOO = 'hello';
const bar = 'world';

Expected Result

The ability to enforce a naming convention that only applies to exported members.

Actual Result

Cannot narrow down selector enough.

Additional Info

Related to: #1612

Versions

package version
@typescript-eslint/eslint-plugin 3.4.0
@typescript-eslint/parser 3.4.0
TypeScript 3.9.5
ESLint 7.2.0
node 14.4.0
npm 6.14.5

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy