- Notifications
You must be signed in to change notification settings - Fork74
feat: add env var to disable plugin#244
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
src/index.ts Outdated
if (process.env.TS_PLUGIN_CSS_MODULES_DISALBED !== undefined) { | ||
return info.languageService; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I have basically 0 experience with the TS language server, so I don't have a ton of knowledge re: whether this is the right thing to return early with. this was just copied from the eslint plugin I referenced in the PR description.
env.TS_PLUGIN_CSS_MODULES_DISALBED
tested this locally* works nicely on MacOS via
|
env.TS_PLUGIN_CSS_MODULES_DISALBED
Thanks for this@ekilah, and sorry it took a long time. |
thanks :) It'll really help my workflow at least. |
This has now shipped inv5.1.0. Thanks again! |
#586)[](https://renovatebot.com)This PR contains the following updates:| Package | Change | Age | Adoption | Passing | Confidence ||---|---|---|---|---|---||[typescript-plugin-css-modules](https://togithub.com/mrmckeb/typescript-plugin-css-modules)| [`^5.0.2` ->`^5.1.0`](https://renovatebot.com/diffs/npm/typescript-plugin-css-modules/5.0.2/5.1.0)|[](https://docs.renovatebot.com/merge-confidence/)|[](https://docs.renovatebot.com/merge-confidence/)|[](https://docs.renovatebot.com/merge-confidence/)|[](https://docs.renovatebot.com/merge-confidence/)|---### Release Notes<details><summary>mrmckeb/typescript-plugin-css-modules(typescript-plugin-css-modules)</summary>###[`v5.1.0`](https://togithub.com/mrmckeb/typescript-plugin-css-modules/releases/tag/v5.1.0)[CompareSource](https://togithub.com/mrmckeb/typescript-plugin-css-modules/compare/v5.0.2...v5.1.0)#### What's Changed- chore: update dependencies by[@​mrmckeb](https://togithub.com/mrmckeb) in[https://github.com/mrmckeb/typescript-plugin-css-modules/pull/255](https://togithub.com/mrmckeb/typescript-plugin-css-modules/pull/255)- feat: add env var to disable plugin by[@​ekilah](https://togithub.com/ekilah) in[https://github.com/mrmckeb/typescript-plugin-css-modules/pull/244](https://togithub.com/mrmckeb/typescript-plugin-css-modules/pull/244)- docs: update README regexp by[@​mrmckeb](https://togithub.com/mrmckeb) in[https://github.com/mrmckeb/typescript-plugin-css-modules/pull/256](https://togithub.com/mrmckeb/typescript-plugin-css-modules/pull/256)- feat(getCssExports): adds support for SCSS/SASS partials via aliasesby [@​rmachado-studocu](https://togithub.com/rmachado-studocu) in[https://github.com/mrmckeb/typescript-plugin-css-modules/pull/251](https://togithub.com/mrmckeb/typescript-plugin-css-modules/pull/251)- feat: customRender return sourceMap support by[@​qyzzzz](https://togithub.com/qyzzzz) in[https://github.com/mrmckeb/typescript-plugin-css-modules/pull/249](https://togithub.com/mrmckeb/typescript-plugin-css-modules/pull/249)#### New Contributors- [@​rmachado-studocu](https://togithub.com/rmachado-studocu) madetheir first contribution in[https://github.com/mrmckeb/typescript-plugin-css-modules/pull/251](https://togithub.com/mrmckeb/typescript-plugin-css-modules/pull/251)- [@​qyzzzz](https://togithub.com/qyzzzz) made their firstcontribution in[https://github.com/mrmckeb/typescript-plugin-css-modules/pull/249](https://togithub.com/mrmckeb/typescript-plugin-css-modules/pull/249)**Full Changelog**:mrmckeb/typescript-plugin-css-modules@v5.0.2...v5.1.0</details>---### Configuration📅 **Schedule**: Branch creation - At any time (no schedule defined),Automerge - At any time (no schedule defined).🚦 **Automerge**: Disabled by config. Please merge this manually once youare satisfied.♻ **Rebasing**: Whenever PR becomes conflicted, or you tick therebase/retry checkbox.🔕 **Ignore**: Close this PR and you won't be reminded about this updateagain.---- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, checkthis box---This PR has been generated by [MendRenovate](https://www.mend.io/free-developer-tools/renovate/). Viewrepository job log[here](https://developer.mend.io/github/likec4/likec4).<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMDAuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIwMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This follows a pattern I've seen in other plugins, like this from
typescript-eslint-language-service
:https://github.com/Quramy/typescript-eslint-language-service/blob/da3c201c94dd3c3a6a10f83cbbd54fae9d3db9e1/src/plugin-module-factory.ts#L9
Reasoning:
When this plugin seems to be causing WebStorm some headaches (or certain versions of TS, etc) and I need to work on something else for a while, I find it tedious to comment it out from the
plugins
list of ourtsconfig
. The biggest headache there is that I often commit this commented-out code to my branches, only to have to revert it later when reviewing my PRs.