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

Add overrides option to config (#3128) #5521

Merged
merged 4 commits into from Sep 13, 2021
Merged

Add overrides option to config (#3128) #5521

merged 4 commits into from Sep 13, 2021

Conversation

hudochenkov
Copy link
Member

Which issue, if any, is this issue related to?

Closes #3128.

Is there anything in the PR that needs further explanation?

It took quite some time to figure out how config resolutions works. Codebase is very tangled in my opinion :(

For every linted file we produce new config from initial config. All overrides are resolved and applied on a config and file gets normal config with no overrides property.

I took overrides docs from ESLint documentation with some modifications.

Interesting thing that all properties that regular config support, are supported by overrides. So when we #5142 is done, all options would be working automatically for overrides.

Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

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

@hudochenkov This is amazing, thank you!

The code and tests look good to me.

I've suggested some minor tweaks to the documentation and error message wording.

Many thanks again! This is an exciting addition that gets us closer to 14.0.0.

docs/user-guide/configure.md Outdated Show resolved Hide resolved
docs/user-guide/configure.md Outdated Show resolved Hide resolved
docs/user-guide/configure.md Outdated Show resolved Hide resolved
lib/augmentConfig.js Outdated Show resolved Hide resolved
lib/augmentConfig.js Outdated Show resolved Hide resolved
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

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

Fantastic, thanks!

@ybiquitous ybiquitous linked an issue Sep 13, 2021 that may be closed by this pull request
Copy link
Member

@ybiquitous ybiquitous left a comment

Choose a reason for hiding this comment

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

@hudochenkov Thanks, this is awesome work! 😄
I've left some comments, but I think this PR is mostly fine!

lib/augmentConfig.js Outdated Show resolved Hide resolved
lib/augmentConfig.js Outdated Show resolved Hide resolved
lib/augmentConfig.js Outdated Show resolved Hide resolved
lib/augmentConfig.js Show resolved Hide resolved
Copy link
Member

@ybiquitous ybiquitous left a comment

Choose a reason for hiding this comment

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

@hudochenkov Thank you! LGTM! 👏🏼

@jeddy3 jeddy3 merged commit 725edf5 into v14 Sep 13, 2021
@jeddy3 jeddy3 deleted the add-overrides branch September 13, 2021 11:45
@jeddy3
Copy link
Member

jeddy3 commented Sep 13, 2021

v14 changelog:

  • Added: overrides property to configuration object (#5521).

@jeddy3
Copy link
Member

jeddy3 commented Sep 13, 2021

Codebase is very tangled in my opinion :(

I'll create an issue so that we can discuss what can we do about this.

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

Successfully merging this pull request may close these issues.

Add overrides property to configuration object
3 participants