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

nx migrate doesn't respect configured indent_size #8928

Closed
jasongerbes opened this issue Feb 11, 2022 · 10 comments · Fixed by #27066
Closed

nx migrate doesn't respect configured indent_size #8928

jasongerbes opened this issue Feb 11, 2022 · 10 comments · Fixed by #27066
Assignees
Labels

Comments

@jasongerbes
Copy link
Contributor

jasongerbes commented Feb 11, 2022

Current Behavior

The nx migrate command doesn't respect the configured indent_size in .editorconfig or tabWidth in .prettierrc.

When running the nx migrate command, the tab spacing package.json is set to 2, regardless of configured tab spacing.

Expected Behavior

The nx migrate command should respect the configured tab spacing.

Steps to Reproduce

  1. Create an empty workspace with an older version of Nx.
  2. Set the indent_size in .editorconfig to 4.
  3. Run nx format:write to update the tab spacing of the workspace.
  4. Run nx migrate latest.
  5. Check package.json, notice that nx migrate has reverted the tab spacing to 2.

Failure Logs

N/A

Environment

Node : 16.13.2
OS   : darwin x64
npm  : 8.1.2

nx : 13.8.0
@nrwl/angular : undefined
@nrwl/cli : 13.8.0
@nrwl/cypress : undefined
@nrwl/detox : undefined
@nrwl/devkit : 13.8.1
@nrwl/eslint-plugin-nx : 13.8.0
@nrwl/express : undefined
@nrwl/jest : 13.8.0
@nrwl/js : 13.8.1
@nrwl/linter : 13.8.0
@nrwl/nest : undefined
@nrwl/next : undefined
@nrwl/node : undefined
@nrwl/nx-cloud : undefined
@nrwl/react : undefined
@nrwl/react-native : undefined
@nrwl/schematics : undefined
@nrwl/storybook : undefined
@nrwl/tao : 13.8.0
@nrwl/web : undefined
@nrwl/workspace : 13.8.0
typescript : 4.5.5
rxjs : 6.6.7
---------------------------------------
Community plugins:
@FrozenPandaz FrozenPandaz added the scope: core core nx functionality label Feb 14, 2022
@FrozenPandaz
Copy link
Collaborator

We should have prettier format the contents of the file before writing it to disk in nx migrate.

@jasongerbes
Copy link
Contributor Author

This is also an issue with the @nrwl/js:convert-to-swc command

@jasongerbes
Copy link
Contributor Author

@FrozenPandaz any chance this issue could be addressed? We are frequently migrating to the latest Nx version

@github-actions
Copy link

github-actions bot commented Nov 8, 2022

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@github-actions github-actions bot added the stale label Nov 8, 2022
@jasongerbes
Copy link
Contributor Author

We should have prettier format the contents of the file before writing it to disk in nx migrate.

Happy to create a PR for this if you could provide more context

@github-actions github-actions bot removed the stale label Nov 9, 2022
@FrozenPandaz FrozenPandaz added community This is a good first issue for contributing and removed community This is a good first issue for contributing labels Feb 28, 2023
@github-actions
Copy link

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@github-actions github-actions bot added the stale label Aug 28, 2023
@jasongerbes
Copy link
Contributor Author

This issue still exists in 16.7.4

@github-actions github-actions bot removed the stale label Aug 29, 2023
Copy link

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@github-actions github-actions bot added the stale label Feb 26, 2024
@jasongerbes-vista
Copy link

This is still an issue.

@github-actions github-actions bot removed the stale label Feb 27, 2024
FrozenPandaz pushed a commit that referenced this issue Jul 30, 2024
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #8928

(cherry picked from commit e9d9c9f)
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 Aug 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
5 participants