Skip to content

feat: integrate eslint - #41

Merged
b-garbacz merged 3 commits into
mainfrom
40-integrate-eslint-for-trac-crypto-api-and-implement-github-actions-workflow
Apr 28, 2026
Merged

b-garbacz merged 3 commits into
mainfrom
40-integrate-eslint-for-trac-crypto-api-and-implement-github-actions-workflow

Conversation

@b-garbacz

@b-garbacz b-garbacz commented Apr 15, 2026 •

Copy link
Copy Markdown
Contributor

This pull request introduces a new ESLint configuration to the project, adds linting scripts, and updates dependencies accordingly. It also makes several small improvements to error handling and code style in both the source and test files, mainly by simplifying catch blocks and improving error reporting.

Linting and Configuration:

  • Added a new eslint.config.mjs file with a comprehensive ESLint configuration, including rules for both source and test files, and support for browser, Node.js, and Jest globals.
  • Added ESLint and related dependencies (eslint, @eslint/js, globals) to package.json and test/browser/package-lock.json. [1] [2] [3] [4] [5] [6] [7]
  • Introduced new npm scripts for linting (lint and lint:fix) and updated the CI workflow to include linting in ci:full.

Error Handling and Code Style Improvements:

  • Standardized catch blocks in multiple files and tests by removing unused error variables, simplifying error handling, and improving error reporting. [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • Improved error construction in modules/address.js by using the cause property for better error chaining.

Minor Test and Code Cleanups:

  • Removed unused imports and variables in test files for clarity. [1] [2]

These changes collectively improve code quality, consistency, and maintainability by enforcing linting standards and simplifying error handling.

@github-actions

github-actions Bot commented Apr 15, 2026 •

Copy link
Copy Markdown

Coverage

Metric Coverage Covered/Total
Lines 89.84% 1035/1152
Statements 89.84% 1035/1152
Functions 92.59% 50/54
Branches 80.1% 153/191

@b-garbacz

Copy link
Copy Markdown
Contributor Author

@lucasfernandes #38 I gonna wait for your merge, I think this will make things easier.

@b-garbacz
b-garbacz force-pushed the 40-integrate-eslint-for-trac-crypto-api-and-implement-github-actions-workflow branch from 76a616b to 3c3b7e3 Compare April 28, 2026 13:09
@lucasfernandes
lucasfernandes self-requested a review April 28, 2026 13:15

@lucasfernandes lucasfernandes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@b-garbacz
b-garbacz merged commit 32e8728 into main Apr 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrate ESlint for trac-crypto-api and implement github actions workflow

4 participants