Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't replace undescore #8875

Closed
1 task
moniuch opened this issue Feb 6, 2022 · 3 comments · Fixed by #9870
Closed
1 task

Don't replace undescore #8875

moniuch opened this issue Feb 6, 2022 · 3 comments · Fixed by #9870
Labels
community This is a good first issue for contributing outdated scope: misc Misc issues type: feature

Comments

@moniuch
Copy link

moniuch commented Feb 6, 2022

Description

Could we allow the underscore character and not convert it to hyphen, please?

npx nx generate @nrwl/angular:ngrx --name=user --module=libs/user/src/lib/user.module.ts --directory=_store

Output:

...
CREATE libs/user/src/lib/-store/user.actions.ts
...

Motivation

Underscore is a character usually used for sorting purposes and is absolutely legit. There is no reason to replace it. :)
Further renaming of generated directory (and sometimes imports) is just an unnecessary step in the workflow that could be avoided.

Suggested Implementation

Alternate Implementations

@FrozenPandaz FrozenPandaz added scope: misc Misc issues community This is a good first issue for contributing labels Feb 14, 2022
@FrozenPandaz
Copy link
Collaborator

I think that's fair. I think delimiting _ would still be converted to - though.

Would someone like to make a PR? The code is here: https://github.com/nrwl/nx/blob/master/packages/devkit/src/utils/names.ts#L57

AloisH added a commit to AloisH/nx that referenced this issue Apr 18, 2022
…ating file

Underscore is a character usually used for sorting purposes and is absolutely legit. There is no
reason to replace it.

ISSUES CLOSED: nrwl#8875
@AloisH
Copy link
Contributor

AloisH commented Apr 18, 2022

Hello I made a PR (my first contribution) following your advice @FrozenPandaz.
Here is the link: #9870

FrozenPandaz pushed a commit that referenced this issue Apr 29, 2022
Underscore is a character usually used for sorting purposes and is absolutely legit. There is no
reason to replace it.

ISSUES CLOSED: #8875
FrozenPandaz pushed a commit that referenced this issue May 11, 2022
…when .eslintrc.js already exist (#10080)

* feat(devkit): feat(devkit): don't replace begining undescore when creating file

Underscore is a character usually used for sorting purposes and is absolutely legit. There is no
reason to replace it.

ISSUES CLOSED: #8875

* fix(linter): generator creating .eslintrc.json at the root path even when .eslintrc.js
jaytavares pushed a commit to CurioVision/nx that referenced this issue Jun 8, 2022
…l#9870)

Underscore is a character usually used for sorting purposes and is absolutely legit. There is no
reason to replace it.

ISSUES CLOSED: nrwl#8875
@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community This is a good first issue for contributing outdated scope: misc Misc issues type: feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants