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

feat: recommends for FlatConfig #106

Closed

Conversation

coderaiser
Copy link

According to #105, would be great to also have recommends, similar to legacy ESLint config.

globals,
},
rules,
overrides,

Choose a reason for hiding this comment

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

but the flat config does not have overrides.

Copy link
Author

Choose a reason for hiding this comment

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

Can we use compat here? Or write overrides in a different way? As an array items, like FlatESLint suggests, for example.

The thing is auto detecting of module type this what blocking me from upgrade to FlatESlint, since I have both types supported and think that one place to set module type in package.json is enough (like in legacy ESLint config plugin version)

Copy link

Choose a reason for hiding this comment

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

well, I think we can add 2 more presets:

  • "recommended": detecting the "type" field in package.json, use recommended-script if it's commonjs/undefined; use recommended-module if it's module.
  • "mixed-esm-and-cjs"(a better name? 😏): exporting a flat configs like the eslintrc-style recommended.

Copy link
Author

Choose a reason for hiding this comment

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

Yes, it would be awesome!

@aladdin-add
Copy link

closing in favor of #111

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants