const config = require("stylelint-config-recommended");
require("stylelint").lint({
code: `
@-moz-document domain("github.com")
a
color: red
a:visited
color: red
`,
syntax: "sugarss",
config
})
.then(resultObject => {
const result = resultObject.results[0];
console.log(result.errored ? result.warnings : "No errors");
});