Skip to content

Chore: standardize whitespace (4 spaces, trim trailing) #38

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

Merged
merged 2 commits into from
Jan 29, 2023

Conversation

mikeseese
Copy link
Contributor

This is an optional PR that standardizes the whitespace in the repo.

  • Converts tabs to 4 spaces (given the existing setting in .vscode/settings.json)
  • Adds a setting to automatically trim trailing whitespace on save
  • Trims existing trailing whitespace
  • I saw some misaligned code in language-server/src/server.ts was aligned properly

Feel free to reject this one. This can cause quite a bit of merge conflicts, but it seems like this repo isn't active right now so it may be a good time to merge it. This was only 10 minutes of work so no hard feelings if you don't want to take it.

@Lucas7211
Copy link
Collaborator

Looks good, but I think you shouldn't be formatting package-lock.json, since it's automatically generated by npm and will just get reverted back next time it gets updated.

@mikeseese
Copy link
Contributor Author

mikeseese commented Jan 28, 2023

package-lock.json indentation mimics the indentation of package.json. I tested this with a simple setup in an empty directory:

  1. npm init
  2. Change indentation to tabs
  3. npm install uuid
  4. See package-lock.json has tabs
  5. Change indentation of package.json to 4 spaces
  6. npm install
  7. See package-lock.json has 4 spaces

With that said, you're right, package-lock.json is automatically generated, so I ran npm install in the root directory, in ./extension, and in ./language-server with Node v18.13.0 (latest LTS) and NPM v9.4.0 (latest version) and committed any changes to this branch as is with no post-formatting. The only change seemed to be in the root package-lock.json with the updated version and it seems some missing dev: true (probably due to an update of npm)

@Lucas7211 Lucas7211 merged commit dd79ec1 into Hazelight:master Jan 29, 2023
@mikeseese mikeseese deleted the chore/whitespace branch January 29, 2023 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants