@eslint/create-config
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -16,3 +16,3 @@ /** | ||
const jsStyleGuides = [ | ||
{ message: "Airbnb: https://github.com/airbnb/javascript", name: "airbnb", value: { packageName: "eslint-config-airbnb", type: "eslintrc" } }, | ||
{ message: "Airbnb: https://github.com/airbnb/javascript", name: "airbnb", value: { packageName: "eslint-config-airbnb-base", type: "eslintrc" } }, | ||
{ message: "Standard: https://github.com/standard/standard", name: "standard", value: { packageName: "eslint-config-standard", type: "eslintrc" } }, | ||
@@ -116,2 +116,3 @@ { message: "XO: https://github.com/xojs/eslint-config-xo", name: "xo", value: { packageName: "eslint-config-xo", type: "eslintrc" } } | ||
if (answers.purpose === "style") { | ||
const choices = this.answers.language === "javascript" ? jsStyleGuides : tsStyleGuides; | ||
@@ -138,3 +139,12 @@ const styleguideAnswer = await enquirer.prompt({ | ||
this.result.configFilename = isESMModule ? "eslint.config.js" : "eslint.config.mjs"; | ||
this.answers.styleguide = typeof this.answers.styleguide === "string" | ||
? { packageName: this.answers.styleguide, type: "flat" } | ||
: this.answers.styleguide; | ||
// replaced `eslint-config-airbnb-base` with `eslint-config-airbnb`(for react supports) | ||
if (this.answers.styleguide?.packageName === "eslint-config-airbnb-base" && this.answers.framework === "react") { | ||
this.answers.styleguide.packageName = "eslint-config-airbnb"; | ||
this.answers.framework = "none"; | ||
} | ||
let importContent = ""; | ||
@@ -178,5 +188,3 @@ const helperContent = `import path from "path"; | ||
} else if (this.answers.purpose === "style") { | ||
const styleguide = typeof this.answers.styleguide === "string" | ||
? { packageName: this.answers.styleguide, type: "flat" } | ||
: this.answers.styleguide; | ||
const styleguide = this.answers.styleguide; | ||
@@ -183,0 +191,0 @@ this.result.devDependencies.push(styleguide.packageName); |
{ | ||
"name": "@eslint/create-config", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Utility to create ESLint config files.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
27083
548
1