Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use eslint-config-airbnb-base by default #92

Merged
merged 1 commit into from
Apr 10, 2024
Merged

Conversation

aladdin-add
Copy link
Member

eslint-congif-airbnb is only used for react.
fixes #87

@eslint-github-bot eslint-github-bot bot added the bug Something isn't working label Apr 10, 2024
@aladdin-add aladdin-add force-pushed the issue87 branch 3 times, most recently from 3b787bc to b49f7ba Compare April 10, 2024 12:27
eslint-congif-airbnb is only used for react.
fixes #87
@@ -133,6 +134,15 @@ export class ConfigGenerator {
const isESMModule = isPackageTypeModule(this.packageJsonPath);

this.result.configFilename = isESMModule ? "eslint.config.js" : "eslint.config.mjs";
this.answers.styleguide = typeof this.answers.styleguide === "string"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In which cases this.answers.styleguide can be a string value?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More for the future: none of the style guides in the list now support flat configs, so you have to use:

"styleguide": { "packageName": "eslint-config-airbnb", "type": "eslintrc"}

But when a certain support is available it can be written as:

 "styleguide": "eslint-config-airbnb"

Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! I can confirm that this matches the previous (v0.4.6) behavior in terms of which configuration combinations are used for which combinations of answers.

@mdjermanovic mdjermanovic merged commit 627306a into main Apr 10, 2024
10 checks passed
@mdjermanovic mdjermanovic deleted the issue87 branch April 10, 2024 13:25
@github-actions github-actions bot mentioned this pull request Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: @eslint/config init installs wrong dependencies
2 participants