Skip to content

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

Closed
@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