Skip to content

fix(ci): add DeepSource config so TS modules are not analyzed as scripts - #111

Merged
A-x6 merged 1 commit into
devfrom
deepsource-config
Jul 31, 2026
Merged

fix(ci): add DeepSource config so TS modules are not analyzed as scripts#111
A-x6 merged 1 commit into
devfrom
deepsource-config

Conversation

@A-x6

@A-x6A-x6 commented Jul 31, 2026

Copy link
Copy Markdown

Issue for this PR

Closes#110

Type of change

  • Bug fix

What does this PR do?

The DeepSource JavaScript check fails on every open PR (#101, #103, #107). The repo has no .deepsource.toml, so the analyzer runs with defaults, parses our ESM TypeScript files as scripts, and flags every top-level function declaration as JS-0067 ("function declaration in the global scope"). Any PR touching a TS file "introduces" occurrences and goes red.

This adds a config telling the analyzer what the codebase actually is:

[[analyzers]]
name = "javascript"
[analyzers.meta]
environment = ["nodejs"]
module_system = "es-modules"dialect = "typescript"

It also declares test patterns (so test-specific rules relax there), excludes generated SDK output (packages/sdk/js/src/gen, packages/sdk/js/src/v2/gen) and dist, and keeps the docker, shell, and secrets analyzers active.

Note for the reviewer: metric thresholds (e.g. the Documentation Coverage metric DeepSource reports at 4.9%) and per-issue blocking severity are dashboard settings; if runs still fail on metrics after this lands, those need adjusting at app.deepsource.com.

How did you verify your code works?

Config-only change validated against the DeepSource config schema (version 1, analyzer names and meta keys per their docs). The DeepSource run on this PR itself will confirm the JS-0067 flood disappears.

Screenshots / recordings

Not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

View with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is enabled.

Summary by CodeRabbit

  • Chores
    • Added automated code analysis configuration for JavaScript, TypeScript, Docker, shell scripts, and secrets.
    • Configured test and file exclusion patterns to improve analysis accuracy.

@vercel

vercelBot commented Jul 31, 2026

Copy link
Copy Markdown

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/adevloper152s-projects?upgradeToPro=build-rate-limit

@coderabbitai

coderabbitaiBot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3f9f80bc-766e-416c-ba95-0e202cbc665b

📥 Commits

Reviewing files that changed from the base of the PR and between bac45a2 and 410ea95.

📒 Files selected for processing (1)
  • .deepsource.toml

📝 Walkthrough

Walkthrough

Added .deepsource.toml with test patterns, exclusions, and analyzer settings for Node.js ES modules, Docker, shell, and secrets.

Changes

DeepSource configuration

Layer / File(s)Summary
Configure DeepSource analyzers
.deepsource.toml
Defines test paths, excludes generated, dependency, and build paths, and configures JavaScript/TypeScript analysis for Node.js ES modules with Docker, shell, and secrets analyzers.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Title check✅ PassedThe title clearly identifies the DeepSource CI configuration change and its purpose for TypeScript modules.
Description check✅ PassedThe description includes the issue, change type, rationale, verification method, UI note, and completed checklist.
Linked Issues check✅ PassedThe configuration meets issue #110 by setting TypeScript, ES modules, and Node.js options, test patterns, and required exclusions.
Out of Scope Changes check✅ PassedThe changes are limited to the requested DeepSource configuration and retain the specified analyzers.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch deepsource-config

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

@deepsource-io

deepsource-ioBot commented Jul 31, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in bac45a2...410ea95 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall GradeSecurity

Reliability

Complexity

Hygiene

Code Review Summary

AnalyzerStatusUpdated (UTC)Details
JavaScriptJul 31, 2026 9:42p.m.Review ↗
ShellJul 31, 2026 9:42p.m.Review ↗
SecretsJul 31, 2026 9:42p.m.Review ↗
DockerJul 31, 2026 9:42p.m.Review ↗
PythonJul 31, 2026 9:42p.m.Review ↗
CSSJul 31, 2026 9:42p.m.Review ↗
RustJul 31, 2026 9:42p.m.Review ↗
RubyJul 31, 2026 9:42p.m.Review ↗
SwiftJul 31, 2026 9:42p.m.Review ↗
PHPJul 31, 2026 9:42p.m.Review ↗
LuaJul 31, 2026 9:42p.m.Review ↗
JavaJul 31, 2026 9:42p.m.Review ↗
GoJul 31, 2026 9:42p.m.Review ↗
C & C++Jul 31, 2026 9:42p.m.Review ↗
AnsibleJul 31, 2026 9:42p.m.Review ↗
ApexJul 31, 2026 9:42p.m.Review ↗
ElixirJul 31, 2026 9:42p.m.Review ↗
GroovyJul 31, 2026 9:42p.m.Review ↗
Objective-CJul 31, 2026 9:42p.m.Review ↗
PowerShellJul 31, 2026 9:42p.m.Review ↗
TerraformJul 31, 2026 9:42p.m.Review ↗
VB.NETJul 31, 2026 9:42p.m.Review ↗
SQLJul 31, 2026 9:42p.m.Review ↗
ScalaJul 31, 2026 9:42p.m.Review ↗
PerlJul 31, 2026 9:42p.m.Review ↗
KotlinJul 31, 2026 9:42p.m.Review ↗
HelmJul 31, 2026 9:42p.m.Review ↗
ErlangJul 31, 2026 9:42p.m.Review ↗
DartJul 31, 2026 9:42p.m.Review ↗
C#Jul 31, 2026 9:42p.m.Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@github-actions

Copy link
Copy Markdown

The following comment was made by an LLM, it may be inaccurate:

@A-x6
A-x6 merged commit f65b9e8 into devJul 31, 2026
47 of 48 checks passed
Sign up for freeto 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.

fix(ci): DeepSource JavaScript check fails on every PR (JS-0067 module misdetection)

1 participant

@A-x6