-
Notifications
You must be signed in to change notification settings - Fork 12
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
L✔ ◾ Enhancing linting #537
Merged
Merged
Conversation
This file contains 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
Contributor
PR Metrics❌ Try to keep pull requests smaller than 400 lines of new product code by following the Single Responsibility Principle (SRP).
Metrics computed by PR Metrics. Add it to your Azure DevOps and GitHub PRs! |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
K-Cully
approved these changes
Sep 6, 2024
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 change adds additional linting rules, to create a more prescriptive and less ad hoc design. This is designed to help facilitate external contributions to maintain the existing style.
These changes have been automatically or manually applied but are typically fairly mechanical. Therefore, there should be little risk of regression.
Detailed Summary
This includes several changes to improve code quality, update dependencies, and enhance error handling. The most important changes include updating the ESLint configuration, modifying the
package.json
file, and refactoring theGitInvoker
class.ESLint Configuration Updates:
eslint.config.mjs
, eslint.config.mjsL6-R354)@typescript-eslint/explicit-function-return-type
and@typescript-eslint/no-unused-expressions
. (eslint.config.mjs
, eslint.config.mjsL6-R354)package.json
Modifications:package.json
, package.jsonL17-R17)http-status-codes
dependency. (package.json
, package.jsonR55)Code Refactoring:
index.ts
by adding a catch block to exit with a failure code. (src/task/index.ts
, src/task/index.tsR9-R19)GitInvoker
class to remove redundant methods and use more concise syntax. (src/task/src/git/gitInvoker.ts
, [1] [2] [3] [4] [5] [6] [7]Testing
Test Types
Unit Test Coverage
100%