Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

export-name does not work with kebab/snake case #814

@michaelw85

Description

@michaelw85

Bug Report

  • tslint-microsoft-contrib version: 6.0.0
  • TSLint version: 5.12.1
  • TypeScript version: 3.3.1
  • Running TSLint via: CLI / VSCode

TypeScript code being linted

// my-component.ts || my_component.ts
export class MyComponent {
//...
}

with tslint.json configuration:

{ "export-name": true }

Actual behavior

The exported module or identifier name must match the file name. Found: my-component.ts and MyComponent tslint(export-name)

Expected behavior

✅ Linter should pass

Additional request

It would also be nice to be able to accept export names where the file name matches the first part.
e.g:

// file: src/generators/unit-test.ts
export class UnitTestGenerator {}

Related to #450

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: MediumPeople with non-trivial experience in TSLint should be able to send a pull request for this issue.Status: Accepting PRsType: Rule FeatureAdding a feature to an existing rule.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions