Skip to content

chore(sdk): add linting, formatting support and CI workflow for SDK p…#238

Merged
pragmaticAweds merged 2 commits into
Fundable-Protocol:mainfrom
divicbold47:SDK_Add_linting_and_formatting_CI_for_SDK_package
Apr 29, 2026
Merged

chore(sdk): add linting, formatting support and CI workflow for SDK p…#238
pragmaticAweds merged 2 commits into
Fundable-Protocol:mainfrom
divicbold47:SDK_Add_linting_and_formatting_CI_for_SDK_package

Conversation

@divicbold47
Copy link
Copy Markdown
Contributor

@divicbold47 divicbold47 commented Apr 28, 2026

close #199

PR Description

Title: chore(sdk): add linting, formatting, and SDK CI workflow

Summary:
Add linting and formatting support for the @fundable/sdk package, and introduce a dedicated GitHub Actions workflow to enforce SDK quality on pushes and pull requests.

What changed:

  • package.json
    • Added lint, format, and format:check scripts.
    • Added ESLint/Prettier devDependencies for the SDK package.
    • Added @eslint/eslintrc to support ESLint v9 with .eslintrc.json.
  • .eslintrc.json
    • Added SDK-specific ESLint configuration for TypeScript.
  • .prettierrc
    • Added Prettier configuration for SDK formatting.
  • sdk.yml
    • Added a new CI workflow to install dependencies and run pnpm --filter @fundable/sdk lint and pnpm --filter @fundable/sdk format:check.

Why:
This ensures the SDK package is linted and formatted consistently, and prevents regressions by running quality checks in CI specifically for sdk.

Testing / Verification:

  1. Run pnpm install
  2. Run pnpm --filter @fundable/sdk lint
  3. Run pnpm --filter @fundable/sdk format:check

Summary by CodeRabbit

  • Chores
    • Integrated automated code linting and formatting checks for the SDK package via CI/CD pipeline.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 28, 2026

📝 Walkthrough

Walkthrough

Introduces ESLint and Prettier configuration for the SDK package with a corresponding GitHub Actions workflow. The workflow runs on main push and pull requests, executing lint and format checks using frozen lockfile installation. Configuration files define TypeScript linting rules and code formatting standards.

Changes

Cohort / File(s) Summary
CI Workflow Configuration
.github/workflows/sdk.yml
New GitHub Actions workflow executing on main push and pull requests, running SDK-scoped lint and format:check scripts on Ubuntu with Node.js 20 and pnpm 9.
SDK Code Quality Configuration
packages/sdk/.eslintrc.json, packages/sdk/.prettierrc
ESLint configuration with TypeScript parser, recommended rules, and Prettier integration; Prettier configuration defining formatting rules (100-char line width, 2-space indentation, single quotes, LF line endings, ES5 trailing commas).
SDK Package Configuration
packages/sdk/package.json
Added lint and format:check npm scripts; expanded devDependencies with eslint, prettier, @typescript-eslint/* packages, and related integration configs.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 Lint hops here, format hops there,
ESLint's dance fills the air!
Prettier polishes every line,
Our SDK will surely shine! ✨
CI watches over, with a happy squeak—
Quality code every week! 🎀

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding linting, formatting support, and a CI workflow for the SDK package.
Linked Issues check ✅ Passed The pull request fully implements the objective from issue #199: ESLint and Prettier are configured for the SDK package, and a CI workflow enforces these checks on pushes and pull requests.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issue objective: ESLint/Prettier configuration, npm scripts, and CI workflow for the SDK package only.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch SDK_Add_linting_and_formatting_CI_for_SDK_package

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/sdk/.eslintrc.json`:
- Around line 1-18: Replace the legacy .eslintrc.json by creating an
eslint.config.mjs that uses FlatCompat from "@eslint/eslintrc" to load the
existing configuration: map "parser" -> parser option for
"@typescript-eslint/parser", preserve "parserOptions.project" and "sourceType",
convert "extends" entries
("eslint:recommended","plugin:`@typescript-eslint/recommended`","prettier") into
FlatCompat.extend/config chain, include the "@typescript-eslint" plugin rules
via the plugin config, replicate "env" (node, es2024) and "ignorePatterns"
(dist, node_modules) by using FlatCompat and the flat config's ignore/glob
features, and export the final config as the default export from
eslint.config.mjs so ESLint v9 flat config is used instead of .eslintrc.json.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d47a742e-b714-40cd-a208-15875ef5b54b

📥 Commits

Reviewing files that changed from the base of the PR and between a46b797 and 0c16a17.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (4)
  • .github/workflows/sdk.yml
  • packages/sdk/.eslintrc.json
  • packages/sdk/.prettierrc
  • packages/sdk/package.json

Comment thread packages/sdk/.eslintrc.json Outdated
Comment on lines +1 to +18
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"sourceType": "module"
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"plugins": ["@typescript-eslint"],
"env": {
"node": true,
"es2024": true
},
"ignorePatterns": ["dist", "node_modules"]
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.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
rg -n --hidden --glob '!**/node_modules/**' \
  'ESLINT_USE_FLAT_CONFIG|eslint\.config\.(js|mjs|cjs)|FlatCompat|@eslint/eslintrc' \
  .

Repository: Fundable-Protocol/stellar_client_os

Length of output: 647


🏁 Script executed:

fd -type f -name 'eslint.config.*'

Repository: Fundable-Protocol/stellar_client_os

Length of output: 250


🏁 Script executed:

cat -n packages/sdk/package.json | head -40

Repository: Fundable-Protocol/stellar_client_os

Length of output: 1391


🏁 Script executed:

if [ -f ./eslint.config.mjs ]; then cat -n ./eslint.config.mjs | head -50; else echo "No root eslint.config.mjs found"; fi

Repository: Fundable-Protocol/stellar_client_os

Length of output: 111


🏁 Script executed:

rg -n 'ESLINT_USE_FLAT_CONFIG' .

Repository: Fundable-Protocol/stellar_client_os

Length of output: 61


🏁 Script executed:

find . -type f \( -name '.eslintignore' -o -name 'package.json' -o -name '*.yml' -o -name '*.yaml' \) -path '*/.*' -o -name '*.sh' | head -20

Repository: Fundable-Protocol/stellar_client_os

Length of output: 254


🏁 Script executed:

rg -n 'eslint' --type=yaml --type=json | grep -i 'legacy\|flat\|config' | head -20

Repository: Fundable-Protocol/stellar_client_os

Length of output: 1313


🏁 Script executed:

cat -n ./.github/workflows/sdk.yml

Repository: Fundable-Protocol/stellar_client_os

Length of output: 1006


🏁 Script executed:

ls -la packages/sdk/ | grep -i eslint

Repository: Fundable-Protocol/stellar_client_os

Length of output: 144


🏁 Script executed:

find packages/sdk -type f -name 'eslint*'

Repository: Fundable-Protocol/stellar_client_os

Length of output: 61


Migrate this config to ESLint 9's flat config format.

ESLint v9 uses flat config by default and .eslintrc.* files only work when ESLINT_USE_FLAT_CONFIG=false is set. This file is still in legacy JSON format with no environment variable setup, so the linting may not work as expected. Since @eslint/eslintrc is already a dependency, migrate to eslint.config.mjs using FlatCompat for compatibility. See ESLint migration guide.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/sdk/.eslintrc.json` around lines 1 - 18, Replace the legacy
.eslintrc.json by creating an eslint.config.mjs that uses FlatCompat from
"@eslint/eslintrc" to load the existing configuration: map "parser" -> parser
option for "@typescript-eslint/parser", preserve "parserOptions.project" and
"sourceType", convert "extends" entries
("eslint:recommended","plugin:`@typescript-eslint/recommended`","prettier") into
FlatCompat.extend/config chain, include the "@typescript-eslint" plugin rules
via the plugin config, replicate "env" (node, es2024) and "ignorePatterns"
(dist, node_modules) by using FlatCompat and the flat config's ignore/glob
features, and export the final config as the default export from
eslint.config.mjs so ESLint v9 flat config is used instead of .eslintrc.json.

@Utilitycoder
Copy link
Copy Markdown
Contributor

Fix merge conflict

…ckage

This PR's content has been fully absorbed by intervening merges
(esp. PR Fundable-Protocol#229's lint/format CI):
- main's sdk.yml has lint+format+test+build jobs
- main's .eslintrc.json with explicit ESLint v8 + TS rules is in place
- main's .prettierrc.json (singleQuote: false, width 80) is established
- main's package.json already has lint/format scripts and devDeps

Resolution: take main's versions for all conflicted files; drop this
PR's .prettierrc (would conflict with main's .prettierrc.json which
uses different style settings).

Net diff vs main is zero — this PR can be merged as a no-op for
attribution, or closed as superseded.
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 29, 2026

@divicbold47 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@pragmaticAweds pragmaticAweds merged commit 4f1e053 into Fundable-Protocol:main Apr 29, 2026
1 of 3 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.

[SDK] Add linting and formatting CI for SDK package

3 participants