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

Move generator overrides projects in the parserOptions with base tsconfig file #10774

Closed
jackmorrison12 opened this issue Jun 16, 2022 · 1 comment · Fixed by #10775
Closed

Comments

@jackmorrison12
Copy link
Contributor

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

We want the storybook config file to also be moved, so eslintrc.json would look like this:

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

Steps to Reproduce

Simply move any library using the generator specified above which has multiple projects in the parserOptions.projects array. This is trivial if you've set up storybook, since the second project is added by default.

Failure Logs

n/a

Environment

  Node : 17.4.0
  OS   : darwin x64
  npm  : 8.3.1
  
  nx : 12.10.1
  @nrwl/angular : Not Found
  @nrwl/cli : 12.10.1
  @nrwl/cypress : 12.10.1
  @nrwl/devkit : 12.10.1
  @nrwl/eslint-plugin-nx : 12.10.1
  @nrwl/express : Not Found
  @nrwl/jest : 12.10.1
  @nrwl/linter : 12.10.1
  @nrwl/nest : Not Found
  @nrwl/next : Not Found
  @nrwl/node : 12.10.1
  @nrwl/nx-cloud : Not Found
  @nrwl/react : 12.10.1
  @nrwl/schematics : Not Found
  @nrwl/tao : 12.10.1
  @nrwl/web : 12.10.1
  @nrwl/workspace : 12.10.1
  @nrwl/storybook : 12.10.1
  @nrwl/gatsby : Not Found
  typescript : 4.4.4
jackmorrison12 added a commit to jackmorrison12/nx that referenced this issue Jun 16, 2022
…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
@AgentEnder AgentEnder added the scope: misc Misc issues label Jun 16, 2022
AgentEnder pushed a commit that referenced this issue Jun 16, 2022
…parserOptions override (#10775)

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
@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants