Skip to content

Commit

Permalink
chore(deps-dev): Bump @typescript-eslint/eslint-plugin from 4.33.0 to…
Browse files Browse the repository at this point in the history
… 5.59.8 (#1008)

Bumps
[@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin)
from 4.33.0 to 5.59.8.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/typescript-eslint/typescript-eslint/releases"><code>@​typescript-eslint/eslint-plugin</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v5.59.8</h2>
<h2><a
href="https://github.com/typescript-eslint/typescript-eslint/compare/v5.59.7...v5.59.8">5.59.8</a>
(2023-05-29)</h2>
<p><strong>Note:</strong> Version bump only for package
<code>@​typescript-eslint/typescript-eslint</code></p>
<h2>v5.59.7</h2>
<h2><a
href="https://github.com/typescript-eslint/typescript-eslint/compare/v5.59.6...v5.59.7">5.59.7</a>
(2023-05-22)</h2>
<p><strong>Note:</strong> Version bump only for package
<code>@​typescript-eslint/typescript-eslint</code></p>
<h2>v5.59.6</h2>
<h2><a
href="https://github.com/typescript-eslint/typescript-eslint/compare/v5.59.5...v5.59.6">5.59.6</a>
(2023-05-15)</h2>
<p><strong>Note:</strong> Version bump only for package
<code>@​typescript-eslint/typescript-eslint</code></p>
<h2>v5.59.5</h2>
<h2><a
href="https://github.com/typescript-eslint/typescript-eslint/compare/v5.59.4...v5.59.5">5.59.5</a>
(2023-05-08)</h2>
<p><strong>Note:</strong> Version bump only for package
<code>@​typescript-eslint/typescript-eslint</code></p>
<h2>v5.59.4</h2>
<h2><a
href="https://github.com/typescript-eslint/typescript-eslint/compare/v5.59.3...v5.59.4">5.59.4</a>
(2023-05-08)</h2>
<p><strong>Note:</strong> Version bump only for package
<code>@​typescript-eslint/typescript-eslint</code></p>
<h2>v5.59.3</h2>
<h2><a
href="https://github.com/typescript-eslint/typescript-eslint/compare/v5.59.2...v5.59.3">5.59.3</a>
(2023-05-08)</h2>
<p><strong>Note:</strong> Version bump only for package
<code>@​typescript-eslint/typescript-eslint</code></p>
<h2>v5.59.2</h2>
<h2><a
href="https://github.com/typescript-eslint/typescript-eslint/compare/v5.59.1...v5.59.2">5.59.2</a>
(2023-05-01)</h2>
<p><strong>Note:</strong> Version bump only for package
<code>@​typescript-eslint/typescript-eslint</code></p>
<h2>v5.59.1</h2>
<h2><a
href="https://github.com/typescript-eslint/typescript-eslint/compare/v5.59.0...v5.59.1">5.59.1</a>
(2023-04-24)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>eslint-plugin:</strong> [prefer-regexp-exec] skip malformed
regexes (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/issues/6935">#6935</a>)
(<a
href="https://github.com/typescript-eslint/typescript-eslint/commit/05ed60e25f1de9d1bb83d56c81a349130960bec8">05ed60e</a>)</li>
<li><strong>eslint-plugin:</strong> [unified-signatures] no parameters
function (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/issues/6940">#6940</a>)
(<a
href="https://github.com/typescript-eslint/typescript-eslint/commit/297086154acc568a0ae8eb41c8977b7a7ba4e0ed">2970861</a>)</li>
</ul>
<h2>v5.59.0</h2>
<h1><a
href="https://github.com/typescript-eslint/typescript-eslint/compare/v5.58.0...v5.59.0">5.59.0</a>
(2023-04-17)</h1>
<h3>Bug Fixes</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md"><code>@​typescript-eslint/eslint-plugin</code>'s
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/typescript-eslint/typescript-eslint/compare/v5.59.7...v5.59.8">5.59.8</a>
(2023-05-29)</h2>
<p><strong>Note:</strong> Version bump only for package
<code>@​typescript-eslint/eslint-plugin</code></p>
<h2><a
href="https://github.com/typescript-eslint/typescript-eslint/compare/v5.59.6...v5.59.7">5.59.7</a>
(2023-05-22)</h2>
<p><strong>Note:</strong> Version bump only for package
<code>@​typescript-eslint/eslint-plugin</code></p>
<h2><a
href="https://github.com/typescript-eslint/typescript-eslint/compare/v5.59.5...v5.59.6">5.59.6</a>
(2023-05-15)</h2>
<p><strong>Note:</strong> Version bump only for package
<code>@​typescript-eslint/eslint-plugin</code></p>
<h2><a
href="https://github.com/typescript-eslint/typescript-eslint/compare/v5.59.4...v5.59.5">5.59.5</a>
(2023-05-08)</h2>
<p><strong>Note:</strong> Version bump only for package
<code>@​typescript-eslint/eslint-plugin</code></p>
<h2><a
href="https://github.com/typescript-eslint/typescript-eslint/compare/v5.59.3...v5.59.4">5.59.4</a>
(2023-05-08)</h2>
<p><strong>Note:</strong> Version bump only for package
<code>@​typescript-eslint/eslint-plugin</code></p>
<h2><a
href="https://github.com/typescript-eslint/typescript-eslint/compare/v5.59.2...v5.59.3">5.59.3</a>
(2023-05-08)</h2>
<p><strong>Note:</strong> Version bump only for package
<code>@​typescript-eslint/eslint-plugin</code></p>
<h2><a
href="https://github.com/typescript-eslint/typescript-eslint/compare/v5.59.1...v5.59.2">5.59.2</a>
(2023-05-01)</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/typescript-eslint/typescript-eslint/commit/391a6702c0a9b5b3874a7a27047f2a721f090fb6"><code>391a670</code></a>
chore: publish v5.59.8</li>
<li><a
href="https://github.com/typescript-eslint/typescript-eslint/commit/6b8ec6e9ef743719180a3ee45bc8a4a858718f41"><code>6b8ec6e</code></a>
docs(eslint-plugin): update correct code example for
sort-type-constituents (...</li>
<li><a
href="https://github.com/typescript-eslint/typescript-eslint/commit/5166a00e1a903901c5bedbd7d57198fc0962061e"><code>5166a00</code></a>
chore: publish v5.59.7</li>
<li><a
href="https://github.com/typescript-eslint/typescript-eslint/commit/8951732e839a94d7c436d5774d473e6a05e8a9f1"><code>8951732</code></a>
docs(website): fix wrong example in <code>prefer-includes</code> (<a
href="https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin/issues/7036">#7036</a>)</li>
<li><a
href="https://github.com/typescript-eslint/typescript-eslint/commit/5b0e577f2552e8b2c53a3fb22edc9d219589b937"><code>5b0e577</code></a>
chore: publish v5.59.6</li>
<li><a
href="https://github.com/typescript-eslint/typescript-eslint/commit/a6f23a2dd5f1ad8e3ede0a4594a5e435182b4a2c"><code>a6f23a2</code></a>
chore: publish v5.59.5</li>
<li><a
href="https://github.com/typescript-eslint/typescript-eslint/commit/13fd1e5edbfee5c05a791ef49a711ffc0b0ed4e5"><code>13fd1e5</code></a>
chore: publish v5.59.4</li>
<li><a
href="https://github.com/typescript-eslint/typescript-eslint/commit/200afb6113e3d8f42e38d5b3493ee9b9bdfba22f"><code>200afb6</code></a>
chore: publish v5.59.3</li>
<li><a
href="https://github.com/typescript-eslint/typescript-eslint/commit/30f41aba51eb7a4ddc6cd5269489a1bc0d6a759b"><code>30f41ab</code></a>
docs: [ban-types] update documentation; suggest option and defaults (<a
href="https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin/issues/7002">#7002</a>)</li>
<li><a
href="https://github.com/typescript-eslint/typescript-eslint/commit/d4bc770be1ac23ad0830c528703dbf08773ffb09"><code>d4bc770</code></a>
docs: add missing ! (...) around comparison cases in
no-unnecessary-boolean-l...</li>
<li>Additional commits viewable in <a
href="https://github.com/typescript-eslint/typescript-eslint/commits/v5.59.8/packages/eslint-plugin">compare
view</a></li>
</ul>
</details>
  • Loading branch information
dependabot[bot] committed Jun 1, 2023
1 parent addfff6 commit 6a328e4
Show file tree
Hide file tree
Showing 6 changed files with 117 additions and 98 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@types/lodash": "^4.14.136",
"@types/node": "^18.16.2",
"@types/yargs": "^17.0.8",
"@typescript-eslint/eslint-plugin": "^4.0.1",
"@typescript-eslint/eslint-plugin": "^5.59.8",
"@typescript-eslint/parser": "^5.58.0",
"eslint": "^7.8.1",
"eslint-plugin-security": "^1.4.0",
Expand Down
5 changes: 4 additions & 1 deletion src/cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ describe('axe-sarif-converter CLI', () => {
`(
'supports conversion from axe-cli output $inputFile',
async ({ inputFile }) => {
const inputFilePath = path.join(testResourcesDir, inputFile);
const inputFilePath = path.join(
testResourcesDir,
inputFile as string,
);
const outputFile = path.join(testResultsDir, `${inputFile}.sarif`);
await deleteIfExists(outputFile);

Expand Down
3 changes: 2 additions & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

import { AxeResults } from 'axe-core';
import * as fs from 'fs';
import { Log } from 'sarif';
import * as yargs from 'yargs';
Expand Down Expand Up @@ -88,7 +89,7 @@ const sarifLogs: Log[] = flatten(
} else {
// Treating as a single axe results object, like
// JSON.stringify(await axe.run(...)) would produce
return [convertAxeToSarif(inputFileJson)];
return [convertAxeToSarif(inputFileJson as any as AxeResults)];
}
}),
);
Expand Down
17 changes: 11 additions & 6 deletions src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import * as fs from 'fs';
import * as path from 'path';
import { AxeRawResult } from './axe-raw-result';
import { convertAxeToSarif, SarifLog, sarifReporter } from './index';
import { SarifLog, convertAxeToSarif, sarifReporter } from './index';
import { testResourceTimestampPlaceholder } from './test-resource-constants';

function readTestResourceJSON(testResourceFileName: string): any {
Expand Down Expand Up @@ -114,8 +114,10 @@ describe('public convertAxeToSarif API', () => {
`(
'converts pinned v1/v2 input $inputFile to pinned output $outputFile',
({ inputFile, outputFile }) => {
const input: AxeResults = readTestResourceJSON(inputFile);
const expectedOutput: SarifLog = readTestResourceJSON(outputFile);
const input: AxeResults = readTestResourceJSON(inputFile as string);
const expectedOutput: SarifLog = readTestResourceJSON(
outputFile as string,
);

const actualOutput: SarifLog = convertAxeToSarif(input);

Expand Down Expand Up @@ -160,9 +162,12 @@ describe('public sarifReporter API', () => {
'converts pinned raw input $inputFile to pinned output $outputFile',
async ({ inputFile, outputFile }) => {
return new Promise<void>((resolve) => {
const input: AxeRawResult[] = readTestResourceJSON(inputFile);
const expectedOutput: SarifLog =
readTestResourceJSON(outputFile);
const input: AxeRawResult[] = readTestResourceJSON(
inputFile as string,
);
const expectedOutput: SarifLog = readTestResourceJSON(
outputFile as string,
);

function callback(convertedSarifResults: SarifLog) {
normalizeEnvironmentDerivedSarifProperties(
Expand Down
12 changes: 9 additions & 3 deletions src/sarif-result-message-formatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import * as Sarif from 'sarif';
import { AxeRawCheckResult, AxeRawNodeResult } from './axe-raw-result';
import { escapeForMarkdown, isNotEmpty } from './string-utils';

declare type CheckResultArray = Axe.CheckResult[] | AxeRawCheckResult[];

export function formatSarifResultMessage(
node: Axe.NodeResult | AxeRawNodeResult,
kind: Sarif.Result.kind,
Expand All @@ -13,7 +15,9 @@ export function formatSarifResultMessage(
const markdownArray: string[] = [];

if (kind === 'fail') {
const allAndNone = (node.all as any).concat(node.none);
const allAndNone = (node.all as any).concat(
node.none,
) as CheckResultArray;
formatSarifCheckResultsMessage(
'Fix all of the following:',
allAndNone,
Expand All @@ -27,7 +31,9 @@ export function formatSarifResultMessage(
markdownArray,
);
} else {
const allNodes = (node.all as any).concat(node.none).concat(node.any);
const allNodes = (node.all as any)
.concat(node.none)
.concat(node.any) as CheckResultArray;
formatSarifCheckResultsMessage(
'The following tests passed:',
allNodes,
Expand All @@ -44,7 +50,7 @@ export function formatSarifResultMessage(

function formatSarifCheckResultsMessage(
heading: string,
checkResults: Axe.CheckResult[] | AxeRawCheckResult[],
checkResults: CheckResultArray,
textArray: string[],
markdownArray: string[],
): void {
Expand Down
Loading

0 comments on commit 6a328e4

Please sign in to comment.