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

`camelCase` option is not working #52

Closed
JounQin opened this issue Oct 5, 2019 · 5 comments
Closed

`camelCase` option is not working #52

JounQin opened this issue Oct 5, 2019 · 5 comments
Assignees
Labels

Comments

@JounQin
Copy link

@JounQin JounQin commented Oct 5, 2019

Describe the bug
As title, the generated definition is {}

To Reproduce
Steps to reproduce the behavior:

{
  "plugins": [
      {
        "name": "typescript-plugin-css-modules",
        "options": {
          "camelCase": "camelCase",
          "customMatcher": "\\.m\\.less$"
        }
      }
    ]
}

I've already have:

declare module '*.less' {
  const styles: Record<string, string>;
  export = styles;
}

and

// workspace `settings.json`
{
  "settings": {
    "typescript.tsdk": "node_modules/typescript/lib"
  }
}

Expected behavior
No error

Screenshots
If applicable, add screenshots to help explain your problem.
image

Desktop (please complete the following information):

  • OS: macOS Catalina
@mrmckeb

This comment has been minimized.

Copy link
Owner

@mrmckeb mrmckeb commented Oct 9, 2019

Hello @JounQin,

On Catalina already, you're very keen!

Are you able to share a repository with a reproduction? Even if it's a very simple case.

It could be that something else is failing...

@mrmckeb mrmckeb self-assigned this Oct 9, 2019
@mrmckeb mrmckeb added the question label Oct 19, 2019
@mrmckeb

This comment has been minimized.

Copy link
Owner

@mrmckeb mrmckeb commented Oct 20, 2019

Hello, I've found the issue here, sorry for the inconvenience. It will be in the next release.

@mrmckeb

This comment has been minimized.

Copy link
Owner

@mrmckeb mrmckeb commented Oct 20, 2019

Hi @JounQin, we've just released v2.0.0 which resolves this issue (the rule is now renamed to classnameTransform).

Release notes and migration steps can be found here: https://github.com/mrmckeb/typescript-plugin-css-modules/releases/tag/v2.0.0

Please let me know if you have any other issues or feedback! And thanks for your patience.

@mrmckeb mrmckeb closed this Oct 20, 2019
@JounQin

This comment has been minimized.

Copy link
Author

@JounQin JounQin commented Oct 20, 2019

@mrmckeb In the release page, it's named localsConvention?

@mrmckeb

This comment has been minimized.

Copy link
Owner

@mrmckeb mrmckeb commented Oct 21, 2019

Updated, thanks @JounQin - that was a mistake. It is meant to reflect the new localsConvention, but I named it classnameTransform because it is implemented separately and may not always be in-sync with that setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.