Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update: Drop @typescript-eslint/eslint-recommended from `eslint --ini…
…t` (#13340)

`@typescript-eslint/recommended` now extends from `@typescript-eslint/eslint-recommended`:
https://github.com/typescript-eslint/typescript-eslint/releases/tag/v3.0.0
  • Loading branch information
NMinhNguyen committed Jun 11, 2020
1 parent 796f269 commit 6cfbd03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion lib/init/config-initializer.js
Expand Up @@ -321,7 +321,6 @@ function processAnswers(answers) {
}
}
if (answers.typescript && config.extends.includes("eslint:recommended")) {
config.extends.push("plugin:@typescript-eslint/eslint-recommended");
config.extends.push("plugin:@typescript-eslint/recommended");
}

Expand Down
4 changes: 2 additions & 2 deletions tests/lib/init/config-initializer.js
Expand Up @@ -174,15 +174,15 @@ describe("configInitializer", () => {

assert.strictEqual(config.parser, "@typescript-eslint/parser");
assert.deepStrictEqual(config.plugins, ["@typescript-eslint"]);
assert.deepStrictEqual(config.extends, ["eslint:recommended", "plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended"]);
assert.deepStrictEqual(config.extends, ["eslint:recommended", "plugin:@typescript-eslint/recommended"]);
});

it("should enable typescript parser and plugin with vue", () => {
answers.framework = "vue";
answers.typescript = true;
const config = init.processAnswers(answers);

assert.deepStrictEqual(config.extends, ["eslint:recommended", "plugin:vue/essential", "plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended"]);
assert.deepStrictEqual(config.extends, ["eslint:recommended", "plugin:vue/essential", "plugin:@typescript-eslint/recommended"]);
assert.strictEqual(config.parserOptions.parser, "@typescript-eslint/parser");
assert.deepStrictEqual(config.plugins, ["vue", "@typescript-eslint"]);
});
Expand Down

0 comments on commit 6cfbd03

Please sign in to comment.