{"size": 742, "ext": "js", "max_stars_repo_path": "test/lessIntegration.js", "max_stars_repo_name": "onigoetz/postcss-reporter", "max_stars_repo_stars_event_min_datetime": "2015-06-24T02:42:01.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-04T19:54:45.000Z", "max_issues_repo_path": "test/lessIntegration.js", "max_issues_repo_name": "iandunn/postcss-reporter", "max_issues_repo_issues_event_min_datetime": "2020-03-31T10:43:08.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-03T10:23:52.000Z", "max_forks_repo_path": "test/lessIntegration.js", "max_forks_repo_name": "postcss/postcss-console-log-messages", "max_forks_repo_forks_event_min_datetime": "2015-10-20T09:29:50.000Z", "max_forks_repo_forks_event_max_datetime": "2021-12-26T21:39:56.000Z"}
{"max_stars_count": 171, "max_issues_count": 122, "max_forks_count": 28, "avg_line_length": 29.68, "max_line_length": 64, "alphanum_fraction": 0.6455525606}
var less = require('less');
var postcss = require('postcss');
var stylelint = require('stylelint');
var reporter = require('..');
var fs = require('fs');
var path = require('path');

var lessSource = path.join(__dirname, 'fixtures/less-bar.less');

fs.readFile(lessSource, 'utf8', function(err, code) {
  if (err) throw err;

  var lessOptions = {
    sourceMap: { sourceMapFileInline: true },
    paths: [path.join(__dirname, 'fixtures')],
    filename: lessSource,
  };
  less.render(code, lessOptions).then(function(output) {
    return postcss()
      .use(stylelint({ rules: { 'selector-no-id': true } }))
      .use(reporter())
      .process(output.css, { from: lessSource })
  }).catch(function(err) { console.log(err.stack); });
});
