Closed muiriswoulfe closed 2 months ago
❌ Try to keep pull requests smaller than 400 lines of new product code by following the Single Responsibility Principle (SRP). ✔ Thanks for adding tests. | Lines | |
---|---|---|
Product Code | 1,033 | |
Test Code | 1,978 | |
Subtotal | 3,011 | |
Ignored Code | 9 | |
Total | 3,020 |
Metrics computed by PR Metrics. Add it to your Azure DevOps and GitHub PRs!
/AzurePipelines run
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%