From 0e28ca7e66632b6c2ed239384e5afd4e093976c2 Mon Sep 17 00:00:00 2001 From: Volodymyr Kolesnykov Date: Thu, 2 Dec 2021 03:44:52 +0200 Subject: [PATCH] Failed validation example --- .github/workflows/build.yml | 3 +++ package.json | 2 +- src/index.ts | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a6334b2..69d6d18 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,3 +37,6 @@ jobs: - name: Run postinstall scripts run: npm rebuild && npm run prepare --if-present + + - name: Lint + run: npm run lint diff --git a/package.json b/package.json index 075059a..36d66f0 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "scripts": { "build": "tsc", - "lint": "eslint .", + "lint": "npm run build && eslint -f dist/index.js .", "pretest": "npm run lint", "prepare": "npm run build" }, diff --git a/src/index.ts b/src/index.ts index d003461..8c08aac 100644 --- a/src/index.ts +++ b/src/index.ts @@ -58,8 +58,8 @@ const format: ESLint.Formatter['format'] = (results: ESLint.LintResult[], data?: startGroup('ESLint Annotations'); - let result = ''; - const unhook = hookStdout((_orig, s, encoding, cb): boolean => { + var result = ''; + let unhook = hookStdout((_orig, s, encoding, cb): boolean => { const callback = typeof encoding === 'function' ? encoding : cb; result += s.toString();