'use strict';

const path = require('path');
const childProcess = require('child_process');
const execSync = childProcess.execSync;

const utils = require('../../lib/utils');

Promise.resolve()
  .then(() => {
    const prjName = 'app';

    utils.logTitle(`Linting application : ${prjName}...`);

    const ng = path.resolve(process.cwd(), '@angular', 'cli', 'bin', 'ng');    

    execSync(`ng lint ${prjName}`);  
  })
  .catch((e) => {
    console.error(e);
    process.exit(1);
  });