Skip to content

Conversation

@anatolyshipitz
Copy link
Collaborator

@anatolyshipitz anatolyshipitz commented Aug 11, 2025

  • Added TypeScript support in ESLint configuration by including @typescript-eslint/eslint-plugin and @typescript-eslint/parser at version 8.39.0.
  • Enhanced ESLint rules with naming conventions for identifiers, interfaces, classes, and constants to improve code quality and consistency.
  • Updated package-lock.json and package.json to reflect the new dependencies and their versions.

These changes strengthen the linting process for TypeScript files and enforce better coding standards across the project.

Summary by CodeRabbit

  • New Features
    • None; no user-facing changes.
  • Style
    • Enforced consistent TypeScript naming conventions (non-blocking lint warnings).
  • Chores
    • Added TypeScript ESLint tooling to dev dependencies and broadened linting scope to include TypeScript files.
  • Documentation
    • Added Development Guidelines and an internal archive documenting the naming conventions and linting guidance.

- Added TypeScript support in ESLint configuration by including `@typescript-eslint/eslint-plugin` and `@typescript-eslint/parser` at version 8.39.0.
- Enhanced ESLint rules with naming conventions for identifiers, interfaces, classes, and constants to improve code quality and consistency.
- Updated `package-lock.json` and `package.json` to reflect the new dependencies and their versions.

These changes strengthen the linting process for TypeScript files and enforce better coding standards across the project.
@anatolyshipitz anatolyshipitz requested a review from killev as a code owner August 11, 2025 09:53
@coderabbitai
Copy link

coderabbitai bot commented Aug 11, 2025

Walkthrough

Scopes the primary ESLint override to TypeScript files, adds a comprehensive @typescript-eslint/naming-convention rule set (multiple selectors, formats, prefixes, and custom regexes) to the main ESLint config, reorders a Prettier import in the ESLint config file, adds @typescript-eslint/parser and @typescript-eslint/eslint-plugin (v8.39.0) to workers/main devDependencies, updates README with development guidelines, and adds an archival document capturing the naming-convention configuration. Test override in the ESLint config is unchanged.

Changes

Cohort / File(s) Summary
ESLint config
workers/main/eslint.config.mjs
Adds files: ['**/*.ts'] to the first override, inserts a large @typescript-eslint/naming-convention rules array covering selectors (default, objectLiteralProperty, typeProperty, interface, class/typeLike, enumMember, variable (boolean & model exceptions), parameter, function) with formats, prefixes, and custom regex filters; reorders Prettier import line; leaves test override unchanged.
DevDependencies / scripts
workers/main/package.json
Adds @typescript-eslint/[email protected] and @typescript-eslint/[email protected] to devDependencies and updates the eslint script to include .ts/.tsx/.js extensions.
Docs / archive
README.md, memory-bank/archive/archive-eslint-naming-conventions-20250811.md
Adds Development Guidelines documenting the naming-convention rules, how to run/fix ESLint, testing/QA notes, and a new archival document capturing the full naming-convention configuration, rationale, and implementation details.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~35 minutes

Possibly related PRs

Suggested reviewers

  • killev

Poem

"I hopped through code with careful paws,
regex and rules arranged like laws.
Types wear caps and functions sing,
linted lines make my heart spring.
🐇✨ — a rabbit pleased with tidy strings"

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/eslint-naming-conventions

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@anatolyshipitz anatolyshipitz enabled auto-merge (squash) August 11, 2025 09:53
@github-actions
Copy link

github-actions bot commented Aug 11, 2025

🔍 Vulnerabilities of temporal-test:latest

📦 Image Reference temporal-test:latest
digestsha256:da30eca7154c7c4cb2616e31f7411021ea9146d5b15c68adf2a57df4c52b164c
vulnerabilitiescritical: 2 high: 7 medium: 0 low: 0
platformlinux/amd64
size218 MB
packages358
📦 Base Image alpine:3
also known as
  • 3.21
  • 3.21.3
  • latest
digestsha256:1c4eef651f65e2f7daee7ee785882ac164b02b78fb74503052a26dc061c90474
vulnerabilitiescritical: 0 high: 0 medium: 0 low: 0
critical: 1 high: 0 medium: 0 low: 0 stdlib 1.23.2 (golang)

pkg:golang/[email protected]

critical : CVE--2025--22871

Affected range<1.23.8
Fixed version1.23.8
EPSS Score0.023%
EPSS Percentile4th percentile
Description

The net/http package improperly accepts a bare LF as a line terminator in chunked data chunk-size lines. This can permit request smuggling if a net/http server is used in conjunction with a server that incorrectly accepts a bare LF as part of a chunk-ext.

critical: 1 high: 0 medium: 0 low: 0 stdlib 1.23.6 (golang)

pkg:golang/[email protected]

critical : CVE--2025--22871

Affected range<1.23.8
Fixed version1.23.8
EPSS Score0.023%
EPSS Percentile4th percentile
Description

The net/http package improperly accepts a bare LF as a line terminator in chunked data chunk-size lines. This can permit request smuggling if a net/http server is used in conjunction with a server that incorrectly accepts a bare LF as part of a chunk-ext.

critical: 0 high: 1 medium: 0 low: 0 c-ares 1.34.3-r0 (apk)

pkg:apk/alpine/[email protected]?os_name=alpine&os_version=3.21

high : CVE--2025--31498

Affected range<1.34.5-r0
Fixed version1.34.5-r0
EPSS Score0.199%
EPSS Percentile42nd percentile
Description
critical: 0 high: 1 medium: 0 low: 0 golang.org/x/oauth2 0.26.0 (golang)

pkg:golang/golang.org/x/[email protected]

high 7.5: CVE--2025--22868 Improper Validation of Syntactic Correctness of Input

Affected range<0.27.0
Fixed version0.27.0
CVSS Score7.5
CVSS VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS Score0.076%
EPSS Percentile23rd percentile
Description

An attacker can pass a malicious malformed token which causes unexpected memory to be consumed during parsing.

critical: 0 high: 1 medium: 0 low: 0 github.com/golang-jwt/jwt/v4 4.5.1 (golang)

pkg:golang/github.com/golang-jwt/[email protected]#v4

high 8.7: CVE--2025--30204 Asymmetric Resource Consumption (Amplification)

Affected range<4.5.2
Fixed version4.5.2
CVSS Score8.7
CVSS VectorCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
EPSS Score0.033%
EPSS Percentile8th percentile
Description

Summary

Function parse.ParseUnverified currently splits (via a call to strings.Split) its argument (which is untrusted data) on periods.

As a result, in the face of a malicious request whose Authorization header consists of Bearer followed by many period characters, a call to that function incurs allocations to the tune of O(n) bytes (where n stands for the length of the function's argument), with a constant factor of about 16. Relevant weakness: CWE-405: Asymmetric Resource Consumption (Amplification)

Details

See parse.ParseUnverified

Impact

Excessive memory allocation

critical: 0 high: 1 medium: 0 low: 0 golang.org/x/oauth2 0.7.0 (golang)

pkg:golang/golang.org/x/[email protected]

high 7.5: CVE--2025--22868 Improper Validation of Syntactic Correctness of Input

Affected range<0.27.0
Fixed version0.27.0
CVSS Score7.5
CVSS VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS Score0.076%
EPSS Percentile23rd percentile
Description

An attacker can pass a malicious malformed token which causes unexpected memory to be consumed during parsing.

critical: 0 high: 1 medium: 0 low: 0 github.com/golang-jwt/jwt 3.2.2+incompatible (golang)

pkg:golang/github.com/golang-jwt/[email protected]%2Bincompatible

high 8.7: CVE--2025--30204 Asymmetric Resource Consumption (Amplification)

Affected range>=3.2.0
<=3.2.2
Fixed versionNot Fixed
CVSS Score8.7
CVSS VectorCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
EPSS Score0.033%
EPSS Percentile8th percentile
Description

Summary

Function parse.ParseUnverified currently splits (via a call to strings.Split) its argument (which is untrusted data) on periods.

As a result, in the face of a malicious request whose Authorization header consists of Bearer followed by many period characters, a call to that function incurs allocations to the tune of O(n) bytes (where n stands for the length of the function's argument), with a constant factor of about 16. Relevant weakness: CWE-405: Asymmetric Resource Consumption (Amplification)

Details

See parse.ParseUnverified

Impact

Excessive memory allocation

critical: 0 high: 1 medium: 0 low: 0 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc 0.36.4 (golang)

pkg:golang/go.opentelemetry.io/contrib/[email protected]#google.golang.org/grpc/otelgrpc

high 7.5: CVE--2023--47108 Allocation of Resources Without Limits or Throttling

Affected range<0.46.0
Fixed version0.46.0
CVSS Score7.5
CVSS VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS Score2.678%
EPSS Percentile85th percentile
Description

Summary

The grpc Unary Server Interceptor opentelemetry-go-contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go

// UnaryServerInterceptor returns a grpc.UnaryServerInterceptor suitable
// for use in a grpc.NewServer call.
func UnaryServerInterceptor(opts ...Option) grpc.UnaryServerInterceptor {

out of the box adds labels

  • net.peer.sock.addr
  • net.peer.sock.port

that have unbound cardinality. It leads to the server's potential memory exhaustion when many malicious requests are sent.

Details

An attacker can easily flood the peer address and port for requests.

PoC

Apply the attached patch to the example and run the client multiple times. Observe how each request will create a unique histogram and how the memory consumption increases during it.

Impact

In order to be affected, the program has to configure a metrics pipeline, use UnaryServerInterceptor, and does not filter any client IP address and ports via middleware or proxies, etc.

Others

It is similar to already reported vulnerabilities.

Workaround for affected versions

As a workaround to stop being affected, a view removing the attributes can be used.

The other possibility is to disable grpc metrics instrumentation by passing otelgrpc.WithMeterProvider option with noop.NewMeterProvider.

Solution provided by upgrading

In PR #4322, to be released with v0.46.0, the attributes were removed.

References

critical: 0 high: 1 medium: 0 low: 0 golang.org/x/crypto 0.32.0 (golang)

pkg:golang/golang.org/x/[email protected]

high : CVE--2025--22869

Affected range<0.35.0
Fixed version0.35.0
EPSS Score0.188%
EPSS Percentile41st percentile
Description

SSH servers which implement file transfer protocols are vulnerable to a denial of service attack from clients which complete the key exchange slowly, or not at all, causing pending content to be read into memory, but never transmitted.

Copy link

@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: 3

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5ffcf73 and ff7c757.

⛔ Files ignored due to path filters (1)
  • workers/main/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • workers/main/eslint.config.mjs (2 hunks)
  • workers/main/package.json (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
workers/main/eslint.config.mjs

📄 CodeRabbit Inference Engine (CLAUDE.md)

Linting rules should be defined in workers/main/eslint.config.mjs

Files:

  • workers/main/eslint.config.mjs
🧠 Learnings (4)
📓 Common learnings
Learnt from: CR
PR: speedandfunction/automatization#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-05T13:42:48.295Z
Learning: Applies to workers/main/tsconfig.json : TypeScript configuration should be defined in workers/main/tsconfig.json
Learnt from: CR
PR: speedandfunction/automatization#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-05T13:42:48.295Z
Learning: Applies to workers/main/eslint.config.mjs : Linting rules should be defined in workers/main/eslint.config.mjs
📚 Learning: 2025-08-05T13:42:48.295Z
Learnt from: CR
PR: speedandfunction/automatization#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-05T13:42:48.295Z
Learning: Applies to workers/main/eslint.config.mjs : Linting rules should be defined in workers/main/eslint.config.mjs

Applied to files:

  • workers/main/eslint.config.mjs
📚 Learning: 2025-08-05T13:42:48.295Z
Learnt from: CR
PR: speedandfunction/automatization#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-05T13:42:48.295Z
Learning: Applies to workers/main/tsconfig.json : TypeScript configuration should be defined in workers/main/tsconfig.json

Applied to files:

  • workers/main/eslint.config.mjs
📚 Learning: 2025-08-05T13:42:48.295Z
Learnt from: CR
PR: speedandfunction/automatization#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-05T13:42:48.295Z
Learning: Applies to **/*.{ts,tsx} : Use descriptive, unabbreviated variable names; use singular for single values and plural for collections; ensure variable names are context-specific

Applied to files:

  • workers/main/eslint.config.mjs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Docker Security Scanning (n8n, Dockerfile.n8n, n8n-test:latest)
  • GitHub Check: Service Availability Check
  • GitHub Check: SonarQube
🔇 Additional comments (1)
workers/main/eslint.config.mjs (1)

4-4: LGTM: Prettier plugin import is correct for flat config.

No issues; using prettier.configs.recommended.rules plus prettier/prettier is compatible with ESLint 9 flat config.

anatolyshipitz and others added 2 commits August 11, 2025 13:07
- Modified ESLint configuration to target only TypeScript files (`**/*.ts`) by removing TypeScript React files (`**/*.tsx`).
- Enhanced naming convention rules to exclude const variables from the default identifier rule and updated the filter for variable naming to ensure uppercase constants are not matched.
- Added `@typescript-eslint/eslint-plugin` and `@typescript-eslint/parser` as devDependencies in `package.json` to support TypeScript linting.

These changes refine the linting process for TypeScript files and improve code quality standards across the project.
coderabbitai[bot]
coderabbitai bot previously approved these changes Aug 11, 2025
- Introduced a new archive file detailing ESLint naming conventions based on the naming-cheatsheet principles to enhance code quality and consistency in the TypeScript codebase.
- Updated `eslint.config.mjs` to implement comprehensive naming rules, including camelCase for constants, PascalCase for classes and enums, and specific prefixes for boolean variables and functions.
- Enhanced the ESLint configuration to allow flexible naming for object properties, MongoDB operators, and dot notation, ensuring compatibility with various coding patterns.
- Updated `package.json` to reflect the latest dependencies and scripts for ESLint.

These changes significantly improve the linting process and enforce better coding standards across the project, promoting maintainability and readability.
Copy link

@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: 3

🔭 Outside diff range comments (1)
workers/main/eslint.config.mjs (1)

11-15: Enhance TypeScript import resolver configuration

Now that we’ve confirmed that [email protected] is installed in workers/main and your tsconfig.json lives next to the ESLint config, strengthen the resolver to pick up path aliases, type packages, and CommonJS/ESM fallbacks:

• File: workers/main/eslint.config.mjs
• Lines: 11–15

Apply this diff:

       'import/resolver': {
-        typescript: {
-          extensions: [".ts"]
-        },
+        typescript: {
+          project: './tsconfig.json',
+          alwaysTryTypes: true,
+          extensions: ['.ts', '.cts', '.mts']
+        },
+        node: {
+          extensions: ['.js', '.mjs', '.cjs', '.ts', '.mts', '.cts']
+        },
       },

This ensures ESLint can resolve TS aliases, ambient packages, and fallback to Node’s resolution for JS/TS variants.

🧹 Nitpick comments (8)
workers/main/eslint.config.mjs (4)

40-43: Prefer typescript-eslint flat configs over spreading plugin.configs.*.rules.

Using @typescript-eslint/eslint-plugin.configs directly is legacy/classic-config oriented and brittle in flat-config. With v8, import typescript-eslint and use its flat configs (recommendedTypeChecked, stylistic).

Example refactor (high-level):

// import tseslint from 'typescript-eslint';
// export default tseslint.config({
//   files: ['**/*.ts'],
//   languageOptions: { parser: tseslint.parser, parserOptions: { project: './tsconfig.json' } },
//   plugins: { '@typescript-eslint': tseslint.plugin },
//   rules: {
//     ...tseslint.configs.recommendedTypeChecked.rules,
//     ...tseslint.configs.stylisticTypeChecked.rules,
//     // Your custom rules...
//   }
// })

If you keep the current approach, verify that 'recommended-requiring-type-checking' still exists in v8 (it was renamed to recommended-type-checked in the monorepo). Otherwise, switch to the new name to avoid undefined spreads.


42-45: Remove duplicated Prettier enforcement.

prettier.configs.recommended already sets 'prettier/prettier': 'error', so the explicit rule duplicates it.

       ...prettier.configs.recommended.rules,
-
-      'prettier/prettier': 'error',

31-38: Simplify ignores; avoid redundant patterns.

'coverage', 'coverage/', and 'coverage/**/' overlap. Keeping just 'coverage' is sufficient in flat config.

     ignores: [
       'node_modules',
       'dist',
       'eslint.config.mjs',
-      'coverage',
-      'coverage/*',
-      'coverage/**/*'
+      'coverage'
     ],

159-166: Intent check: JS test files won’t inherit the main override’s plugins/rules.

The test override correctly relaxes complexity for ['/*.test.ts', '/*.test.js'], but only those two rules will apply to .test.js (no TS plugins, import rules, prettier, etc.). If that’s intentional, fine; otherwise consider a base config object for JS that includes common rules.

memory-bank/archive/archive-eslint-naming-conventions-20250811.md (4)

15-16: Docs vs config: constants casing policy is inconsistent.

The archive states “Enforce camelCase for constants,” but the ESLint config’s default rule currently exempts UPPER_CASE via its filter, allowing both camelCase and UPPER_CASE. Decide the intended policy and align code or docs accordingly.

I can generate a doc patch once you confirm the desired behavior.


97-114: Doc lists rules for PascalCase variables (classes/models) and snake_case parameters, but these selectors aren’t present in the ESLint config.

If you want these enforced, add the corresponding '@typescript-eslint/naming-convention' entries; otherwise, trim the archive section to reflect the actual configuration.

Happy to generate the exact rule blocks to add into workers/main/eslint.config.mjs.


206-206: Add a language to the fenced code block (markdownlint MD040).

One of the code fences lacks a language hint. Append a language like bash, js, or json to the opening ``` to satisfy MD040.


53-71: Prefer requiresQuotes modifier over quoted-string regex in narrative and samples.

The archive shows regex allowing quoted properties and dots; in the ESLint ecosystem, modifiers: ['requiresQuotes'] is clearer. Consider updating the doc examples to reflect the recommended pattern.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2094277 and a2893db.

📒 Files selected for processing (2)
  • memory-bank/archive/archive-eslint-naming-conventions-20250811.md (1 hunks)
  • workers/main/eslint.config.mjs (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
workers/main/eslint.config.mjs

📄 CodeRabbit Inference Engine (CLAUDE.md)

Linting rules should be defined in workers/main/eslint.config.mjs

Files:

  • workers/main/eslint.config.mjs
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: speedandfunction/automatization#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-05T13:42:48.295Z
Learning: Applies to workers/main/eslint.config.mjs : Linting rules should be defined in workers/main/eslint.config.mjs
Learnt from: CR
PR: speedandfunction/automatization#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-05T13:42:48.295Z
Learning: Applies to workers/main/tsconfig.json : TypeScript configuration should be defined in workers/main/tsconfig.json
📚 Learning: 2025-08-05T13:42:48.295Z
Learnt from: CR
PR: speedandfunction/automatization#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-05T13:42:48.295Z
Learning: Applies to workers/main/eslint.config.mjs : Linting rules should be defined in workers/main/eslint.config.mjs

Applied to files:

  • workers/main/eslint.config.mjs
🪛 markdownlint-cli2 (0.17.2)
memory-bank/archive/archive-eslint-naming-conventions-20250811.md

206-206: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Docker Security Scanning (n8n, Dockerfile.n8n, n8n-test:latest)
  • GitHub Check: Service Availability Check
🔇 Additional comments (1)
workers/main/eslint.config.mjs (1)

67-80: Confirm intended behavior for UPPER_CASE identifiers

I didn’t find any local docs or README entries that explicitly say “constants are camelCase.” The ESLint comment even calls these “SQL constants,” which suggests UPPER_CASE is a deliberate exemption. Please clarify which you prefer:

• If you want all identifiers (including constants) to be camelCase, drop the UPPER_CASE exemption in workers/main/eslint.config.mjs:

           filter: {
-            regex: '^[\'"].*[\'"]$|^[A-Z_]+$',
+            // Only ignore quoted names; flag UPPER_CASE as well
+            regex: '^[\'"].*[\'"]$',
             match: false
           }

• If you want to continue allowing UPPER_CASE for true constants (e.g. SQL constants), keep the current filter but add a section in README.md (or docs/) to explain that exception.

Let me know which path you’d like to take!

anatolyshipitz and others added 2 commits August 11, 2025 14:14
- Updated the archive file to include recent enhancements in ESLint naming conventions, specifically enforcing camelCase for boolean variables and functions while maintaining prefix requirements.
- Modified `eslint.config.mjs` to implement camelCase formatting for boolean variables and functions, ensuring better code consistency and readability.
- Added new rules to allow specific patterns for class/model variables and snake_case for parameters, enhancing flexibility in naming conventions.

These changes improve the linting process and enforce stricter naming standards across the TypeScript codebase, promoting maintainability and clarity.
coderabbitai[bot]
coderabbitai bot previously approved these changes Aug 11, 2025
Copy link

@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

♻️ Duplicate comments (1)
workers/main/eslint.config.mjs (1)

9-9: Include .tsx files in the TypeScript configuration scope

The current configuration only targets .ts files. Consider including .tsx files for comprehensive TypeScript support:

-    files: ['**/*.ts'],
+    files: ['**/*.ts', '**/*.tsx'],

This ensures that TypeScript React components also benefit from the naming conventions and other rules.

🧹 Nitpick comments (1)
workers/main/eslint.config.mjs (1)

126-133: Consider a more maintainable approach for class/model variable exceptions

The hardcoded list of specific variable names is not scalable and requires manual updates for each new repository or model class. Consider using a pattern-based approach:

-        {
-          selector: 'variable',
-          format: null,
-          custom: {
-            regex: '^(FinAppRepository|TargetUnitRepository|TestModel|EmployeeModel|ProjectModel|SlackServiceNoToken|SlackServiceNoChannel)$',
-            match: true
-          }
-        },
+        {
+          selector: 'variable',
+          format: ['PascalCase'],
+          filter: {
+            // Match variables ending with common suffixes for classes
+            regex: '(Repository|Model|Service|Controller|Factory|Manager)$',
+            match: true
+          }
+        },

This approach automatically handles new repositories, models, and services without requiring config updates.

📜 Review details

Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a2893db and 061120b.

⛔ Files ignored due to path filters (1)
  • memory-bank/archive/archive-eslint-naming-conventions-20250811.md is excluded by !memory-bank/**
📒 Files selected for processing (1)
  • workers/main/eslint.config.mjs (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
workers/main/eslint.config.mjs

📄 CodeRabbit Inference Engine (CLAUDE.md)

Linting rules should be defined in workers/main/eslint.config.mjs

Files:

  • workers/main/eslint.config.mjs
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
PR: speedandfunction/automatization#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-05T13:42:48.295Z
Learning: Applies to workers/main/eslint.config.mjs : Linting rules should be defined in workers/main/eslint.config.mjs
Learnt from: CR
PR: speedandfunction/automatization#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-05T13:42:48.295Z
Learning: Applies to workers/main/tsconfig.json : TypeScript configuration should be defined in workers/main/tsconfig.json
📚 Learning: 2025-08-05T13:42:48.295Z
Learnt from: CR
PR: speedandfunction/automatization#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-05T13:42:48.295Z
Learning: Applies to workers/main/eslint.config.mjs : Linting rules should be defined in workers/main/eslint.config.mjs

Applied to files:

  • workers/main/eslint.config.mjs
📚 Learning: 2025-08-05T13:42:48.295Z
Learnt from: CR
PR: speedandfunction/automatization#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-05T13:42:48.295Z
Learning: Applies to **/*.{ts,tsx} : Follow the function naming pattern: prefix? + action (A) + high context (HC) + low context? (LC), using action verbs such as get, fetch, send, create, validate, handle, calculate, and boolean prefixes is, has, should

Applied to files:

  • workers/main/eslint.config.mjs

- Revised the archive file to reflect recent updates in ESLint naming conventions, including the transition to PascalCase for boolean variables and functions, and the addition of new function prefixes such as 'setup', 'create', 'init', and 'build'.
- Enhanced `eslint.config.mjs` to implement these changes, ensuring better support for naming patterns and improved variable filtering.
- Introduced a new rule for true constants to use UPPER_CASE formatting, further refining the naming standards.

These updates enhance code quality and consistency across the TypeScript codebase, promoting maintainability and clarity.
@sonarqubecloud
Copy link

Copy link

@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: 2

♻️ Duplicate comments (1)
workers/main/eslint.config.mjs (1)

66-169: Add missing rule for const primitive variables.

The naming convention rules are missing enforcement for primitive const variables to use UPPER_CASE (e.g., const MAX_RETRIES = 5).

Add this rule after line 133:

         },
+        // True constants (primitive literals) should be UPPER_CASE
+        {
+          selector: 'variable',
+          modifiers: ['const'],
+          types: ['string', 'number', 'boolean'],
+          format: ['UPPER_CASE']
+        },
         // Parameters that can be snake_case (for API/DB compatibility)
📜 Review details

Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 061120b and 16a3ad1.

⛔ Files ignored due to path filters (1)
  • memory-bank/archive/archive-eslint-naming-conventions-20250811.md is excluded by !memory-bank/**
📒 Files selected for processing (1)
  • workers/main/eslint.config.mjs (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
workers/main/eslint.config.mjs

📄 CodeRabbit Inference Engine (CLAUDE.md)

Linting rules should be defined in workers/main/eslint.config.mjs

Files:

  • workers/main/eslint.config.mjs
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
PR: speedandfunction/automatization#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-05T13:42:48.295Z
Learning: Applies to workers/main/eslint.config.mjs : Linting rules should be defined in workers/main/eslint.config.mjs
Learnt from: CR
PR: speedandfunction/automatization#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-05T13:42:48.295Z
Learning: Applies to workers/main/tsconfig.json : TypeScript configuration should be defined in workers/main/tsconfig.json
📚 Learning: 2025-08-05T13:42:48.295Z
Learnt from: CR
PR: speedandfunction/automatization#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-05T13:42:48.295Z
Learning: Applies to workers/main/eslint.config.mjs : Linting rules should be defined in workers/main/eslint.config.mjs

Applied to files:

  • workers/main/eslint.config.mjs
📚 Learning: 2025-08-05T13:42:48.295Z
Learnt from: CR
PR: speedandfunction/automatization#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-05T13:42:48.295Z
Learning: Applies to **/*.{ts,tsx} : Follow the function naming pattern: prefix? + action (A) + high context (HC) + low context? (LC), using action verbs such as get, fetch, send, create, validate, handle, calculate, and boolean prefixes is, has, should

Applied to files:

  • workers/main/eslint.config.mjs
🔇 Additional comments (2)
workers/main/eslint.config.mjs (2)

4-4: LGTM! Import reordering is a good practice.

The reordering of the prettier import improves consistency and follows standard import sorting conventions.


9-9: ESLint scope is sufficient for current file types

I checked under workers/main and found only .ts/.test.ts files—no .tsx or .test.js files exist. The base pattern files: ['**/*.ts'] plus the npm script eslint . --ext .ts will lint all existing source and test files. No extension gaps to address at this time.

Copy link
Contributor

@killev killev left a comment

Choose a reason for hiding this comment

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

LGTM

@anatolyshipitz anatolyshipitz merged commit e29aa60 into main Aug 12, 2025
27 of 30 checks passed
@anatolyshipitz anatolyshipitz deleted the feature/eslint-naming-conventions branch August 12, 2025 14:33
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.

3 participants