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: add config "flat/all" #401

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

feat: add config "flat/all" #401

wants to merge 1 commit into from

Conversation

aladdin-add
Copy link

@aladdin-add aladdin-add commented Dec 23, 2024

open questions:

  1. need to add an equivalent eslintrc config?
    2. need to add language options?

fixes #400

@@ -17,7 +17,7 @@ module.exports = {
type: "suggestion",
docs: {
description: "disallow the use of `process.exit()`",
recommended: false,
recommended: true,
Copy link
Author

Choose a reason for hiding this comment

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

seems it's a bug: it was false, but was enabled in the recommended config

@aladdin-add aladdin-add force-pushed the feat/all-config branch 3 times, most recently from 6acee02 to 1d59eae Compare December 23, 2024 09:49
const rule = rules[ruleName]

// only add rules that are not deprecated
if (rule?.meta?.deprecated !== true) {
Copy link
Author

Choose a reason for hiding this comment

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

the ?. is only to make tsc happy. 😂

Copy link

@SimonSchick SimonSchick Dec 23, 2024

Choose a reason for hiding this comment

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

You can try using Object.entries instead which removes the need for the look and makes the compiler happy.

eg. for(const [ruleName, rule] of Object.entries(rules) { ... }

Copy link
Author

Choose a reason for hiding this comment

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

good call!👍

@aladdin-add aladdin-add force-pushed the feat/all-config branch 3 times, most recently from 164bb72 to cb4be05 Compare December 24, 2024 03:01
@aladdin-add aladdin-add marked this pull request as ready for review December 24, 2024 03:12
@aladdin-add aladdin-add requested a review from a team December 24, 2024 03:13
open questions:

1. need to add an equivalent eslintrc config?

fixes #400
Copy link
Member

@voxpelli voxpelli left a comment

Choose a reason for hiding this comment

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

I don't think this is a good idea #400 (comment)

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.

Change Request: Consider exporting config with all rules enabled
3 participants