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

DeprecationWarning: The CommonJS Node.js API is deprecated. #12

Open
ajiho opened this issue Sep 10, 2024 · 1 comment
Open

DeprecationWarning: The CommonJS Node.js API is deprecated. #12

ajiho opened this issue Sep 10, 2024 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@ajiho
Copy link

ajiho commented Sep 10, 2024

package.json

{
"scripts": {
    "stylelint-scss-check": "stylelint-config-prettier-scss-check",
 }
}

run : npm run stylelint-scss-check

(node:5692) [stylelint:002] DeprecationWarning: The CommonJS Node.js API is deprecated.
See https://stylelint.io/migration-guide/to-16
(Use `node --trace-deprecation ...` to show where the warning was created)

my stylelint version: "stylelint": "^16.9.0",

I think stylelint-config-prettier did not take into account some special situations, such as when I use stylelint-config-twbs-bootstrap, it still needs to handle conflicts

This bag is very necessary to exist, thank you very much for your work

However, there will still be some conflicting issues that need to be resolved, and I will continue to report later

@elwayman02
Copy link
Collaborator

elwayman02 commented Sep 12, 2024

Thanks for reporting! It looks like stylelint v16 did away with CommonJS require and we must use imports now instead.

The change likely needs to happen here:

https://github.com/prettier/stylelint-config-prettier-scss/blob/main/src/checker.js#L3-L5
https://github.com/prettier/stylelint-config-prettier-scss/blob/main/bin/check.js#L3

I'm not sure when exactly I'll have time to make the change and test it out, but I'd be happy to review a PR and get a release out if anyone wants to take a stab at it!

@elwayman02 elwayman02 added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants