Skip to content
Permalink
Browse files
New: Include XO style guide in eslint --init (#14193)
  • Loading branch information
fregante committed Apr 29, 2021
1 parent 8a77b66 commit 0b6a3f31e6e78825114f82d4e0aed9cd72f784ac
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
@@ -531,7 +531,8 @@ function promptUser() {
choices: [
{ message: "Airbnb: https://github.com/airbnb/javascript", name: "airbnb" },
{ message: "Standard: https://github.com/standard/standard", name: "standard" },
{ message: "Google: https://github.com/google/eslint-config-google", name: "google" }
{ message: "Google: https://github.com/google/eslint-config-google", name: "google" },
{ message: "XO: https://github.com/xojs/eslint-config-xo", name: "xo" }
],
skip() {
this.state.answers.packageJsonExists = npmUtils.checkPackageJson();
@@ -240,6 +240,14 @@ describe("configInitializer", () => {
assert.include(modules, "eslint-config-standard@latest");
});

it("should support the xo style guide", () => {
const config = { extends: "xo" };
const modules = init.getModulesList(config);

assert.deepStrictEqual(config, { extends: "xo", installedESLint: true });
assert.include(modules, "eslint-config-xo@latest");
});

it("should install required sharable config", () => {
const config = { extends: "google" };

0 comments on commit 0b6a3f3

Please sign in to comment.