Skip to content

Commit

Permalink
partially updated lint script
Browse files Browse the repository at this point in the history
  • Loading branch information
r3kt-eth committed May 2, 2023
1 parent 46f22a6 commit 47d1ff3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lint.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const fs = require('fs');
const CLIEngine = require('eslint').CLIEngine;
const CLIEngine = require('eslint').ESLint;

const argv = process.argv.slice(2);
const cli = new CLIEngine({
Expand All @@ -11,18 +11,18 @@ const cli = new CLIEngine({
console.log('Starting to lint..');

// Lint all files
const report = cli.executeOnFiles(argv[0]);
const report = cli.lintFiles(argv[0]);

// get the default formatter
const consoleFormatter = cli.getFormatter();
const consoleFormatter = cli.loadFormatter();

console.log('Lint finished');

// output to console
console.log(consoleFormatter(report.results));

// Output to sarif format
const otherFormatter = cli.getFormatter(
const otherFormatter = cli.loadFormatter(
'@microsoft/eslint-formatter-sarif/sarif.js',
);

Expand Down

0 comments on commit 47d1ff3

Please sign in to comment.