Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

parseSelector.js 515B

123456789101112131415161718
  1. 'use strict';
  2. const selectorParser = require('postcss-selector-parser');
  3. /**
  4. * @param {string} selector
  5. * @param {import('stylelint').PostcssResult} result
  6. * @param {import('postcss').Node} node
  7. * @param {Function} cb
  8. */
  9. module.exports = function parseSelector(selector, result, node, cb) {
  10. try {
  11. // @ts-ignore TODO TYPES wrong postcss-selector-parser types
  12. return selectorParser(cb).processSync(selector);
  13. } catch {
  14. result.warn('Cannot parse selector', { node, stylelintType: 'parseError' });
  15. }
  16. };