Add CI Workflow and Code Formatting #1
Merged
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.
This pull request introduces automated formatting and linting workflows, adds configuration files for code style enforcement, and refactors code for improved readability and consistency. The most significant changes are the addition of a GitHub Actions workflow for testing and formatting, integration of Prettier, Husky, and lint-staged for code style enforcement, and updates to scripts and dependencies in
package.json. There are also minor code style and formatting improvements throughout the codebase.Automation and CI/CD:
.github/workflows/test.ymlto automate testing, formatting checks, type checking, and build steps using GitHub Actions for pull requests and pushes to main/master branches.Code Style Enforcement:
.prettierrc.jsonfor Prettier configuration,.husky/pre-commitfor pre-commit hooks, and updatedpackage.jsonto include Prettier, Husky, and lint-staged dependencies and scripts, ensuring consistent code formatting and style checks before commits. [1] [2] [3] [4] [5] [6] [7]Codebase Formatting and Readability:
src/commands/config.ts,src/commands/credit-usage.ts,src/index.ts, and various utility files. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]Dependency Management:
pnpm-lock.yamlto reflect new and updated dependencies for Prettier and related tools. [1] [2] [3]Minor Cleanups:
src/commands/scrape.ts,src/types/scrape.ts,src/utils/client.ts,src/utils/config.ts,src/utils/credentials.ts,src/utils/options.ts,src/utils/output.ts,src/utils/url.ts). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]