-
-
Notifications
You must be signed in to change notification settings - Fork 519
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(linter): inherit rules
via the extended config files
#9308
Open
camchenry
wants to merge
1
commit into
02-18-feat_linter_add_support_for_extends_property_in_oxlintrc
Choose a base branch
from
02-23-feat_linter_inherit_rules_via_the_extended_config_files
base: 02-18-feat_linter_add_support_for_extends_property_in_oxlintrc
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Feb 23, 2025
971831f
to
789e166
Compare
7f3a3de
to
c92ba6c
Compare
789e166
to
fd06c26
Compare
CodSpeed Performance ReportMerging #9308 will create unknown performance changesComparing Summary
Benchmarks breakdown
|
3e96436
to
dd36f3c
Compare
c92ba6c
to
dfdbb48
Compare
dd36f3c
to
4cfdc59
Compare
This was referenced Mar 1, 2025
Sysix
approved these changes
Mar 2, 2025
dfdbb48
to
7cab29f
Compare
4cfdc59
to
63b413f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-cli
Area - CLI
A-editor
Area - Editor and Language Server
A-linter
Area - Linter
C-enhancement
Category - New feature or request
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
extends
keyword #9307This gives the
extends
keyword some functionality: specifically to allow inheriting rules from other configuration files. Rules that are in the extended configuration will be used as the base, and then files in the config doing the extending will override the extended rules.So, you can, for example, specify a base configuration that defines rules that you generally want to be enabled. Then, in each nested configuration file, you could disable rules depending on the directory:
As a side effect of this, building a config from a
.oxlintrc.json
file can result in config errors, even if all of the syntax and rules are configured correctly, because an extended configuration file might be incorrect or unparseable. For now, we simply raise an error if this occurs and stop execution, but in the future we could make this more graceful if we wanted and just ignore that file.We will also need to revisit performance here, as I think a global cache config might be necessary so that we never load a file more than once and parse it more than once.