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

Breaking: runtime-deprecation on '~/.eslintrc' (refs eslint/rfcs#32) #12678

Merged
merged 14 commits into from Jan 7, 2020

Conversation

mysticatea
Copy link
Member

@mysticatea mysticatea commented Dec 17, 2019

Don't merge until we finished releasing the last one of 6.x.

What is the purpose of this pull request? (put an "X" next to item)

[X] Add something to the core

What changes did you make? (Give an overview)

This PR adds runtime-deprecation about personal config files (~/.eslintrc.*). This is a part of RFC32.

ESLint emits deprecation warnings when:

  • when ESLint loaded a personal config file.
  • when ESLint ignored a personal config file because of project config files that don't have root:true.

The warning messages are like:

(node:20312) [ESLINT_PERSONAL_CONFOG_LOAD] DeprecationWarning: The '~/.eslintrc.*' config file has been deprecated. Please use config files for each project or '--config' option. (found in "eslint\fixtures\config-hierarchy\personal-config\home-folder\.eslintrc.json")
(node:20312) [ESLINT_PERSONAL_CONFOG_SUPPRESS] DeprecationWarning: The '~/.eslintrc.*' config file has been deprecated. Please remove it or add 'root:true' into the config file of your projects in order to avoid loading '~/.eslintrc.*' accidentally. (found in "eslint\fixtures\config-hierarchy\personal-config\home-folder\.eslintrc.json")

Is there anything you'd like reviewers to focus on?

The warning messages are understandable?

@mysticatea mysticatea added core Relates to ESLint's core APIs and features accepted There is consensus among the team that this change meets the criteria for inclusion breaking This change is backwards-incompatible do not merge This pull request should not be merged yet deprecation This change deprecates an existing feature labels Dec 17, 2019
@mysticatea mysticatea added this to Implemented, pending review in v7.0.0 Dec 18, 2019
@mysticatea mysticatea added this to Implemented, pending review in RFCs Dec 18, 2019
Copy link
Member

@kaicataldo kaicataldo left a comment

Choose a reason for hiding this comment

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

Would it be useful to add some tests around this change?

lib/cli-engine/cascading-config-array-factory.js Outdated Show resolved Hide resolved
lib/cli-engine/cascading-config-array-factory.js Outdated Show resolved Hide resolved
lib/shared/deprecation-warnings.js Outdated Show resolved Hide resolved
lib/shared/deprecation-warnings.js Outdated Show resolved Hide resolved
lib/shared/deprecation-warnings.js Outdated Show resolved Hide resolved
lib/shared/deprecation-warnings.js Outdated Show resolved Hide resolved
lib/shared/deprecation-warnings.js Outdated Show resolved Hide resolved
lib/shared/deprecation-warnings.js Outdated Show resolved Hide resolved
lib/shared/deprecation-warnings.js Outdated Show resolved Hide resolved
mysticatea and others added 9 commits December 18, 2019 14:12
@mysticatea
Copy link
Member Author

Thank you for your review. I have updated this PR.

@mysticatea
Copy link
Member Author

I added some tests. It clarifies that ESLint raises new deprecation warnings only when the cases that ESLint change the behavior after the personal config file feature were removed.

@kaicataldo kaicataldo removed the do not merge This pull request should not be merged yet label Dec 23, 2019
Copy link
Member

@kaicataldo kaicataldo left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@mysticatea mysticatea merged commit 1118fce into master Jan 7, 2020
v7.0.0 automation moved this from Implemented, pending review to Done Jan 7, 2020
@mysticatea mysticatea deleted the rfc28-runtime-deprecation branch January 7, 2020 11:11
@mysticatea mysticatea moved this from Implemented, pending review to Done in RFCs Jan 7, 2020
hail2u added a commit to hail2u/hail2u.net that referenced this pull request Apr 13, 2020
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Jul 7, 2020
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Jul 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion breaking This change is backwards-incompatible core Relates to ESLint's core APIs and features deprecation This change deprecates an existing feature
Projects
No open projects
RFCs
  
Done
v7.0.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants