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

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

Closed
michaelw85 opened this issue Feb 8, 2019 · 0 comments · Fixed by #843
Closed

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

michaelw85 opened this issue Feb 8, 2019 · 0 comments · Fixed by #843
Labels
Difficulty: Medium People with non-trivial experience in TSLint should be able to send a pull request for this issue. Status: Accepting PRs Type: Rule Feature Adding a feature to an existing rule.
Milestone

Comments

@michaelw85
Copy link

michaelw85 commented Feb 8, 2019

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

@JoshuaKGoldberg JoshuaKGoldberg added Status: Accepting PRs Difficulty: Medium People with non-trivial experience in TSLint should be able to send a pull request for this issue. Type: Rule Feature Adding a feature to an existing rule. labels Feb 9, 2019
@JoshuaKGoldberg JoshuaKGoldberg added this to the 6.1.1-beta milestone Apr 15, 2019
@IllusionMH IllusionMH modified the milestones: 6.1.1-beta, 6.2.0-beta May 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Difficulty: Medium People with non-trivial experience in TSLint should be able to send a pull request for this issue. Status: Accepting PRs Type: Rule Feature Adding a feature to an existing rule.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants