With the release of Stylelint 16.0.0, the CommonJS Node.js API has been deprecated, which could lead to implementation challenges for users of the stylelint-use-nesting plugin. While the plugin currently offers .mjs files, this setup requires users to adopt the stylelint.config.mjs configuration file and ensure that their entire project is compatible with ES modules. This requirement may not be trivial for all users and could limit the plugin's usability.
To enhance compatibility and future-proof the plugin, I propose the following changes:
Remove CommonJS support: By focusing solely on ESM (ECMAScript Modules), we align with the current direction of JavaScript development and tooling. This change simplifies the plugin's structure and reduces potential confusion about which module system to use.
Upgrade the minimum version requirement for Stylelint: By specifying Stylelint ^16.0.1 as the minimum version in peerDependencies, we ensure that users of the plugin are on a version that supports ESM. This move also helps prevent issues that may arise from the deprecated CommonJS API.
These changes aim to streamline the user experience, reduce potential implementation hurdles, and ensure that the stylelint-use-nesting plugin remains a valuable tool for developers seeking to enforce nesting in CSS with the latest versions of Stylelint.
With the release of Stylelint 16.0.0, the CommonJS Node.js API has been deprecated, which could lead to implementation challenges for users of the stylelint-use-nesting plugin. While the plugin currently offers .mjs files, this setup requires users to adopt the stylelint.config.mjs configuration file and ensure that their entire project is compatible with ES modules. This requirement may not be trivial for all users and could limit the plugin's usability.
To enhance compatibility and future-proof the plugin, I propose the following changes:
Remove CommonJS support: By focusing solely on ESM (ECMAScript Modules), we align with the current direction of JavaScript development and tooling. This change simplifies the plugin's structure and reduces potential confusion about which module system to use. Upgrade the minimum version requirement for Stylelint: By specifying Stylelint ^16.0.1 as the minimum version in peerDependencies, we ensure that users of the plugin are on a version that supports ESM. This move also helps prevent issues that may arise from the deprecated CommonJS API. These changes aim to streamline the user experience, reduce potential implementation hurdles, and ensure that the stylelint-use-nesting plugin remains a valuable tool for developers seeking to enforce nesting in CSS with the latest versions of Stylelint.