-
Notifications
You must be signed in to change notification settings - Fork 10
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
DeprecationWarning: context.fix
is being deprecated with stylelint 16.8.2
#379
DeprecationWarning: context.fix
is being deprecated with stylelint 16.8.2
#379
Comments
FYI, with Stylelint v16.9.0, a workaround is available via |
- `stylelint` is excluded because of deprecation warnings added in 16.8.2, depending on AndyOGo/stylelint-declaration-strict-value#379 - `eslint-plugin-sonarjs@2` adds a lot of new rules, but I have not gotten around to reviewing them yet, so rule config is unchanged. - Fixes https://github.com/go-gitea/gitea/security/dependabot/70 - Tested code editor and contributor graph
Yeah, so it's deprecated. As an end user, I call it with the CLI and the |
You could downgrade stylint to 16.8.1, before the deprecation was introduced. |
@silverwind @AndyOGo I don't understand, aren't you going to fix this? Or did you already fix it? If so, in which release? |
@kliehm
Thank you. |
- Update all JS dependencies excluding stylelint (because of AndyOGo/stylelint-declaration-strict-value#379). - Update all PY dependencies. - Replace `eslint-plugin-deprecation` with `@typescript-eslint/no-deprecated` rule. - Enabled `unicorn/prefer-math-min-max` and autofixed issues. - Tested all dependencies. --------- Co-authored-by: wxiaoguang <[email protected]>
With all due respect, it's just a workaround, not an actual fix. I think it's better to fix the root cause instead of just ignoring the deprecation warnings. That's what most of us need in order to use this package properly. |
Thank you for sharing your idea. Please understand that this is a deprecation, it's not a bug or something broken.
|
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as off-topic.
This comment was marked as off-topic.
OMG... Stop arguing please.
I still see
just when
not matter with or without Firstly I thinking that While you continue fighting, for me better to comment this config (or disable 'scale-unlimited/declaration-strict-value') rather then downgrading for |
Stylelint offers a workaround to suppress those deprecation warnings.
Then a second time by myself.
The migration will happen with the next major version of stylelint. |
@AndyOGo thanks. I have used
https://stylelint.io/user-guide/options#quietdeprecationwarnings |
I was forced to completely disable the rule in our stylelint config package because:
Why was important to get rid of the warnings:
I'm not aware of the context so I can't participate in the discussion. My desire is to use a package and get a clear but useful solution - a simple configuration, that solves a problem in hand. The simple principle that I'm following is: the fellow dev didn't do anything wrong (no misconfiguration or stupid code), so everything that comes as a problem after that and is a pain. is something that has to be resolved in a satisfactory for everyone way. |
Stylelint offers multiple ways to disable their deprecation warnings. You find that information in different parts of their documentation (I kindly advise to read the full documentation so that you get the full concept of it).
Note: stylelint configurations are shareable by default (so no need to repeat a config that you want to re-use).
You can always share styleint configurations - no need to manually update dozens of stylelint configurations manually (
When the deprecation is migrated you only need to update. (
Okay. |
UpdateI just released an unsafe monkey patch of node's For further information why this approach was choosen, please see the ticket at stylint: Further more node recently added I will leave this ticket open until the next major version of stylelint is released and the |
@AndyOGo - Thank you very much for the monkey patch release! 🐵 For my needs, this approach works much better, and I appreciate you taking the time to implement it. |
@AndyOGo Thanks for the effort. I completely understand and share the hesitance to introduce anti-patterns in your code. I did follow the discussion you linked here and I do like the argumentation in this comment. I could write a whole article on "Why deprecation warnings that can't be muted are evil". And when I say "can't be muted" I include those that can be muted on a process level. Why? Because in some cases we don't have control over the process. Think of shared configs between hundreds of projects (or even bigger number when it's a popular public config). We need a configuration control over the warnings. It's even worst when the end user doesn't understand (and don't need to understand) why this warning is there in a first place (internals should be kept internal). With that said, without knowing any internal logic, I'd say this is a problem of how stylelint introduces warnings, the plugin authors and end users are bearing the consequences. Also it looks like the stylelint community wants and will find a solution in the near future (deducing from what I'm reading in referenced discussions). These are all good things. This is not a unique for stylelint community problem. Not so long ago there was a similar problem with a Sass release that did put the world on fire. The initial response of the developers was "this is the right thing to do, it should be in your face". This changed shortly after and now I'm able to mute warnings per ID (unique name) directly in my Vite config. Why this all matters? Muting a warning is a part of a the contract between a vendor (a package) and user (a developer). There are clear responsibilities and a safety protocol. Explicit opt-out of a specific deprecation warning means "I understand the implications". Semver helps me handle it properly. I'm aware that I'm stuck with a major version. I can also plan what is the right time to fix my code based on the expected effort. I understand the position of a plugin author is unique, because all kind of public API, BC, FC constraints. I'm grateful that you took an extra mile in an attempt to fix this mess. Cheers! |
With the latest stylelint version 16.8.2 I get lots of deprecation warnings because
context.fix
is being deprecated:See 16.8.2 changelog: https://stylelint.io/changelog/
And the PR: stylelint/stylelint#7895
The text was updated successfully, but these errors were encountered: