refactor: apply lint formatting to remaining commands#3667
Merged
Conversation
Applies automated lint formatting to remaining command files in preparation for migration to eslint 9. Changes include import ordering, class property ordering, object property ordering, and whitespace cleanup. Affected command groups: pipelines, ps, rake, redis, regions, releases, repl, reviewapps, run, sessions, spaces, status, teams, telemetry, usage, version, webhooks.
Add error handling tests for missing required parameters: - spaces:hosts without space name - spaces:peerings:destroy without pcxid - spaces:peerings without space name These tests cover previously untested error handling paths.
Adds 7 new test cases for the parse() function to increase code coverage from 35.48% to 100% for src/lib/config/quote.ts. New tests cover: - Double-quoted strings with newlines and escaped characters - Single-quoted strings with backslashes - Empty strings and simple unquoted strings - Error cases for multiple tokens and operator tokens
Ensures coverage reports include all source files, not just those that are tested. This provides a more accurate picture of overall code coverage.
Adds comprehensive unit tests for the Dyno class: - Constructor default values and option handling - _useSSH protocol detection (http/https vs other protocols) - _env environment variable building and TERM handling - _isDebug HEROKU_DEBUG environment variable checking - _status dyno status formatting with name and size - _readData exit code parsing and output handling Also updates colorize.unit.test.ts: - Uncomments existing tests that were previously disabled - Updates color code constants to match current 256-color ANSI codes - All 7 colorize test cases now pass These changes improve coverage for src/lib/run which previously had 38.68% coverage and dyno.ts which had no dedicated test file.
080d743 to
833d717
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR applies automated lint formatting to the remaining command files in preparation for migration to ESLint 9. Changes include import ordering, class property ordering, object property ordering, and whitespace cleanup.
Affected command groups: pipelines, ps, rake, redis, regions, releases, repl, reviewapps, run, sessions, spaces, status, teams, telemetry, usage, version, webhooks.
This is the final batch of linting changes, completing the formatting updates across all command files.
Type of Change
Breaking Changes (major semver update)
!after your change type to denote a change that breaks current behaviorFeature Additions (minor semver update)
Patch Updates (patch semver update)
Testing
Notes:
These are purely formatting changes with no behavioral modifications. Final batch in a series of PRs to break up linting changes in preparation for ESLint 9 migration.
Steps:
Related Issues
Part of a series of PRs to reduce what is implemented in #3661