-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## 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 the `GitInvoker` class. ### ESLint Configuration Updates: * Changed ESLint configuration to use recommended and strict type-checked settings, and replaced single quotes with double quotes for consistency. (`eslint.config.mjs`, [eslint.config.mjsL6-R354](diffhunk://#diff-9601a8f6c734c2001be34a2361f76946d19a39a709b5e8c624a2a5a0aade05f2L6-R354)) * Updated rules to enforce stricter linting, including rules such as `@typescript-eslint/explicit-function-return-type` and `@typescript-eslint/no-unused-expressions`. (`eslint.config.mjs`, [eslint.config.mjsL6-R354](diffhunk://#diff-9601a8f6c734c2001be34a2361f76946d19a39a709b5e8c624a2a5a0aade05f2L6-R354)) ### `package.json` Modifications: * Updated the lint script to target TypeScript files. (`package.json`, [package.jsonL17-R17](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L17-R17)) * Added the `http-status-codes` dependency. (`package.json`, [package.jsonR55](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R55)) ### Code Refactoring: * Improved error handling in `index.ts` by adding a catch block to exit with a failure code. (`src/task/index.ts`, [src/task/index.tsR9-R19](diffhunk://#diff-445f33c5199a2e71fde9062a5f8c6b5237e3230e83e8be8fcfbf06de48abd5abR9-R19)) * Refactored `GitInvoker` class to remove redundant methods and use more concise syntax. (`src/task/src/git/gitInvoker.ts`, [[1]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L7-R10) [[2]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L22-R25) [[3]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L37-L80) [[4]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L93-L124) [[5]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L142-R101) [[6]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L182-R113) [[7]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L206-R137) ## Testing ### Test Types - [X] Unit tests - [X] Manual tests ### Unit Test Coverage 100% --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
4bd567b
commit 7bfc023
Showing
71 changed files
with
3,110 additions
and
2,597 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
Oops, something went wrong.