Plugin not supported when using Stylelint >16
Closed this issue · 2 comments
Stylelint depcreated the use of CommonJS in version 16. This plugin is using CommonJS after bundling it, so it stops us from upgrading to v16.
CommonJS plugins are deprecated (node_modules/stylelint-use-logical/index.cjs")
This is how stylelint-use-logical/index.cjs
looks like;:
'use strict';
var stylelint = require('stylelint');
const inline = {
start: { ltr: 'left', rtl: 'right' },
end: { ltr: 'right', rtl: 'left' }
};
@arvidnilber the plugin is bundled in both CJS and ESM. What seems to not work properly (or at least it looks to me to not work properly) is the resolution of the correct entry point.
I have solved the issue by temporarily patching the source code with pnpm patch
(I think there's a similar command in yarn and, for npm, you can use https://www.npmjs.com/package/patch-package).
The change I made is:
"exports": {
".": {
"node": "./index.mjs",
"require": "./index.cjs"
}
},
Thank you for reporting this.
I've changed this to :
stylelint-use-logical/package.json
Lines 12 to 16 in fdd3f45
Please let me now if this update causes any new issues.