createPlugin.js 359 B

1234567891011121314151617
  1. 'use strict';
  2. /** @typedef {import('stylelint').Rule} StylelintRule */
  3. /**
  4. * @param {string} ruleName
  5. * @param {StylelintRule} rule
  6. * @returns {{ruleName: string, rule: StylelintRule}}
  7. */
  8. function createPlugin(ruleName, rule) {
  9. return {
  10. ruleName,
  11. rule,
  12. };
  13. }
  14. module.exports = /** @type {typeof import('stylelint').createPlugin} */ (createPlugin);