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

Update: Config File Improvements #13

Closed
wants to merge 39 commits into from
Closed

Conversation

mysticatea
Copy link
Member

@mysticatea mysticatea commented Feb 24, 2019

Link to Rendered RFC (core proposal)

Summary

This proposal improves our configuration files. This changes the architecture of configuration files to maintain our codebase easier and make enhancing easier.

This RFC fixes two bugs I found while I make a PoC. I guess we don't want to make surprised behaviors on purpose.

  • (link) Even if unused dependencies have some errors, ESLint doesn't throw it. (fixes eslint/eslint#11396)
  • (link) The configuration of overrides in shareable configs no longer overwrites user settings in .eslintrc files. (see details)

This RFC includes four enhancements.

I made the enhancements in my PoC in order to confirm this architecture change is effective to maintain our codebase easier and make enhancing easier. Therefore, the enhancements are not required for this proposal.

However, I'd like to add the enhancements with this because those will solve some important pain of the ecosystem.

Related Issues

@mysticatea mysticatea added enhancement New feature or request Initial Commenting This RFC is in the initial feedback stage labels Feb 24, 2019
Copy link
Member

@not-an-aardvark not-an-aardvark left a comment

Choose a reason for hiding this comment

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

Thanks for working on this!

I'm definitely in favor of refactoring the config logic. I left a few questions about what changes are user-facing.

designs/2019-eslintrc-improvements/README.md Outdated Show resolved Hide resolved
designs/2019-eslintrc-improvements/README.md Outdated Show resolved Hide resolved
designs/2019-eslintrc-improvements/README.md Outdated Show resolved Hide resolved
designs/2019-eslintrc-improvements/README.md Show resolved Hide resolved
designs/2019-eslintrc-improvements/README.md Show resolved Hide resolved
@mysticatea
Copy link
Member Author

I updated this RFC.

  • I made user-facing changes readable.
  • I added how Linter object works with ConfigArray.
  • I changed about plugin conflict error.

@mysticatea
Copy link
Member Author

I updated this RFC about the plugin resolution change.

@mysticatea
Copy link
Member Author

mysticatea commented Mar 8, 2019

I separated the enhancement part from the core proposal because the mix of simplification and enhancement proposals is not readable.

Name Description
Core Proposal The architecture change about configuration files
Additional Lint Targets overrides property and plugins which have file extension processors add linting target files automatically to eslint command with directory paths.
Plugin Resolution Change Plugins are resolved relative to the config file which includes it.
Array Config Config files allow an array.
extends in overrides The configurations in overrides allow extends property and nested overrides property.
Plugin Renaming plugins property allows an object to rename plugins and name local plugins.

Copy link
Member

@not-an-aardvark not-an-aardvark left a comment

Choose a reason for hiding this comment

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

Thanks for separating the proposal into different parts -- that definitely makes it easier to review.

@mysticatea
Copy link
Member Author

mysticatea commented Mar 13, 2019

I removed an additional enhancement proposal "Plugin Resolution Change" from this RFC. This RFC now doesn't change plugin resolution way.

The important pain that "Plugin Resolution Change" tried to solve is solved by Plugin Renaming proposal without any breaking change.

@mysticatea
Copy link
Member Author

Thank you to be interested in this RFC.

You can install eslint of this RFC version with:

npm install eslint/eslint#rfc13-trial

Then you can use it as same as normal ESLint.

@mysticatea
Copy link
Member Author

I'm closing this RFC as be separated to #14, #20, and #21.

@mysticatea mysticatea closed this May 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Initial Commenting This RFC is in the initial feedback stage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Eslint keeps requiring overridden parsers when extending config
2 participants