Comments (2)
There are two options that come to mind to mitigate this, set up a peerDependecy on postcss in this npm package similar to the same version that postcss-scss uses.
Alternatively, I can set up postcss as a dependency in this config and set at the same version that postcss-scss lists as a peerDependency.
Typically I lean towards setting it up as a peerDependency similar to how stylelint is set up in this package currently:
https://github.com/bjankord/stylelint-config-sass-guidelines/blob/main/package.json#L37-L38
On the flip side, I know people often ignore peerDependency warnings, if a package has a peerDependency and its not in your dependency tree, (node_modules), yarn and npm (v4-v6) will warn about it I believe and I think in npm 7 will auto install peer dependencies. Setting postcss as a dependency in this project should help people running into this error.
For now, I'm planning to set postcss as a peerDependency in this config to the same version postcss-scss sets the peerDependency on postcss and pass the responsibility to projects consuming this config to install the needed version of postcss.
If more people run into this issue, I'll likely move to switch postcss from a peerDependency in this package to a dependency as I know people often overlook the peerDependency warnings and will likely be confused by this error message:
TypeError: Class extends value undefined is not a constructor or null at Object.<anonymous>
from stylelint-config-sass-guidelines.
Found some related issues:
It seems if you can not upgrade the root version of postcss to v8 in your projects, you will not be able to use stylelint scss based configs.
from stylelint-config-sass-guidelines.
Related Issues (20)
- stylelint: Undefined rule at-rule-disallowed-list error in VSCode HOT 1
- calc w/ scss variable - no error HOT 4
- disable / change property order HOT 2
- PostCSS Upgrade HOT 3
- Update scss/at-mixin-pattern HOT 3
- Suggestion: Allow default scss/dollar-variable-pattern to match variables like $x1 HOT 1
- Broken link HOT 2
- Removing stylelint-order HOT 4
- Order `dollar-variables` should always come first HOT 1
- Suggestion: enable `scss/no-global-function-names` HOT 2
- Update to Stylelint 15+ HOT 2
- Allow installing together with Stylelint v15 HOT 5
- False positive errors when using sass:map and using module's namespace HOT 1
- Enable compatibility with stylelint 16.x HOT 2
- renamed rule: scss/at-import-partial-extension-blacklist (deprecation) HOT 2
- Review https://github.com/stylelint-stylistic/stylelint-stylistic and consider adding back stylistic rules that were deprecated from the main stylelint package HOT 1
- Release v11.1.0 HOT 1
- Move tests in __tests__/valid-scss.test.mjs to their own individual rule test files
- Release v12 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stylelint-config-sass-guidelines.