Skip to content

feat(ci): pro 319 test ensure proper linting for each sub repo#123

Open
Seth-Schmidt wants to merge 9 commits intomainfrom
feature/pro-319-test-ensure-proper-linting-for-each-sub-repo-and-add-lint-to
Open

feat(ci): pro 319 test ensure proper linting for each sub repo#123
Seth-Schmidt wants to merge 9 commits intomainfrom
feature/pro-319-test-ensure-proper-linting-for-each-sub-repo-and-add-lint-to

Conversation

@Seth-Schmidt
Copy link
Copy Markdown
Contributor

Summary

Added linting workflow step to 4 workflows. Also performed any missing linting on files already committed.

NOTE: .github/workflows/contracts-governance-tests.yml is only using lint:js as to not modify the existing contract files which have been deployed since those will flag linting errors in their current state.

In contracts/token: ESLint was brought up to 9.26.0 by a dependabot PR, however, token is using @layerzerolabs/eslint-config-next which only allows up to 8.57.1. I have downgraded ESLint back to 8.57.1 for now.

See below for other minor fixes.

Workflows with lint steps added

Workflow Command added
contracts-governance-tests.yml pnpm run lint:js
contracts-token-tests.yml pnpm run lint
contracts-solana-oft-tests.yml pnpm run lint
contracts-safe-hardhat-tests.yml npm run prettier:check && npm run lint:sol

Bug Fixes

contracts/token — ESLint version mismatch

  • Downgraded eslint from ^9.26.0 to ^8.55.0
  • ESLint 9 requires flat config (eslint.config.js); the repo uses .eslintrc.js and @layerzerolabs/eslint-config-next which only supports ESLint ^8.55.0

contracts/solanaOFT — ESLint crashing due to wrong ajv version

  • Added "@eslint/eslintrc>ajv": "^6.12.4" to pnpm.overrides
  • pnpm was deduplicating ajv@8.x into @eslint/eslintrc's scope despite it requiring ^6.12.4; this caused eslintrc to call ajv._opts which doesn't exist in v8, crashing ESLint

contracts/safe — Missing solhint config

  • Added .solhint.json with an empty ruleset so npm run lint:sol can run without errors
  • Can update with rules later if we need

contracts/solanaOFT — Auto-generated deployments/ directory linted

  • Added deployments/ to both .eslintignore and .prettierignore

@cla-bot cla-bot Bot added the cla-signed label Apr 27, 2026
@Seth-Schmidt Seth-Schmidt self-assigned this Apr 27, 2026
@Seth-Schmidt Seth-Schmidt marked this pull request as ready for review April 27, 2026 20:31
@Seth-Schmidt Seth-Schmidt requested review from a team and mortendahl as code owners April 27, 2026 20:31
@Seth-Schmidt Seth-Schmidt force-pushed the feature/pro-319-test-ensure-proper-linting-for-each-sub-repo-and-add-lint-to branch from e0b9633 to b253666 Compare April 28, 2026 23:44
Comment thread contracts/token/ADD_HYPEREVM_OFT.md Outdated
You just have to run:

```npx hardhat lz:oapp:wire --oapp-config layerzero.config.mainnet.hyperevm.ts --skip-connections-from-eids <EID_ETHEREUM_V2_MAINNET>```
`npx hardhat lz:oapp:wire --oapp-config layerzero.config.mainnet.hyperevm.ts --skip-connections-from-eids <EID_ETHEREUM_V2_MAINNET>`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is wrong, please keep the triple quotes here, since it shows differently. ``` above and below of the command. This should be allowed by the linter, see the other instances of triple quotes in same file already existing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@Seth-Schmidt
Copy link
Copy Markdown
Contributor Author

@claude review

@claude
Copy link
Copy Markdown

claude Bot commented Apr 30, 2026

Claude finished @Seth-Schmidt's request.View run

claude[bot]

This comment was marked as outdated.

@claude

This comment was marked as outdated.

@Seth-Schmidt
Copy link
Copy Markdown
Contributor Author

@claude review

@claude
Copy link
Copy Markdown

claude Bot commented Apr 30, 2026

Claude finished @Seth-Schmidt's request.View run

claude[bot]

This comment was marked as outdated.

@claude

This comment was marked as outdated.

- Added a linting step to the GitHub Actions workflow for the contracts/safe directory to ensure code quality.
- Updated the README.md to clarify the deployment instructions for the multisig safe wallet, including environment variable setup and command execution.
- Introduced a linting step in the GitHub Actions workflow for the governance contracts to ensure code quality.
- Updated the README.md to improve clarity on deployment instructions, including formatting adjustments for better readability.
- Refactored imports in task files to maintain consistency and organization.
- Introduced a linting step in the GitHub Actions workflow for the Solana OFT contracts to enhance code quality.
- Updated `.eslintignore` and `.prettierignore` to exclude additional files and directories.
- Made minor formatting adjustments in `ADD_SOLANA_OFT_TESTNET.md` and `README.md` for improved readability.
- Added a new dependency for ESLint configuration in `package.json` and updated the lock file accordingly.
- Introduced a linting step in the GitHub Actions workflow for the contracts/token directory to enhance code quality.
- Updated ESLint version in `package.json` and `pnpm-lock.yaml` to ensure compatibility.
- Made minor formatting adjustments in `ADD_BNB_OFT.md` and `ADD_HYPEREVM_OFT.md` for improved readability.
- Refactored scripts in `convertToAragonProposal.ts` and `copyAbiToDeployments.ts` for consistency and clarity.
- Removed the Solidity linting command from the CI workflow for the contracts/safe directory, streamlining the linting process to only include Prettier checks.
- Updated the CI workflow for the contracts/safe directory to include both Prettier and Solidity linting checks, ensuring improved code quality.
- Added a new .solhint.json configuration file to define Solidity linting rules, currently set to an empty object for future customization.
@Seth-Schmidt Seth-Schmidt force-pushed the feature/pro-319-test-ensure-proper-linting-for-each-sub-repo-and-add-lint-to branch from b253666 to 0a6be43 Compare April 30, 2026 22:50
@Seth-Schmidt
Copy link
Copy Markdown
Contributor Author

@claude review

@claude
Copy link
Copy Markdown

claude Bot commented Apr 30, 2026

Claude finished @Seth-Schmidt's request.View run

@claude
Copy link
Copy Markdown

claude Bot commented Apr 30, 2026

[AUTOMATED]

Code Review

No issues found. This PR was reviewed for bugs, security vulnerabilities, guideline compliance, and error handling quality.

Summary of Changes

This PR adds CI lint steps to 4 workflow files and fixes several linting/tooling issues across sub-repos:

Area Changes
CI Workflows Added Run lint steps to governance, safe, solanaOFT, and token test workflows — correctly placed after dependency install and before compile/test
contracts/governance Import reordering to satisfy lint rules (non-LZ imports first, then LZ imports separated by blank line); minor TypeScript syntax fix (,; in type annotation — semantically equivalent)
contracts/safe New .solhint.json with empty ruleset to enable lint:sol to run; prettier reformatting of acceptOwnership.ts
contracts/solanaOFT Added @eslint/eslintrc>ajv pnpm override to fix ESLint crash from ajv v8 deduplication; added deployments/ to .eslintignore and .prettierignore
contracts/token Full reformat of convertToAragonProposal.ts and copyAbiToDeployments.ts to match @layerzerolabs/prettier-config-next conventions
Documentation Trailing whitespace removal, missing EOF newlines, and markdown formatting fixes across multiple .md files

Review Details

  • Bug Hunting (2 independent passes): No runtime bugs, logic errors, or security issues found. All code changes are formatting/import-ordering only with no semantic differences.
  • Guideline Compliance: Changes align with project conventions (@layerzerolabs/prettier-config-next, import sorting via @trivago/prettier-plugin-sort-imports).
  • Error Handling Audit: No silent failures or error handling regressions. All error handling logic preserved identically through reformatting.

@claude
Copy link
Copy Markdown

claude Bot commented Apr 30, 2026

The review is complete. Here's a summary:

PR #123 Review Complete ✅

No issues found across all review dimensions:

  • Bug Hunting (2 passes with opus): No runtime bugs, logic errors, or security vulnerabilities. All code changes are purely formatting/import-ordering with no semantic differences.
  • Guideline Compliance: Changes properly align with @layerzerolabs/prettier-config-next conventions and @trivago/prettier-plugin-sort-imports import ordering rules.
  • Error Handling Audit: No silent failures or error handling regressions introduced. All error handling logic preserved identically through reformatting.

The PR is a well-scoped CI improvement that adds linting steps to 4 workflows and fixes the necessary tooling issues (ESLint version mismatch, ajv override, missing solhint config) to make those lint steps pass. The review comment has been posted to the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants