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

[Feature Request] import-name support snake_case file names #424

Closed
dosentmatter opened this issue Apr 24, 2018 · 1 comment
Closed

[Feature Request] import-name support snake_case file names #424

dosentmatter opened this issue Apr 24, 2018 · 1 comment
Labels
Difficulty: Easy Someone with little to no experience in TSLint should be able to send a pull request for this issue. Good First Issue 🙌 Howdy, neighbor! Status: Accepting PRs Type: Rule Feature Adding a feature to an existing rule.
Milestone

Comments

@dosentmatter
Copy link

dosentmatter commented Apr 24, 2018

https://github.com/Microsoft/tslint-microsoft-contrib/blob/d970a8a80134467cefd78f01ed49772506e9c21e/src/importNameRule.ts#L102

The current code allows periods, ., and hyphens, -, in file name imports and converts them to camelCase. Is it possible to allow underscores, _, as well?

I know underscores for file names isn't as common in javascript/typescript but I see it used sometimes. Currently, tslint would suggest import snake_case from 'snake_case'; and I think snake_case for variable naming is less common.

@dosentmatter dosentmatter changed the title import-name support snake_case file names [Feature Request] import-name support snake_case file names Apr 24, 2018
@JoshuaKGoldberg
Copy link

+1, this should be done. Seems like a nice and straightforward fix.

@JoshuaKGoldberg JoshuaKGoldberg added Status: Accepting PRs Good First Issue 🙌 Howdy, neighbor! Difficulty: Easy Someone with little to no 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 Jul 5, 2018
@JoshuaKGoldberg JoshuaKGoldberg added this to the 6.0.0-beta0 milestone Nov 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Difficulty: Easy Someone with little to no experience in TSLint should be able to send a pull request for this issue. Good First Issue 🙌 Howdy, neighbor! Status: Accepting PRs Type: Rule Feature Adding a feature to an existing rule.
Projects
None yet
Development

No branches or pull requests

2 participants