From 403fd1276d45edaa5434e2379afd1e22b9e40c1f Mon Sep 17 00:00:00 2001 From: Milos Djermanovic Date: Thu, 4 Feb 2021 13:23:47 +0100 Subject: [PATCH 1/2] Upgrade: @babel/code-frame@7.12.13 --- package.json | 2 +- tests/lib/cli-engine/formatters/codeframe.js | 22 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 3a98f413bce..eb1dfdaa768 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "homepage": "https://eslint.org", "bugs": "https://github.com/eslint/eslint/issues/", "dependencies": { - "@babel/code-frame": "^7.0.0", + "@babel/code-frame": "^7.12.13", "@eslint/eslintrc": "^0.3.0", "ajv": "^6.10.0", "chalk": "^4.0.0", diff --git a/tests/lib/cli-engine/formatters/codeframe.js b/tests/lib/cli-engine/formatters/codeframe.js index 398d6b8c7af..f2187312d3e 100644 --- a/tests/lib/cli-engine/formatters/codeframe.js +++ b/tests/lib/cli-engine/formatters/codeframe.js @@ -86,7 +86,7 @@ describe("formatter:codeframe", () => { "> 1 | var foo = 1;", " | ^", " 2 | var bar = 2;", - " 3 | ", + " 3 |", "\n", "1 warning found." ].join("\n")); @@ -115,7 +115,7 @@ describe("formatter:codeframe", () => { "> 1 | var foo = 1;", " | ^", " 2 | var bar = 2;", - " 3 | ", + " 3 |", "\n", "1 warning found.", "1 warning potentially fixable with the `--fix` option." @@ -147,7 +147,7 @@ describe("formatter:codeframe", () => { "> 1 | var foo = 1;", " | ^", " 2 | var bar = 2;", - " 3 | ", + " 3 |", "\n", "1 error found." ].join("\n")); @@ -212,12 +212,12 @@ describe("formatter:codeframe", () => { "error: Missing semicolon (semi) at foo.js:1:14:", "> 1 | const foo = 1", " | ^", - " 2 | ", + " 2 |", "\n", "error: 'foo' is assigned a value but never used (no-unused-vars) at foo.js:1:7:", "> 1 | const foo = 1", " | ^", - " 2 | ", + " 2 |", "\n", "2 errors found." ].join("\n")); @@ -258,13 +258,13 @@ describe("formatter:codeframe", () => { assert.strictEqual(stripAnsi(result), [ "error: 'foo' is assigned a value but never used (no-unused-vars) at foo.js:4:11:", - " 2 | ", + " 2 |", " 3 | // a comment", "> 4 | const foo = 1;", " | ^", " 5 | }", - " 6 | ", - " 7 | ", + " 6 |", + " 7 |", "\n", "1 error found." ].join("\n")); @@ -305,12 +305,12 @@ describe("formatter:codeframe", () => { "error: Missing semicolon (semi) at foo.js:1:14:", "> 1 | const foo = 1", " | ^", - " 2 | ", + " 2 |", "\n", "error: Missing semicolon (semi) at bar.js:1:14:", "> 1 | const bar = 2", " | ^", - " 2 | ", + " 2 |", "\n", "2 errors found." ].join("\n")); @@ -341,7 +341,7 @@ describe("formatter:codeframe", () => { "error: Parsing error: Unexpected token { at foo.js:1:2:", "> 1 | e{}", " | ^", - " 2 | ", + " 2 |", "\n", "1 error found." ].join("\n")); From f61b97b405fc858c69cdf3854a7a66bca7883b98 Mon Sep 17 00:00:00 2001 From: Milos Djermanovic Date: Fri, 5 Feb 2021 03:06:27 +0100 Subject: [PATCH 2/2] pin 7.12.11 --- package.json | 2 +- tests/lib/cli-engine/formatters/codeframe.js | 22 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index eb1dfdaa768..f44e214811f 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "homepage": "https://eslint.org", "bugs": "https://github.com/eslint/eslint/issues/", "dependencies": { - "@babel/code-frame": "^7.12.13", + "@babel/code-frame": "7.12.11", "@eslint/eslintrc": "^0.3.0", "ajv": "^6.10.0", "chalk": "^4.0.0", diff --git a/tests/lib/cli-engine/formatters/codeframe.js b/tests/lib/cli-engine/formatters/codeframe.js index f2187312d3e..398d6b8c7af 100644 --- a/tests/lib/cli-engine/formatters/codeframe.js +++ b/tests/lib/cli-engine/formatters/codeframe.js @@ -86,7 +86,7 @@ describe("formatter:codeframe", () => { "> 1 | var foo = 1;", " | ^", " 2 | var bar = 2;", - " 3 |", + " 3 | ", "\n", "1 warning found." ].join("\n")); @@ -115,7 +115,7 @@ describe("formatter:codeframe", () => { "> 1 | var foo = 1;", " | ^", " 2 | var bar = 2;", - " 3 |", + " 3 | ", "\n", "1 warning found.", "1 warning potentially fixable with the `--fix` option." @@ -147,7 +147,7 @@ describe("formatter:codeframe", () => { "> 1 | var foo = 1;", " | ^", " 2 | var bar = 2;", - " 3 |", + " 3 | ", "\n", "1 error found." ].join("\n")); @@ -212,12 +212,12 @@ describe("formatter:codeframe", () => { "error: Missing semicolon (semi) at foo.js:1:14:", "> 1 | const foo = 1", " | ^", - " 2 |", + " 2 | ", "\n", "error: 'foo' is assigned a value but never used (no-unused-vars) at foo.js:1:7:", "> 1 | const foo = 1", " | ^", - " 2 |", + " 2 | ", "\n", "2 errors found." ].join("\n")); @@ -258,13 +258,13 @@ describe("formatter:codeframe", () => { assert.strictEqual(stripAnsi(result), [ "error: 'foo' is assigned a value but never used (no-unused-vars) at foo.js:4:11:", - " 2 |", + " 2 | ", " 3 | // a comment", "> 4 | const foo = 1;", " | ^", " 5 | }", - " 6 |", - " 7 |", + " 6 | ", + " 7 | ", "\n", "1 error found." ].join("\n")); @@ -305,12 +305,12 @@ describe("formatter:codeframe", () => { "error: Missing semicolon (semi) at foo.js:1:14:", "> 1 | const foo = 1", " | ^", - " 2 |", + " 2 | ", "\n", "error: Missing semicolon (semi) at bar.js:1:14:", "> 1 | const bar = 2", " | ^", - " 2 |", + " 2 | ", "\n", "2 errors found." ].join("\n")); @@ -341,7 +341,7 @@ describe("formatter:codeframe", () => { "error: Parsing error: Unexpected token { at foo.js:1:2:", "> 1 | e{}", " | ^", - " 2 |", + " 2 | ", "\n", "1 error found." ].join("\n"));