Skip to content

Commit

Permalink
fix: Don't extend from removed ESLint configs (#1397)
Browse files Browse the repository at this point in the history
Since version `8.0.0` of `eslint-config-prettier`,
all configs have merged into `prettier` and
supplying the extraneous configs results in error
  • Loading branch information
hyperupcall authored Mar 1, 2022
1 parent 2ddcffa commit a89a2c1
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { createEmptyConfigConversionResults } from "../configConversionResults.s
import { ESLintRuleOptions } from "../rules/types";
import { reportConfigConversionResults } from "./reportConfigConversionResults";

const basicExtends = ["prettier", "prettier/@typescript-eslint"];
const basicExtends = ["prettier"];

describe("reportConfigConversionResults", () => {
it("logs a successful conversion without notices when there is one converted rule without notices", async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ const builtInExtensions = new Map([

const pluginExtensions = new Map([
["eslint-plugin-prettier", "node_modules/eslint-config-prettier/index.js"],
[
"eslint-plugin-prettier/@typescript-eslint",
"node_modules/eslint-config-prettier/@typescript-eslint.js",
],
[
"plugin:@typescript-eslint/all",
"node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe("summarizePackageRules", () => {
expect(summarizedResults).toEqual({
...ruleConversionResults,
converted: new Map(),
extends: ["prettier", "prettier/@typescript-eslint"],
extends: ["prettier"],
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const summarizePackageRules = async (

// 3a. If no output rules conflict with `eslint-config-prettier`, it's added in
if (dependencies.checkPrettierExtension(ruleConversionResults, prettierRequested)) {
allExtensions.push("prettier", "prettier/@typescript-eslint");
allExtensions.push("prettier");
}

if (allExtensions.length === 0) {
Expand Down

0 comments on commit a89a2c1

Please sign in to comment.