Skip to content

chore: enable some eslint rules #426

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 6, 2025
Merged

chore: enable some eslint rules #426

merged 1 commit into from
Aug 6, 2025

Conversation

nirinchev
Copy link
Collaborator

Proposed changes

Enables a few extra eslint/ts rules and fixes the issues detected by them:

Checklist

@Copilot Copilot AI review requested due to automatic review settings August 5, 2025 16:42
@nirinchev nirinchev requested a review from a team as a code owner August 5, 2025 16:42
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enables additional ESLint and TypeScript linting rules to improve code quality and consistency. The changes include enabling strict equality checks, preventing self-comparisons, and ensuring functions have explicit return values.

  • Enables noImplicitReturns TypeScript compiler option and several new ESLint rules
  • Replaces loose equality operators (==, !=) with strict equality operators (===, !==) throughout the codebase
  • Adds explicit return undefined statements to functions that previously had implicit undefined returns

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tsconfig.build.json Enables noImplicitReturns TypeScript compiler option
eslint.config.js Adds new ESLint rules for strict equality, self-comparison prevention, and other quality checks
src/tools/atlas/connect/connectCluster.ts Replaces loose equality operators with strict equality operators
src/common/atlas/cluster.ts Replaces loose equality operators with strict equality operators
src/common/atlas/apiClient.ts Replaces loose equality operators with strict equality and adds explicit return statements

@@ -48,6 +48,10 @@ export default defineConfig([
rules: {
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/no-non-null-assertion": "error",
eqeqeq: "error",
"no-self-compare": "error",
"no-unassigned-vars": "error",
Copy link
Preview

Copilot AI Aug 5, 2025

Choose a reason for hiding this comment

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

The ESLint rule name has a typo. It should be "no-unused-vars" instead of "no-unassigned-vars".

Suggested change
"no-unassigned-vars": "error",
"no-unused-vars": "error",

Copilot uses AI. Check for mistakes.

@nirinchev nirinchev merged commit a916186 into main Aug 6, 2025
19 checks passed
@nirinchev nirinchev deleted the ni/eslint branch August 6, 2025 07:30
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.

2 participants