check.js 397 B

1234567891011121314151617
  1. #!/usr/bin/env node
  2. const { check } = require('../src/checker');
  3. check(process.argv[2]).then((conflicts) => {
  4. if (conflicts && conflicts.length) {
  5. process.exitCode = 1;
  6. console.error(
  7. 'Conflicting rule(s) detected in your stylelint configuration:\n' +
  8. conflicts.join('\n')
  9. );
  10. } else {
  11. console.log(
  12. 'No conflicting rules detected in your stylelint configuration!'
  13. );
  14. }
  15. });