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

[Sweep Rules] Fix hard-coded value in package.json #57

Closed
wants to merge 2 commits into from

Conversation

sweep-ai[bot]
Copy link
Contributor

@sweep-ai sweep-ai bot commented Jan 12, 2024

PR Feedback (click)

  • 👍 Sweep Did Well
  • 👎 Sweep Needs Improvement

I created this PR to address this rule:

"There should be no hard-coded values or magic numbers in the code."

Description

This PR fixes the issue of a hard-coded value in the "package.json" file. The hard-coded value is for the "prettier" dependency. Instead of using a hard-coded value, a constant is introduced to make the code more maintainable and flexible.

Summary of Changes

  • Created a new file "src/constants.ts" to define the constant for the "prettier" version.
  • Modified the "package.json" file to use the constant instead of the hard-coded value.

Please review and merge this PR to resolve the issue.

Copy link

changeset-bot bot commented Jan 12, 2024

⚠️ No Changeset found

Latest commit: f6dcd88

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor Author

sweep-ai bot commented Jan 12, 2024

Apply Sweep Rules to your PR?

  • Apply: All docstrings and comments should be up to date.
  • Apply: Code should be properly formatted and indented.
  • Apply: Variable and function names should be descriptive and follow a consistent naming convention.
  • Apply: There should be no unused imports or variables.
  • Apply: Code should be free of unnecessary comments and commented-out code.
  • Apply: There should be no hard-coded values or magic numbers in the code.

This is an automated message generated by Sweep AI.

Copy link
Contributor Author

sweep-ai bot commented Jan 12, 2024

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

[Sweep GHA Fix] The GitHub Actions run failed with the following error logs:

The command:
Run bun install
yielded the following error:
##[error]Process completed with exit code 1.
##[group]Run bun install
�[36;1mbun install�[0m
shell: /usr/bin/bash -e {0}
##[endgroup]
bun install v1.0.22 (b400b36c)
55 |     "prettier": PRETTIER_VERSION,
                     ^
error: Unexpected PRETTIER_VERSION
    at /home/runner/work/cspell-tool/cspell-tool/package.json:55:17
ParserError parsing package.json in "/home/runner/work/cspell-tool/cspell-tool/"
##[error]Process completed with exit code 1.

Here are the logs:
bun install v1.0.22 (b400b36c)
55 |     "prettier": PRETTIER_VERSION,
^
error: Unexpected PRETTIER_VERSION
at /home/runner/work/cspell-tool/cspell-tool/package.json:55:17
ParserError parsing package.json in "/home/runner/work/cspell-tool/cspell-tool/"

Created Pull Request: #58

Copy link
Contributor Author

sweep-ai bot commented Jan 12, 2024

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

[Sweep GHA Fix] The GitHub Actions run failed with the following error logs:

The command:
Run bun install
yielded the following error:
##[error]Process completed with exit code 1.
##[group]Run bun install
�[36;1mbun install�[0m
shell: /usr/bin/bash -e {0}
##[endgroup]
bun install v1.0.22 (b400b36c)
55 |     "prettier": PRETTIER_VERSION,
                     ^
error: Unexpected PRETTIER_VERSION
    at /home/runner/work/cspell-tool/cspell-tool/package.json:55:17
ParserError parsing package.json in "/home/runner/work/cspell-tool/cspell-tool/"
##[error]Process completed with exit code 1.

Here are the logs:
bun install v1.0.22 (b400b36c)
55 |     "prettier": PRETTIER_VERSION,
^
error: Unexpected PRETTIER_VERSION
at /home/runner/work/cspell-tool/cspell-tool/package.json:55:17
ParserError parsing package.json in "/home/runner/work/cspell-tool/cspell-tool/"

[!CAUTION]

An error has occurred: Cmd('git') failed due to: exit code(128)
cmdline: git clone -v --branch=sweep/fix-hard-coded-value -- https://:@github.com/jellydn/cspell-tool.git /tmp/cache/repos/jellydn/cspell-tool/base/sweep--fix-hard-coded-value
stderr: 'fatal: destination path '/tmp/cache/repos/jellydn/cspell-tool/base/sweep--fix-hard-coded-value' already exists and is not an empty directory.
' (tracking ID: 78d4f8411b)

@jellydn jellydn closed this Jan 15, 2024
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.

1 participant