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

fix(core): remove .eslintrc double extends update on move #6765

Merged

Conversation

meeroslav
Copy link
Contributor

Current Behavior

Both updateProjectRootFiles and updateEslintrcJson modify relative paths in the .eslintrc.json's extends, causing change to be applied twice.

Expected Behavior

Only updateProjectRootFiles should modify relative paths in the .eslintrc.json.

Related Issue(s)

Fixes #

@meeroslav meeroslav self-assigned this Aug 18, 2021
@vercel
Copy link

vercel bot commented Aug 18, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nrwl/nx-dev/8R4MHmdgKV3p8gLskkxjC6Sac98o
✅ Preview: Canceled

[Deployment for 5f55780 canceled]

@meeroslav meeroslav added scope: core core nx functionality scope: linter Issues related to Eslint support in Nx type: bug labels Aug 18, 2021
@@ -41,28 +23,14 @@ export function updateEslintrcJson(
schema: NormalizedSchema,
project: ProjectConfiguration
) {
tree['recordedChanges'];
Copy link
Collaborator

Choose a reason for hiding this comment

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

This doesn't seem necessary.

updateJson<PartialEsLintRcJson>(tree, eslintRcPath, (eslintRcJson) => {
if (typeof eslintRcJson.extends === 'string') {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I feel like we should keep it in here and take it out of updateRootProjectFIles since this is more specific.

And we don't need 2 places that both update the `eslintrc.json

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That was my initial take, but the other one is more generic. I would have to explicitly exclude it from root files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll move the logic here then

@FrozenPandaz FrozenPandaz enabled auto-merge (squash) August 20, 2021 06:17
@FrozenPandaz FrozenPandaz merged commit 3b2f0b6 into nrwl:master Aug 20, 2021
ManojBahuguna pushed a commit to ManojBahuguna/nx that referenced this pull request Sep 16, 2021
* fix(core): remove eslintrc double extends update on move

* fix(core): move eslintrc move logic back to eslint update
@meeroslav meeroslav deleted the fix/move-eslint-generator-double-path branch October 18, 2021 12:37
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
scope: core core nx functionality scope: linter Issues related to Eslint support in Nx type: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants