index.js 1021 B

1234567891011121314151617181920212223242526272829303132333435
  1. 'use strict';
  2. const checkAgainstRule = require('./utils/checkAgainstRule');
  3. const createPlugin = require('./createPlugin');
  4. const createStylelint = require('./createStylelint');
  5. const formatters = require('./formatters');
  6. const postcssPlugin = require('./postcssPlugin');
  7. const report = require('./utils/report');
  8. const resolveConfig = require('./resolveConfig');
  9. const ruleMessages = require('./utils/ruleMessages');
  10. const rules = require('./rules');
  11. const { longhandSubPropertiesOfShorthandProperties } = require('./reference/properties');
  12. const standalone = require('./standalone');
  13. const validateOptions = require('./utils/validateOptions');
  14. /** @type {import('stylelint').PublicApi} */
  15. const stylelint = Object.assign(postcssPlugin, {
  16. lint: standalone,
  17. rules,
  18. formatters,
  19. createPlugin,
  20. resolveConfig,
  21. createLinter: createStylelint,
  22. utils: {
  23. report,
  24. ruleMessages,
  25. validateOptions,
  26. checkAgainstRule,
  27. },
  28. reference: {
  29. longhandSubPropertiesOfShorthandProperties,
  30. },
  31. });
  32. module.exports = stylelint;