Open sebbayer opened 2 months ago
FYI, with Stylelint v16.9.0, a workaround is available via NODE_OPTIONS=--no-deprecation
to suppress the warnings.
Yeah, so it's deprecated. As an end user, I call it with the CLI and the --fix
suffix. Is there anything else I can do to make this annoying message go away? Should I edit my .stylelintrc.cjs
file? I don't use context.fix
anywhere, I'm not a Stylelint contributor.
Is there anything else I can do to make this annoying message go away
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 You find the answer to your question in the release notes of stylelint.
Fixed: honour Node.js
--no-deprecation
flag for rule deprecation warnings (https://github.com/stylelint/stylelint/pull/7943) (@Mouvedia). https://github.com/stylelint/stylelint/releases/tag/16.9.0
Thank you.
@kliehm You find the answer to your question in the release notes of stylelint.
Fixed: honour Node.js
--no-deprecation
flag for rule deprecation warnings (stylelint/stylelint#7943) (@Mouvedia). https://github.com/stylelint/stylelint/releases/tag/16.9.0Thank you.
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.
You get a warning and styelint
provides a way to hide those - the new API will be enforced in the next major version and then this plugin will update.
(computing) the fact of a software feature becoming outdated and best avoided because it has been replaced with something newer https://www.oxfordlearnersdictionaries.com/definition/english/deprecation
Thank you for sharing you idea.
Please understand that this is a deprecation, it's not a bug or something broken. You get a warning and
styelint
provides a way to hide those - the new API will be enforced in the next major version and then this plugin will update.(computing) the fact of a software feature becoming outdated and best avoided because it has been replaced with something newer https://www.oxfordlearnersdictionaries.com/definition/english/deprecation
I know what deprecation means. It also means that you need to change something so that it's still compatible in the future. You can't just sit it out. đ
@kliehm next time before you spam an issue thread.
Please make sure to carefully read and understand the official documentation and release notes. Then please make sure that you are able to evaluate the importance of different aspects of software engineering. Last but not least work on your social competence.
Thank you.
I would suggest the same. I was asking a reasonable question what your intention is to be forward compatible since there these deprecation warnings which will lead to incompatibility. All you suggested was âswitch the warnings offâ. That's neither helpful, nor respectful, just ignorant. I'm a senior programmer, not an idiot.
@kliehm No, that is incorrect.
Your question has already been answered two ways.
maintenance
label on Aug 19stylelint
release notes and the official way to deal with this until the context.fix
API is completely removedFrankly, you have not accomplished a senior level in programming - that becomes obvious by your lack of understanding of these clear and simple information.
@kliehm No, that is incorrect.
Frankly, you have not accomplished a senior level in programming - that becomes obvious by your lack of understanding of these clear and simple information.
Please refrain from depreciating people whom you don't know, and stick to the topic.
@kliehm Why is your behavior okay? Why is your cynical and derisive comment acceptable?
You can't just sit it out. đ
To me it's not acceptable and I insist that you
I don't need your advice on technical competence. That is beyond your knowledge and competence to give such advice. You don't appear to be very social competent yourself. I hope your future employer reads this embarrassing dialogue.
@kliehm Alright, I got that.
What are log levels? What is verbosity? What are syntactical and lexical grammars? What makes a grammar context free? What is and how to read the BackusâNaur form? What is the visitor pattern? Did you study the syntax specifications of CSS, SASS, Less and other CSS-like grammars?
You know the 101 of them by heart?
Well, you called me ignorant? To carefully study, understand and apply the above one has to be quite the opposite of ignorant.
Maybe you don't realize how invalidating that term really is.
- (often disapproving) not having or showing much knowledge or information about things; not educated
- not having any knowledge or information about a particular thing https://www.oxfordlearnersdictionaries.com/definition/english/ignorant
Or you just don't know how much work goes into open source software. This is a social project, free of charge.
OMG... Stop arguing please.
...
"stylelint": "^16.10.0",
"stylelint-config-clean-order": "^6.1.0",
"stylelint-config-standard-scss": "^13.1.0",
"stylelint-declaration-strict-value": "^1.10.6",
"stylelint-use-logical-spec": "^5.0.1",
...
I still see
...
(node:16392) [stylelint:005] DeprecationWarning: `context.fix` is being deprecated.
Please pass a `fix` callback to the `report` utility of "scale-unlimited/declaration-strict-value" instead.
(node:16392) [stylelint:005] DeprecationWarning: `context.fix` is being deprecated.
Please pass a `fix` callback to the `report` utility of "scale-unlimited/declaration-strict-value" instead.
(node:16392) [stylelint:005] DeprecationWarning: `context.fix` is being deprecated.
Please pass a `fix` callback to the `report` utility of "scale-unlimited/declaration-strict-value" instead.
...
just when scale-unlimited/declaration-strict-value
config added.
Like:
'scale-unlimited/declaration-strict-value': [
['/color$/', 'fill'],
{
expandShorthand: true,
ignoreValues: ['transparent', 'currentcolor', 'inherit'],
autoFixFunc: autoFixFunc,
disableFix: true
}
]
not matter with or without autoFixFunc
or disableFix: true
Firstly I thinking that disableFix: true
should help me,
While you continue fighting, for me better to comment this config (or disable 'scale-unlimited/declaration-strict-value') rather then downgrading for styleint
.
@ScorpAL
Stylelint offers a workaround to suppress those deprecation warnings. This has been pointed out first by @silverwind
FYI, with Stylelint v16.9.0, a workaround is available via
NODE_OPTIONS=--no-deprecation
to suppress the warnings. https://github.com/AndyOGo/stylelint-declaration-strict-value/issues/379#issuecomment-2317074368
Then a second time by myself.
@kliehm You find the answer to your question in the release notes of stylelint.
Fixed: honour Node.js
--no-deprecation
flag for rule deprecation warnings (stylelint/stylelint#7943) (@Mouvedia). https://github.com/stylelint/stylelint/releases/tag/16.9.0Thank you. https://github.com/AndyOGo/stylelint-declaration-strict-value/issues/379#issuecomment-2445259247
The migration will happen with the next major version of stylelint.
@AndyOGo thanks.
I have used --quiet-deprecation-warnings
temporarily in my package.json
scripts
"scripts": {
...
"lint:css": "stylelint src/**/*.{css,scss} --quiet-deprecation-warnings",
...
},
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).
quietDeprecationWarnings
Option
Attention: please note that at the very top it is defined how those options may be used
Options shared by the:
- CLI
- Node.js API
- PostCSS plugin You can use some of these options in the configuration object. https://stylelint.io/user-guide/options
- via their CLI's
stylelint --quiet-deprecation-warnings
arg- via their Node.js API Options
- via their PostCSS plugin Options
NODE_OPTIONS=--no-deprecation
environment variable
NODE_OPTIONS=options...
list of command-line options featureNote: stylelint configurations are shareable by default (so no need to repeat a config that you want to re-use). https://stylelint.io/user-guide/configure#extends
@myovchev
- I don't want to add flags to dozens of packages + customers using it.
You can always share styleint configurations - no need to manually update dozens of stylelint configurations manually (npm update
is sufficient)
https://stylelint.io/user-guide/configure#extends
- I don't want to do the same once the problem is resolved
When the deprecation is migrated you only need to update. (quietDeprecationWarnings
is a core stylelint feature and is in no way related to this plugin)
- It nearly breaks CI (large codebases).
Okay. This concerns me a lot, are you sure that your CI can be nearly broken by verbose logging? If that is the case, please report it to your CI provider.
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: https://github.com/stylelint/stylelint/pull/7895