Skip to content

Expand lint coverage to CLI and config files#104

Merged
d-oit merged 3 commits intomainfrom
expand-lint-coverage-4838629202552736247
May 4, 2026
Merged

Expand lint coverage to CLI and config files#104
d-oit merged 3 commits intomainfrom
expand-lint-coverage-4838629202552736247

Conversation

@d-oit
Copy link
Copy Markdown
Owner

@d-oit d-oit commented May 4, 2026

This change expands ESLint and TypeScript coverage to include the cli/ directory and root-level configuration files (e.g., vite.config.ts, vitest.config.ts, playwright.config.ts).

Key changes:

  • eslint.config.js: Removed cli and *.config.* from ignores. Added a new configuration block for Node.js files using globals.node. Scoped React and a11y rules to the src/ directory to avoid false positives in CLI/config files.
  • tsconfig.json: Included CLI and config files in the compilation context. Enabled allowJs to support type-aware linting for JavaScript config files.
  • cli/index.ts: Fixed several linting errors (unsafe assignments, member access, and template literal expressions) by adding proper interfaces for command options and improving type safety.
  • package.json: Added globals package as a devDependency to provide Node.js global definitions for the flat ESLint config.

These changes ensure that critical tooling and automation code is held to the same quality standards as the main application code.

Fixes #99


PR created automatically by Jules for task 4838629202552736247 started by @d-oit

- Remove global ignores for CLI and config files in eslint.config.js.
- Add Node-specific ESLint configuration for CLI and config files.
- Scope browser/React rules to src/ directory.
- Update tsconfig.json to include CLI and root config files.
- Fix linting errors in cli/index.ts.
- Add 'globals' package to devDependencies.

Co-authored-by: d-oit <6849456+d-oit@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@deepsource-io
Copy link
Copy Markdown

deepsource-io Bot commented May 4, 2026

DeepSource Code Review

We reviewed changes in cf2ceb3...22832ad 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 ↗

Important

Some issues found as part of this review are outside of the diff in this pull request and aren't shown in the inline review comments due to GitHub's API limitations. You can see those issues on the DeepSource dashboard.

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
JavaScript May 4, 2026 6:50p.m. Review ↗
Python May 4, 2026 6:50p.m. Review ↗
Shell May 4, 2026 6:50p.m. Review ↗
SQL May 4, 2026 6:50p.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.

Comment thread cli/index.ts
.argument('<dir>', 'directory')
.action(async (dir) => {
.action(async (dir: string) => {
console.log(`Syncing from "${dir}"...`);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Avoid using console in code that runs on the browser


It is considered a best practice to avoid the use of any console methods in JavaScript code that will run on the browser.

NOTE: If your repository contains a server side project, you can add "nodejs" to the environment property of analyzer meta in .deepsource.toml.
This will prevent this issue from getting raised.
Documentation for the analyzer meta can be found here.
Alternatively, you can silence this issue for your repository as shown here.

If a specific console call is meant to stay for other reasons, you can add a skipcq comment to that line.
This will inform other developers about the reason behind the log's presence, and prevent DeepSource from flagging it.

Comment thread cli/index.ts
@@ -57,12 +57,17 @@ program
console.log('Sync complete.');
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Avoid using console in code that runs on the browser


It is considered a best practice to avoid the use of any console methods in JavaScript code that will run on the browser.

NOTE: If your repository contains a server side project, you can add "nodejs" to the environment property of analyzer meta in .deepsource.toml.
This will prevent this issue from getting raised.
Documentation for the analyzer meta can be found here.
Alternatively, you can silence this issue for your repository as shown here.

If a specific console call is meant to stay for other reasons, you can add a skipcq comment to that line.
This will inform other developers about the reason behind the log's presence, and prevent DeepSource from flagging it.

Comment thread cli/index.ts
@@ -210,7 +220,7 @@ program
});
console.log(`Created: ${entity.name} [${entity.type}] (ID: ${entity.id})`);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Avoid using console in code that runs on the browser


It is considered a best practice to avoid the use of any console methods in JavaScript code that will run on the browser.

NOTE: If your repository contains a server side project, you can add "nodejs" to the environment property of analyzer meta in .deepsource.toml.
This will prevent this issue from getting raised.
Documentation for the analyzer meta can be found here.
Alternatively, you can silence this issue for your repository as shown here.

If a specific console call is meant to stay for other reasons, you can add a skipcq comment to that line.
This will inform other developers about the reason behind the log's presence, and prevent DeepSource from flagging it.

Comment thread cli/index.ts
@@ -250,7 +264,7 @@ program
});
console.log(`Claim added to ${entity.name}: ${claim.statement}`);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Avoid using console in code that runs on the browser


It is considered a best practice to avoid the use of any console methods in JavaScript code that will run on the browser.

NOTE: If your repository contains a server side project, you can add "nodejs" to the environment property of analyzer meta in .deepsource.toml.
This will prevent this issue from getting raised.
Documentation for the analyzer meta can be found here.
Alternatively, you can silence this issue for your repository as shown here.

If a specific console call is meant to stay for other reasons, you can add a skipcq comment to that line.
This will inform other developers about the reason behind the log's presence, and prevent DeepSource from flagging it.

- Remove global ignores for CLI and config files in eslint.config.js.
- Add Node-specific ESLint configuration for CLI and config files.
- Scope browser/React rules to src/ directory.
- Update cli/index.ts to fix linting errors.
- Add 'globals' package to devDependencies.
- Integrated with new multi-project tsconfig structure.

Co-authored-by: d-oit <6849456+d-oit@users.noreply.github.com>
@github-actions github-actions Bot added the tests Related to automated/manual tests label May 4, 2026
@d-oit d-oit marked this pull request as ready for review May 4, 2026 18:50
@github-actions github-actions Bot removed the tests Related to automated/manual tests label May 4, 2026
@d-oit d-oit merged commit a3707f3 into main May 4, 2026
20 of 21 checks passed
@d-oit d-oit deleted the expand-lint-coverage-4838629202552736247 branch May 4, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extend lint coverage to CLI and config files with context-specific overrides

1 participant