carbon-design-system / stylelint-plugin-carbon-tokens

Apache License 2.0
9 stars 3 forks source link

Stylelint 16 requires exposed ruleName #107

Closed elycheea closed 4 months ago

elycheea commented 5 months ago

Was reviewing a dependency update which updates to Stylelint 16 and caught this during a CI check.

Downgrading Stylelint back to 15.11.0 and Prettier down to 2.8.8 gets our lint passing again.

Running audit using: yarn npm audit --environment production --severity moderate
Error: stylelint requires plugins to expose a ruleName. The plugin "/Code/ibm-products/node_modules/stylelint-plugin-carbon-tokens/dist/index.js" is not doing this, so will not work with stylelint. Please file an issue with the plugin.

Previously documented in this PR https://github.com/carbon-design-system/ibm-products/pull/4168#pullrequestreview-1863853796.

lee-chase commented 5 months ago

This is a bit trickier than first glance @elycheea

The rules do have rule names but in moving from 15 to 16 stylelint does not interpret the CJS plugin as having them seeing 'default' when looking for rulename image

As opposed to an ESM module at the same break point image

Converting to ESM on the face of it seems simple enough but hits a number of issues.

lee-chase commented 4 months ago

@elycheea you are now blocked by a carbon dependency on stylelint-a11y perhaps switch to @double-great/stylelint-a11y