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): update move generator to move multiple projects in eslint parserOptions override #10775

Merged
merged 1 commit into from
Jun 16, 2022

Conversation

jackmorrison12
Copy link
Contributor

move generator now copies over all projects in the parserOptions of the .eslintrc.json rather than
just overriding with the base tsconfigs

ISSUES CLOSED: #10774

Current Behavior

To move an existing library, we run the following

nx g @nrwl/workspace:move --project my-feature-lib shared/my-feature-lib

In our case, the move does not keep the storybook config file in .eslintrc.json after the move. This is under overrides > parserOptions > projects. It overrides it with just the base tsconfigs.

Before the move, the eslintrc.json looks like like this:

...
"parserOptions": {
  "project": [
    "libs/my-feature-lib/tsconfig.*?.json",
    "libs/my-feature-lib/.storybook/tsconfig.json"
  ]
}
...

When you run the move command, the new eslintrc.json will look like this:

...
"parserOptions": {
  "project": [
    "libs/shared/my-feature-lib/tsconfig.*?.json",
  ]
}
...

Expected Behavior

The generator now copies all projects from the existing array, and updates the project root to the new path, no longer dropping any config files. This results in the following output in .eslintrc.json

...
"parserOptions": {
  "project": [
    "libs/shared/my-feature-lib/tsconfig.*?.json",
    "libs/shared/my-feature-lib/.storybook/tsconfig.json"
  ]
}
...

Related Issue(s)

Fixes #10774

…parserOptions override

move generator now copies over all projects in the parserOptions of the .eslintrc.json rather than
just overriding with the base tsconfigs

ISSUES CLOSED: nrwl#10774
@nx-cloud
Copy link

nx-cloud bot commented Jun 16, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit a36ee2f. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 12 targets

Sent with 💌 from NxCloud.

@vercel
Copy link

vercel bot commented Jun 16, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
nx-dev ✅ Ready (Inspect) Visit Preview Jun 16, 2022 at 2:07PM (UTC)

@jackmorrison12
Copy link
Contributor Author

Thanks for the approval @AgentEnder

CI has passed now, can this be merged please? Thanks!

@AgentEnder AgentEnder merged commit a0f5b7c into nrwl:master Jun 16, 2022
@jackmorrison12 jackmorrison12 deleted the move-generator-eslint branch June 16, 2022 15:57
@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 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move generator overrides projects in the parserOptions with base tsconfig file
2 participants