From bda806d78ee46133587d9383baff52d796a594e5 Mon Sep 17 00:00:00 2001 From: Bryan Mishkin <698306+bmish@users.noreply.github.com> Date: Sun, 13 Nov 2022 19:15:00 -0500 Subject: [PATCH] feat: drop support for ESLint v6 (#5972) BREAKING CHANGE: drop support for ESLint v6 --- packages/eslint-plugin-tslint/package.json | 2 +- packages/eslint-plugin/package.json | 2 +- packages/experimental-utils/package.json | 2 +- packages/parser/package.json | 2 +- packages/type-utils/package.json | 2 +- packages/utils/package.json | 2 +- .../{eslint-v6 => eslint-v7}/.eslintrc.js | 0 .../{eslint-v6 => eslint-v7}/index.ts | 0 .../{eslint-v6 => eslint-v7}/package.json | 2 +- .../{eslint-v6 => eslint-v7}/tsconfig.json | 0 .../__snapshots__/eslint-v6.test.ts.snap | 28 ---------- .../__snapshots__/eslint-v7.test.ts.snap | 53 +++++++++++++++++++ .../{eslint-v6.test.ts => eslint-v7.test.ts} | 0 13 files changed, 60 insertions(+), 35 deletions(-) rename tests/integration/fixtures/{eslint-v6 => eslint-v7}/.eslintrc.js (100%) rename tests/integration/fixtures/{eslint-v6 => eslint-v7}/index.ts (100%) rename tests/integration/fixtures/{eslint-v6 => eslint-v7}/package.json (58%) rename tests/integration/fixtures/{eslint-v6 => eslint-v7}/tsconfig.json (100%) delete mode 100644 tests/integration/tests/__snapshots__/eslint-v6.test.ts.snap create mode 100644 tests/integration/tests/__snapshots__/eslint-v7.test.ts.snap rename tests/integration/tests/{eslint-v6.test.ts => eslint-v7.test.ts} (100%) diff --git a/packages/eslint-plugin-tslint/package.json b/packages/eslint-plugin-tslint/package.json index ee5a34b5856..494b4fc4292 100644 --- a/packages/eslint-plugin-tslint/package.json +++ b/packages/eslint-plugin-tslint/package.json @@ -42,7 +42,7 @@ "lodash": "^4.17.21" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0", + "eslint": "^7.0.0 || ^8.0.0", "tslint": "^5.0.0 || ^6.0.0", "typescript": "*" }, diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index d87ddb5fbf3..936313604e1 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -71,7 +71,7 @@ }, "peerDependencies": { "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { diff --git a/packages/experimental-utils/package.json b/packages/experimental-utils/package.json index b499e5a9230..0a55b72ffb4 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -41,7 +41,7 @@ "@typescript-eslint/utils": "5.44.0" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0" }, "devDependencies": { "typescript": "*" diff --git a/packages/parser/package.json b/packages/parser/package.json index b1057d25c73..0fde80b14c9 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -42,7 +42,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0" }, "dependencies": { "@typescript-eslint/scope-manager": "5.44.0", diff --git a/packages/type-utils/package.json b/packages/type-utils/package.json index ade9e169f9f..01e8306775d 100644 --- a/packages/type-utils/package.json +++ b/packages/type-utils/package.json @@ -49,7 +49,7 @@ "typescript": "*" }, "peerDependencies": { - "eslint": "*" + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { diff --git a/packages/utils/package.json b/packages/utils/package.json index 3133d8b5e29..683dddfe683 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -49,7 +49,7 @@ "semver": "^7.3.7" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0" }, "devDependencies": { "@typescript-eslint/parser": "5.44.0", diff --git a/tests/integration/fixtures/eslint-v6/.eslintrc.js b/tests/integration/fixtures/eslint-v7/.eslintrc.js similarity index 100% rename from tests/integration/fixtures/eslint-v6/.eslintrc.js rename to tests/integration/fixtures/eslint-v7/.eslintrc.js diff --git a/tests/integration/fixtures/eslint-v6/index.ts b/tests/integration/fixtures/eslint-v7/index.ts similarity index 100% rename from tests/integration/fixtures/eslint-v6/index.ts rename to tests/integration/fixtures/eslint-v7/index.ts diff --git a/tests/integration/fixtures/eslint-v6/package.json b/tests/integration/fixtures/eslint-v7/package.json similarity index 58% rename from tests/integration/fixtures/eslint-v6/package.json rename to tests/integration/fixtures/eslint-v7/package.json index 71c2f5590c5..d939ab3f81c 100644 --- a/tests/integration/fixtures/eslint-v6/package.json +++ b/tests/integration/fixtures/eslint-v7/package.json @@ -1,5 +1,5 @@ { "devDependencies": { - "eslint": "6.0.0" + "eslint": "7.0.0" } } diff --git a/tests/integration/fixtures/eslint-v6/tsconfig.json b/tests/integration/fixtures/eslint-v7/tsconfig.json similarity index 100% rename from tests/integration/fixtures/eslint-v6/tsconfig.json rename to tests/integration/fixtures/eslint-v7/tsconfig.json diff --git a/tests/integration/tests/__snapshots__/eslint-v6.test.ts.snap b/tests/integration/tests/__snapshots__/eslint-v6.test.ts.snap deleted file mode 100644 index 4bb27abfcc9..00000000000 --- a/tests/integration/tests/__snapshots__/eslint-v6.test.ts.snap +++ /dev/null @@ -1,28 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`eslint-v6 should lint successfully 1`] = ` -[ - { - "errorCount": 1, - "filePath": "/index.ts", - "fixableErrorCount": 0, - "fixableWarningCount": 0, - "messages": [ - { - "column": 15, - "endColumn": 18, - "endLine": 1, - "line": 1, - "message": "Unexpected any. Specify a different type.", - "messageId": "unexpectedAny", - "nodeType": "TSAnyKeyword", - "ruleId": "@typescript-eslint/no-explicit-any", - "severity": 2, - }, - ], - "source": "const noSemi: any = true; -", - "warningCount": 0, - }, -] -`; diff --git a/tests/integration/tests/__snapshots__/eslint-v7.test.ts.snap b/tests/integration/tests/__snapshots__/eslint-v7.test.ts.snap new file mode 100644 index 00000000000..eb23a06011e --- /dev/null +++ b/tests/integration/tests/__snapshots__/eslint-v7.test.ts.snap @@ -0,0 +1,53 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`eslint-v7 should lint successfully 1`] = ` +[ + { + "errorCount": 1, + "filePath": "/index.ts", + "fixableErrorCount": 0, + "fixableWarningCount": 0, + "messages": [ + { + "column": 15, + "endColumn": 18, + "endLine": 1, + "line": 1, + "message": "Unexpected any. Specify a different type.", + "messageId": "unexpectedAny", + "nodeType": "TSAnyKeyword", + "ruleId": "@typescript-eslint/no-explicit-any", + "severity": 2, + "suggestions": [ + { + "desc": "Use \`unknown\` instead, this will force you to explicitly, and safely assert the type is correct.", + "fix": { + "range": [ + 14, + 17, + ], + "text": "unknown", + }, + "messageId": "suggestUnknown", + }, + { + "desc": "Use \`never\` instead, this is useful when instantiating generic type parameters that you don't need to know the type of.", + "fix": { + "range": [ + 14, + 17, + ], + "text": "never", + }, + "messageId": "suggestNever", + }, + ], + }, + ], + "source": "const noSemi: any = true; +", + "usedDeprecatedRules": [], + "warningCount": 0, + }, +] +`; diff --git a/tests/integration/tests/eslint-v6.test.ts b/tests/integration/tests/eslint-v7.test.ts similarity index 100% rename from tests/integration/tests/eslint-v6.test.ts rename to tests/integration/tests/eslint-v7.test.ts