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 accepted breaking do not merge deprecation 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

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 Dec 18, 2019
@mysticatea
Copy link
Member Author

@mysticatea mysticatea commented Dec 18, 2019

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

@mysticatea
Copy link
Member Author

@mysticatea mysticatea commented Dec 20, 2019

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 label Dec 23, 2019
Copy link
Member

@kaicataldo kaicataldo left a comment

LGTM, thank you!

@mysticatea mysticatea merged commit 1118fce into master Jan 7, 2020
11 checks passed
v7.0.0 automation moved this from Implemented, pending review to Done Jan 7, 2020
@mysticatea mysticatea deleted the rfc28-runtime-deprecation branch Jan 7, 2020
@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 issue 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 label Jul 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted archived due to age breaking core deprecation
Projects
No open projects
RFCs
  
Done
v7.0.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants