Closed JoseLion closed 5 months ago
Think it's to do with the fact that stylelint is migrating to ESM, and they've now renamed all their files to have .cjs/.mjs extensions.
You can manually make it work by making the following changes:
// node_modules/stylelint-react-native/dist/rules/dont-weight-no-ignored-values/index.js
// ...
var declarationValueIndex = import("stylelint/lib/utils/declarationValueIndex.cjs"); // explicit import of commonJS file.
// ...
// node_modules/stylelint/lib/augmentConfig.mjs
//...
// pluginImport = pluginImport.default || pluginImport
pluginImport = pluginImport.default.default || pluginImport.default || pluginImport // for some reason there are two layers of default with this module. Checking for this seems to resolve it for me.
// ...
// ...
Thanks for reporting, I'll update the plugin to support v16.
There is a new release with the fix: https://github.com/kristerkari/stylelint-react-native/releases/tag/v2.7.0
Please let me know if there is something more that you need help with.
Currently, this plugin does not work with Stylelint v16. The error below is thrown when using the following versions: