Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: Don't override rules from user's config #761

Merged
merged 4 commits into from
Jul 23, 2024
Merged

fix: Don't override rules from user's config #761

merged 4 commits into from
Jul 23, 2024

Conversation

melusc
Copy link
Contributor

@melusc melusc commented Jul 20, 2024

If the user disables any of n/no-unsupported-features/* or otherwise overrides it in their config it will now keep that setting.

Fixes #598 and #760
Closes #672

@melusc
Copy link
Contributor Author

melusc commented Jul 20, 2024

I haven't looked into it, but I would imagine

config.baseConfig.rules['@typescript-eslint/indent'] = ['error', spaces, {SwitchCase: 1}];
and similar lines should also use ??= instead to respect the user's config. I can make a PR or include that in this PR if desired

@sindresorhus
Copy link
Member

I can make a PR or include that in this PR if desired

Would be great if you could include it in this PR :)

@melusc melusc changed the title fix: Don't override n/no-unsupported-features/* if already set in config fix: Don't override rules from user's config Jul 22, 2024
@melusc
Copy link
Contributor Author

melusc commented Jul 22, 2024

I have updated them all to use nullish coallescing assignments. I haven't added any more tests. I think if something changes that would undo this the test I already added should catch anything.

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

Successfully merging this pull request may close these issues.

nodeVersion: false doesn't disable the related rules
2 participants