index.js 867 B

12345678910111213141516171819202122232425262728293031
  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 ruleMessages = require('./utils/ruleMessages');
  9. const rules = require('./rules');
  10. const standalone = require('./standalone');
  11. const validateOptions = require('./utils/validateOptions');
  12. const resolveConfig = require('./resolveConfig');
  13. /** @type {import('stylelint').PublicApi} */
  14. const stylelint = Object.assign(postcssPlugin, {
  15. lint: standalone,
  16. rules,
  17. formatters,
  18. createPlugin,
  19. resolveConfig,
  20. createLinter: createStylelint,
  21. utils: {
  22. report,
  23. ruleMessages,
  24. validateOptions,
  25. checkAgainstRule,
  26. },
  27. });
  28. module.exports = stylelint;