{"size": 677, "ext": "js", "max_stars_repo_path": "scripts/lint.js", "max_stars_repo_name": "Erim32/electron-builder", "max_stars_repo_stars_event_min_datetime": "2021-06-15T13:46:39.000Z", "max_stars_repo_stars_event_max_datetime": "2021-06-15T13:46:39.000Z", "max_issues_repo_path": "scripts/lint.js", "max_issues_repo_name": "Erim32/electron-builder", "max_issues_repo_issues_event_min_datetime": "2021-05-09T09:13:19.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-09T09:13:19.000Z", "max_forks_repo_path": "scripts/lint.js", "max_forks_repo_name": "Erim32/electron-builder", "max_forks_repo_forks_event_min_datetime": "2019-07-28T16:12:02.000Z", "max_forks_repo_forks_event_max_datetime": "2019-07-28T16:12:02.000Z"}
{"max_stars_count": 1, "max_issues_count": 1, "max_forks_count": 1, "avg_line_length": 23.3448275862, "max_line_length": 96, "alphanum_fraction": 0.5849335303}
"use strict"

require("v8-compile-cache")

const path = require("path")
const run = require("tslint/lib/runner").run

module.exports = function (projectDir, callback) {
  // console.log(`Linting ${projectDir}`)
  run({
    config: path.join(process.cwd(), "node_modules/electron-builder-tslint-config/tslint.json"),
    format: "stylish",
    project: projectDir,
    exclude: [],
    files: [],
  }, {log: (m) => {
    if (m != "\n") {
      console.log(m)
    }
  }, error: m => console.error(m)})
    .then(exitCode => {
      process.exitCode = exitCode
      callback(null, exitCode != 0)
    })
    .catch(e => {
      console.error(e)
      callback(null, true)
    })
}