-
-
Notifications
You must be signed in to change notification settings - Fork 899
refactor: add missing templates manually and remove duplicates from automation #3883
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
refactor: add missing templates manually and remove duplicates from automation #3883
Conversation
WalkthroughThe pull request updates two configuration files by adding new template entries. In config/generator-templates.json, three additional entries are appended to the existing Python Paho template. In config/tools-manual.json, six new entries are added to the "toolsList" under the AsyncAPI Generator Templates section, covering various templates such as Go Watermill, Node.js, Markdown, Python Paho, Dotnet RabbitMQ, and Node.js WebSocket. The file formatting is also adjusted to include a proper newline at the end. Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 180000ms (4)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
✅ Deploy Preview for asyncapi-website ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for asyncapi-website ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🔭 Outside diff range comments (3)
config/tools-automated.json (3)
5-12
:⚠️ Potential issueDuplicate "AsyncAPI Server API" Entry Detected
The "AsyncAPI Server API" template appears more than once in the "APIs" section. Please verify if the duplicate is intentional or if it contradicts the PR objective of removing duplicate templates.
46-88
:⚠️ Potential issueDuplicate "SIO-AsyncAPI" Entries Detected
Two identical entries for "SIO-AsyncAPI" exist. Confirm whether one of these should be removed to streamline the configuration in line with the PR objectives.
95-130
:⚠️ Potential issueDuplicate 'nestjs-asyncapi' Entries in Code-first Tools
There are two identical entries for the "nestjs-asyncapi" template. Consolidating these duplicates is recommended to avoid confusion and redundancy.
🧹 Nitpick comments (3)
config/generator-templates.json (1)
8-11
: New Template Entries AddedThe additions for the Go Watermill, .NET RabbitMQ, and TypeScript NATS templates are clearly inserted right after the existing Python Paho entry. Please verify that these entries (including key names and values) remain in full sync with the corresponding manual configuration.
config/tools-automated.json (1)
1399-1400
: Language Field ConsistencyThe "language" field for the Node.js Websockets Template is set to "javascript" (in lowercase). For consistency across the configuration, consider using a standard capitalized value (e.g. "JavaScript").
config/tools-manual.json (1)
81-92
: Template Naming Consistency IssueThe title "Dotnet RabbitMQ Template" in this file differs in formatting from the ".NET RabbitMQ" entry in the generator-templates configuration. Standardizing the naming—perhaps to ".NET RabbitMQ Template"—will help prevent confusion.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
config/generator-templates.json
(1 hunks)config/tools-automated.json
(1 hunks)config/tools-manual.json
(1 hunks)
⏰ Context from checks skipped due to timeout of 180000ms (3)
- GitHub Check: Redirect rules - asyncapi-website
- GitHub Check: Header rules - asyncapi-website
- GitHub Check: Pages changed - asyncapi-website
🔇 Additional comments (3)
config/generator-templates.json (1)
12-13
: JSON Formatting VerifiedThe file now ends with a properly formatted closing bracket and an ending newline, which enhances readability.
config/tools-automated.json (1)
1392-1509
: Review of AsyncAPI Generator Templates SectionWithin the "AsyncAPI Generator Templates" section, templates such as "Java Spring Template", "Java Spring Cloud Stream Template", and "Java Template" are still present. According to the PR description, duplicate or automated entries should be removed. Please verify whether these entries are meant to be retained or should be removed.
Likely an incorrect or invalid review comment.
config/tools-manual.json (1)
32-117
: Addition of Manual Template EntriesThe new entries under the "AsyncAPI Generator Templates" section—including the Go Watermill, Node.js, Markdown, Python Paho, Dotnet RabbitMQ, Node.js WebSocket, and TypeScript NATS templates—are well structured with clear descriptions, links, and filter definitions. Please double-check that these manually added templates are aligned with their counterparts in the generator templates configuration.
noticed that the expected changes are not reflected in the Netlify deployed preview. Could someone guide me on how to troubleshoot this? I want to ensure that the updates are correctly incorporated. Let me know if any additional steps are required. 😭 |
There was a problem hiding this 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
🧹 Nitpick comments (1)
components/tools/ToolsCard.tsx (1)
134-137
: Consider using stable keys for mapped elementsUsing array indices as keys for mapped elements in React can lead to rendering issues if items are added, removed, or reordered in the array.
If the language items have a unique identifier, consider using that instead:
- toolData.filters?.language.map((item, index) => ( - <Tag key={index} name={item.name} bgColor={item.color} borderColor={item.borderColor} /> + toolData.filters?.language.map((item) => ( + <Tag key={item.name} name={item.name} bgColor={item.color} borderColor={item.borderColor} />If
item.name
is unique across all language items, it would make a better key than the index.🧰 Tools
🪛 ESLint
[error] 134-134: Insert
················
(prettier/prettier)
[error] 135-135: Insert
················
(prettier/prettier)
[error] 136-136: Insert
················
(prettier/prettier)
[error] 137-137: Insert
················
(prettier/prettier)
🪛 GitHub Actions: PR testing - if Node project
[error] 134-134: Insert
················
prettier/prettier
[error] 135-135: Insert
················
prettier/prettier
[error] 136-136: Insert
················
prettier/prettier
[error] 137-137: Insert
················
prettier/prettier
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
components/tools/ToolsCard.tsx
(1 hunks)
🧰 Additional context used
🪛 ESLint
components/tools/ToolsCard.tsx
[error] 133-133: Insert ···
(prettier/prettier)
[error] 134-134: Insert ················
(prettier/prettier)
[error] 135-135: Insert ················
(prettier/prettier)
[error] 136-136: Insert ················
(prettier/prettier)
[error] 137-137: Insert ················
(prettier/prettier)
[error] 138-138: Insert ················
(prettier/prettier)
[error] 139-139: Insert ··
(prettier/prettier)
🪛 GitHub Actions: PR testing - if Node project
components/tools/ToolsCard.tsx
[error] 133-139: Insert ···
prettier/prettier
[error] 134-134: Insert ················
prettier/prettier
[error] 135-135: Insert ················
prettier/prettier
[error] 136-136: Insert ················
prettier/prettier
[error] 137-137: Insert ················
prettier/prettier
[error] 138-138: Insert ················
prettier/prettier
[error] 139-139: Insert ··
prettier/prettier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🔭 Outside diff range comments (2)
config/tools-automated.json (2)
1411-1445
: 🛠️ Refactor suggestionDuplicate “Node.js Multiprotocol Template” entry detected.
There are two consecutive entries for "Node.js Multiprotocol Template" (one starting at line 1411 and another at line 1429) that appear to be identical. This duplication may cause confusion in the automated template selection process.
1447-1561
:⚠️ Potential issueFix JSON structure error in AsyncAPI Generator Templates.
An extraneous sub-array has been introduced within the "toolsList" array. Specifically, the extra opening bracket at line 1447 and its corresponding closing bracket at line 1541 (plus the subsequent lines from 1543 to 1561) result in an invalid JSON structure (as indicated by the error: "Expected a property but instead found '['").
Please remove the extra "[" at line 1447, the matching "]" at line 1541, and the duplicated object that follows (lines 1543–1561), then integrate those template entries as individual objects within the parent "toolsList" array.🧰 Tools
🪛 Biome (1.9.4)
[error] 1448-1448: Expected a property but instead found '['.
Expected a property here.
(parse)
[error] 1543-1543: expected
,
but instead found"links"
Remove "links"
(parse)
🧹 Nitpick comments (1)
config/tools-automated.json (1)
1455-1465
: Verify language settings for new Java-related templates.
The "Java Spring Cloud Stream Template" entry (lines 1455–1465) uses"language": "javascript"
, which seems inconsistent with its Java-oriented title and description. Please confirm whether the language property is correct or if it should be updated (e.g. to"Java"
) to accurately reflect the template's purpose.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
config/generator-templates.json
(1 hunks)config/tools-automated.json
(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- config/generator-templates.json
🧰 Additional context used
🪛 Biome (1.9.4)
config/tools-automated.json
[error] 1448-1448: Expected a property but instead found '['.
Expected a property here.
(parse)
There was a problem hiding this 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
🔭 Outside diff range comments (2)
config/tools-automated.json (2)
1430-1444
:⚠️ Potential issuePotential Mismatch in Language Field: Java Spring Cloud Stream Template
The template titled "Java Spring Cloud Stream Template" is intended for Java-based projects; however, its filters specify"language": "javascript"
. Since the associated technology values (“Spring Cloud Streams” and “Maven”) imply a Java environment, please update the language value to"Java"
to maintain consistency and accuracy.
1449-1467
:⚠️ Potential issueLanguage Field Mismatch: Java Spring Template
Similar to the previous template, the "Java Spring Template" also has"language": "javascript"
in its filters even though the title and technologies (e.g., "Springboot", "Maven", "Gradle") indicate that it is a Java template. Adjusting the language to"Java"
would improve clarity and consistency.
🧹 Nitpick comments (1)
config/tools-automated.json (1)
1469-1485
: HTML Template Entry: Validate Language Choice
This entry for the "HTML Template" uses"language": "javascript"
while its technology array contains"HTML"
. Although this may be intentional (if the template logic is implemented in JavaScript), it might cause confusion. Please verify that this language designation is correct for your intended use case.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
config/tools-automated.json
(8 hunks)
🧰 Additional context used
🪛 Biome (1.9.4)
config/tools-automated.json
[error] 1390-1390: Expected a property but instead found '{'.
Expected a property here.
(parse)
🔇 Additional comments (3)
config/tools-automated.json (3)
1412-1418
: New Template Entry: Node.js Multiprotocol Template
The new "Node.js Multiprotocol Template" has been added with a clear and detailed description. The structure follows the expected format. Please confirm that the repository URL (https://github.com/asyncapi/nodejs-template) points to the correct resource and that the description accurately reflects its capabilities.
1487-1503
: Java Template Entry Looks Correct
The "Java Template" entry now correctly uses"language": "Java"
along with the appropriate technology tag. This update appears consistent with the overall intent and documentation.
1505-1508
: JSON Structure Finalization: Verify Correct Closure and Comma Separation
Please double-check that the "AsyncAPI Generator Templates" block (and its surrounding sections) is correctly separated using commas and that all opening braces have matching closing braces. This will ensure that the JSON file remains valid and parsable.🧰 Tools
🪛 Biome (1.9.4)
[error] 1508-1508: expected
,
but instead found"Others"
Remove "Others"
(parse)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🔭 Outside diff range comments (1)
config/tools-automated.json (1)
1418-1420
: 💡 Verification agent❓ Verification inconclusive
Language Filter Mismatch in Java-Based Templates
Both the "Java Spring Template" (lines 1411–1432) and "Java Template" (lines 1455–1473) currently set their language filter as an array containing"javascript"
. According to the PR objectives and the AI summary, Java templates should be marked with the appropriate language—ideally a single string"Java"
. Please update these language filters so that they accurately reflect the technology of the template.Proposed diff snippet for "Java Template":
- "language": [ - "javascript" - ], + "language": "Java",(Apply a similar change to the "Java Spring Template" and "Java Spring Cloud Stream Template" entries as needed.)
Action Required: Correct Language Filters for Java-Based Templates
The file
config/tools-automated.json
still incorrectly marks Java templates as"javascript"
. As noted in the PR objectives and AI summary, templates like "Java Spring Template", "Java Template", and "Java Spring Cloud Stream Template" should accurately indicate their technology. Please update these entries to use a single string"Java"
instead.
- Java Template Example:
- "language": [ - "javascript" - ], + "language": "Java",- Please apply similar changes to the "Java Spring Template" and "Java Spring Cloud Stream Template" sections.
♻️ Duplicate comments (1)
config/tools-automated.json (1)
1389-1390
: 💡 Verification agent❓ Verification inconclusive
Remove Extraneous Curly Brace Causing JSON Syntax Error
The static analysis error indicates that a stray opening brace is present before the "AsyncAPI Generator Templates" property. In the current diff, line 1389 begins with an extra “{” that disrupts the object structure. To fix the error, remove this extra brace and ensure that a comma appropriately separates the preceding property from the new one.Proposed diff:
- { - "AsyncAPI Generator Templates": { +,"AsyncAPI Generator Templates": {
Remove the Extra Curly Brace in JSON Config File
The static analysis error points to a stray opening brace at line 1389 in the
config/tools-automated.json
file, which disrupts the JSON object structure. The fix is to remove this extraneous brace and ensure a proper comma separates the previous property from the"AsyncAPI Generator Templates"
block.
- File:
config/tools-automated.json
(Line 1389)- Issue: An extra
{
is present before"AsyncAPI Generator Templates"
, causing a syntax error.- Resolution: Remove the unnecessary brace and introduce a comma to correctly delimit the properties.
Proposed diff:
- { - "AsyncAPI Generator Templates": { +,"AsyncAPI Generator Templates": {🧰 Tools
🪛 Biome (1.9.4)
[error] 1390-1390: Expected a property but instead found '{'.
Expected a property here.
(parse)
🧹 Nitpick comments (1)
config/tools-automated.json (1)
1475-1491
: Improve HTML Template Description for Clarity
The description for the "HTML Template" still contains the phrasing “generate a static docs.” For improved grammar and clarity, consider revising it to eliminate the article “a” so that it reads “generate static docs using AsyncAPI React component.”Proposed diff:
- "description": "HTML template for AsyncAPI Generator. Use it to generate a static docs. It is using AsyncAPI React component under the hood.", + "description": "HTML template for AsyncAPI Generator. Use it to generate static docs using AsyncAPI React component.",
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
config/tools-automated.json
(5 hunks)
🧰 Additional context used
🪛 Biome (1.9.4)
config/tools-automated.json
[error] 1390-1390: Expected a property but instead found '{'.
Expected a property here.
(parse)
🔇 Additional comments (1)
config/tools-automated.json (1)
1493-1509
: Clarify the Intent for the Node.js Multiprotocol Template
The PR summary mentioned removing duplicate templates; however, the "Node.js Multiprotocol Template" still appears in the diff. Please verify whether this template is intended to be retained as a unique entry or if it should be removed to eliminate duplication.No diff provided as a decision is needed.
f5952d7
to
e3874d1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (7)
config/tools-manual.json (7)
33-44
: Review: Go Watermill Template EntryThe "Go Watermill Template" entry is clear and consistent. It correctly specifies the title, description, repository link, and filters for a Go-based template. Double-check that the repo URL remains current.
45-56
: Review: Node.js Template EntryThe "Node.js Template" entry is added with the correct language filter ("JavaScript") and a precise description. Please ensure that this entry aligns with the expected functionality of generating both client and server code.
57-68
: Review: Markdown Template EntryThe "Markdown Template" entry is well defined. Although the "technology" array is empty, confirm that this is intentional and that no specific technology tag is required for Markdown-based documentation.
69-80
: Review: Python Paho Template EntryThe "Python Paho Template" entry properly addresses the need for a Python client using the Paho MQTT library. The filters accurately reflect the intended usage. Verify that the repository URL is correct and that there are no typos.
81-92
: Review: Dotnet RabbitMQ Template EntryThe "Dotnet RabbitMQ Template" entry is appropriately configured, with the language set to ".NET" and technology filtering for "RabbitMQ." Please ensure that this naming convention is consistent across related .NET entries in the project.
93-104
: Review: Node.js WebSocket Template EntryThe entry for "Node.js WebSocket Template" is clear and follows the established pattern. The filters (with "JavaScript" and "WebSocket") seem accurate. Confirm that the repository link points to the correct implementation.
105-116
: Review: TypeScript NATS Template EntryThe "TypeScript NATS Template" entry is well crafted with appropriate filters for "TypeScript" and "NATS." As with the others, verify that the provided repo URL is active and that the description meets user expectations.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
config/tools-automated.json
(1 hunks)config/tools-manual.json
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- config/tools-automated.json
🔇 Additional comments (1)
config/tools-manual.json (1)
32-117
: Overall Review: New AsyncAPI Generator Templates AddedThe new manual entries under the "AsyncAPI Generator Templates" section are well structured and follow the established schema. Each template entry includes a descriptive title, relevant repository link, and coherent filter attributes. Please verify that all repo URLs are active and accurate, and ensure that any automation-duplicated entries have been fully removed from the automated configuration files. Also, given the PR note regarding issues with the Netlify preview, kindly confirm that the deployed build correctly reflects these changes.
8b76b4d
to
e3874d1
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3883 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 21 21
Lines 667 667
Branches 113 113
=========================================
Hits 667 667 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@derberg Guess we can go ahead with this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
config/tools-manual.json (1)
32-105
: Well-structured addition of new AsyncAPI Generator templates.
The new entries for the "AsyncAPI Generator Templates" section are clear and consistent. Each template object specifies a title, description, repository link, and appropriate filters (language, technology, categories). This aligns well with the PR objectives of manually adding missing templates.Key points to verify:
- Repository URLs: Confirm that all URLs (e.g., for the Go Watermill, Node.js, Markdown, Python Paho, Dotnet RabbitMQ, and Node.js WebSocket templates) are correct and accessible.
- Filter Consistency: Check that the values used for "language" (for example, ".NET" in the Dotnet RabbitMQ Template) are consistent with any established naming conventions across the configuration files.
- Duplicate Avoidance: Since the PR also targets removing duplicate templates from automation, ensure that these manually added entries are unique compared to the automated templates and that any duplicate entries are indeed removed from the other configuration files.
Overall, the JSON structure appears valid and the changes enhance template coverage for the AsyncAPI Generator.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
config/tools-manual.json
(1 hunks)
⏰ Context from checks skipped due to timeout of 180000ms (1)
- GitHub Check: Test NodeJS PR - macos-13
There was a problem hiding this 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
🔭 Outside diff range comments (1)
config/tools-automated.json (1)
1421-1434
: 💡 Verification agent🧩 Analysis chain
Redundant Java Spring Template Entry
The "Java Spring Template" is still present although the updated guidelines indicate that this entry should be replaced by the "Java Spring Cloud Stream Template." Maintaining both may lead to ambiguity. Consider removing the outdated "Java Spring Template" entry to comply with the intended changes.
I'm going to run a shell script to verify whether the outdated "Java Spring Template" entry still exists and to check if the updated "Java Spring Cloud Stream Template" entry is present in the configuration file.
🏁 Script executed:
#!/bin/bash # Verify that the "Java Spring Template" entry exists in the configuration file. echo "Searching for 'Java Spring Template' entry:" rg '"title": "Java Spring Template"' config/tools-automated.json # Optionally, verify if the "Java Spring Cloud Stream Template" entry is present. echo "Searching for 'Java Spring Cloud Stream Template' entry:" rg '"title": "Java Spring Cloud Stream Template"' config/tools-automated.jsonLength of output: 473
Action: Remove Outdated Java Spring Template Entry
The file at
config/tools-automated.json
(lines 1421-1434) includes both the outdated "Java Spring Template" entry and the updated "Java Spring Cloud Stream Template" entry. According to the updated guidelines, the outdated entry should be removed to avoid ambiguity. Please remove the "Java Spring Template" entry to comply with the intended changes.
- File:
config/tools-automated.json
(lines 1421-1434)- Update: Remove the entry with
"title": "Java Spring Template"
while retaining"title": "Java Spring Cloud Stream Template"
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
config/tools-automated.json
(4 hunks)
🔇 Additional comments (5)
config/tools-automated.json (5)
1389-1390
: Ensure Valid JSON Formatting
Please double-check the JSON structure starting at the "AsyncAPI Generator Templates" key. Prior reviews flagged an unexpected curly brace error near line 1390—verify that commas and object boundaries are correct so that the overall JSON remains valid.
1393-1405
: Node.js Websockets Template Updated
The updated "Node.js Websockets Template" entry now provides a clear description that emphasizes its dual server–client generation capability and uses the correct repository URL. This change aligns well with the PR objective of manually adding missing templates.
1435-1448
: Java Spring Cloud Stream Template Configuration Looks Good
The new "Java Spring Cloud Stream Template" entry correctly reflects the updated configuration with the revised repository URL and filters. This update aligns with the intended shift from the outdated Spring template.
1449-1462
: Java Template Configuration Refined
The refinements in the "Java Template" entry—especially in the filters section where the language, technology, and categories have been simplified—are clear and adhere to the updated standards.
1462-1475
: HTML Template Entry Updated
The modifications made to the "HTML Template" entry provide a clearer description as well as updated filter details. This is in line with the overall objective of improving template clarity and reducing duplication.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all good, now please remove changes that are not related to this PR:
config/tools.json
- should not be modified manually. During PR work, sure, but we should not merge it as we anyway have config/tools.json that will update it- changes in
components/tools/ToolsCard.tsx
andcomponents/navigation/MobileNavMenu.tsx
are not related to this PR, and seem like coming from autoformatter
d562ef5
to
c796207
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 12
🔭 Outside diff range comments (1)
components/tools/ToolsDashboard.tsx (1)
6-15
:⚠️ Potential issueFix import organization and remove unused import.
The import for
processToolsData
should be properly ordered and the unusedToolsDataList
import should be removed.-import ToolsDataList from '../../config/tools.json'; import ToolFilter, { ToolFilterContext } from '../../context/ToolFilterContext'; import ArrowDown from '../icons/ArrowDown'; import Cross from '../icons/Cross'; import FilterIcon from '../icons/Filter'; import SearchIcon from '../icons/Search'; import CategoryDropdown from './CategoryDropdown'; import Filters from './Filters'; import ToolsList from './ToolsList'; -import { processToolsData } from '@/utils/processToolsData'; +import { processToolsData } from '@/utils/processToolsData';🧰 Tools
🪛 ESLint
[error] 1-15: Run autofix to sort these imports!
(simple-import-sort/imports)
[error] 6-6: 'ToolsDataList' is defined but never used.
(unused-imports/no-unused-imports)
[error] 6-6: 'ToolsDataList' is defined but never used.
(no-unused-vars)
[error] 15-15: Expected 1 empty line after import statement not followed by another import.
(import/newline-after-import)
[error] 15-15:
@/utils/processToolsData
import should occur before import of../../config/tools.json
(import/order)
🪛 GitHub Actions: PR testing - if Node project
[error] 6-6: Error: 'ToolsDataList' is defined but never used. unused-imports/no-unused-imports
[error] 6-6: Error: 'ToolsDataList' is defined but never used. no-unused-vars
[error] 15-15: Error: Expected 1 empty line after import statement not followed by another import. import/newline-after-import
[error] 15-15: Error:
@/utils/processToolsData
import should occur before import of../../config/tools.json
import/order
♻️ Duplicate comments (1)
config/generator-templates.json (1)
11-11
:⚠️ Potential issueRemove the archived TypeScript NATS template.
The TypeScript NATS template has been archived for a long time and should be removed as previously recommended.
- { "value": "@asyncapi/ts-nats-template", "text": "TypeScript NATS" }
🧹 Nitpick comments (2)
utils/processToolsData.ts (1)
1-247
: Improve type safety by replacing 'any' types with specific types.The code uses
any
types in several places which reduces type safety. Consider defining more specific types for better type checking.For example:
- Replace
(tag: any)
with proper type definitions- Replace
links: any
with a more specific type definition- Replace
(source: any)
with a more specific type definition- Replace
([category, data]: [string, any])
with proper types- Replace
(tool: any)
with proper types🧰 Tools
🪛 ESLint
[error] 1-7: Run autofix to sort these imports!
(simple-import-sort/imports)
[error] 9-12: Delete
⏎⏎⏎
(prettier/prettier)
[error] 9-12: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 16-19: Delete
⏎⏎⏎
(prettier/prettier)
[error] 16-19: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 19-19: Expected space or tab after '//' in comment.
(spaced-comment)
[error] 21-22: Delete
⏎
(prettier/prettier)
[error] 30-31: Delete
⏎
(prettier/prettier)
[error] 40-41: Delete
⏎
(prettier/prettier)
[error] 42-46: Replace
⏎}⏎⏎⏎
with}
(prettier/prettier)
[error] 45-48: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 48-50: Block must not be padded by blank lines.
(padded-blocks)
[error] 48-49: Delete
⏎
(prettier/prettier)
[error] 54-57: Delete
⏎⏎⏎
(prettier/prettier)
[error] 54-57: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 61-64: Delete
⏎⏎⏎
(prettier/prettier)
[error] 61-64: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 66-68: Block must not be padded by blank lines.
(padded-blocks)
[error] 66-67: Delete
⏎
(prettier/prettier)
[error] 68-70: Block must not be padded by blank lines.
(padded-blocks)
[error] 69-71: Replace
⏎······tagColorMap[tag.name]·=·{⏎
with······tagColorMap[tag.name]·=·{
(prettier/prettier)
[error] 74-75: Delete
⏎
(prettier/prettier)
[error] 76-78: Block must not be padded by blank lines.
(padded-blocks)
[error] 77-79: Replace
⏎····});⏎
with····});
(prettier/prettier)
[error] 78-80: Block must not be padded by blank lines.
(padded-blocks)
[error] 80-82: Block must not be padded by blank lines.
(padded-blocks)
[error] 80-81: Delete
⏎
(prettier/prettier)
[error] 84-86: Block must not be padded by blank lines.
(padded-blocks)
[error] 85-87: Replace
⏎······tagColorMap[tag.name]·=·{⏎
with······tagColorMap[tag.name]·=·{
(prettier/prettier)
[error] 91-93: Replace
⏎······};⏎
with······};
(prettier/prettier)
[error] 92-94: Block must not be padded by blank lines.
(padded-blocks)
[error] 94-97: Delete
⏎⏎⏎
(prettier/prettier)
[error] 96-99: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 99-101: Block must not be padded by blank lines.
(padded-blocks)
[error] 100-102: Replace
⏎······tagColorMap[tag.name]·=·{⏎
with······tagColorMap[tag.name]·=·{
(prettier/prettier)
[error] 106-108: Replace
⏎······};⏎
with······};
(prettier/prettier)
[error] 107-109: Block must not be padded by blank lines.
(padded-blocks)
[error] 109-111: Block must not be padded by blank lines.
(padded-blocks)
[error] 110-114: Replace
⏎··}⏎⏎⏎
with··}
(prettier/prettier)
[error] 113-116: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 120-123: Delete
⏎⏎⏎
(prettier/prettier)
[error] 120-123: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 125-127: Block must not be padded by blank lines.
(padded-blocks)
[error] 125-126: Delete
⏎
(prettier/prettier)
[error] 129-130: Delete
⏎
(prettier/prettier)
[error] 132-133: Delete
⏎
(prettier/prettier)
[error] 138-140: Replace
⏎········}))⏎
with········}))
(prettier/prettier)
[error] 141-144: Delete
⏎⏎⏎
(prettier/prettier)
[error] 143-146: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 149-150: Delete
⏎
(prettier/prettier)
[error] 151-152: Replace
⏎
with··
(prettier/prettier)
[error] 153-154: Replace
⏎
with··
(prettier/prettier)
[error] 156-156: Insert
··
(prettier/prettier)
[error] 158-158: Insert
··
(prettier/prettier)
[error] 159-160: Replace
⏎········
with··········
(prettier/prettier)
[error] 161-163: Replace
⏎······]⏎
with········]
(prettier/prettier)
[error] 166-169: Delete
⏎⏎⏎
(prettier/prettier)
[error] 166-169: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 171-172: Delete
⏎
(prettier/prettier)
[error] 179-180: Delete
⏎
(prettier/prettier)
[error] 190-192: Replace
⏎······}⏎
with······}
(prettier/prettier)
[error] 193-194: Delete
⏎
(prettier/prettier)
[error] 193-195: Block must not be padded by blank lines.
(padded-blocks)
[error] 197-200: Delete
⏎⏎⏎
(prettier/prettier)
[error] 197-200: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 202-204: Block must not be padded by blank lines.
(padded-blocks)
[error] 202-203: Delete
⏎
(prettier/prettier)
[error] 204-206: Block must not be padded by blank lines.
(padded-blocks)
[error] 205-206: Delete
⏎
(prettier/prettier)
[error] 206-208: Block must not be padded by blank lines.
(padded-blocks)
[error] 207-209: Replace
⏎········result[category]·=·{⏎
with········result[category]·=·{
(prettier/prettier)
[error] 213-214: Delete
⏎
(prettier/prettier)
[error] 214-216: Block must not be padded by blank lines.
(padded-blocks)
[error] 215-219: Replace
⏎······}⏎⏎⏎
with······}
(prettier/prettier)
[error] 218-221: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 221-223: Block must not be padded by blank lines.
(padded-blocks)
[error] 221-222: Delete
⏎
(prettier/prettier)
[error] 223-225: Block must not be padded by blank lines.
(padded-blocks)
[error] 224-225: Delete
⏎
(prettier/prettier)
[error] 225-227: Block must not be padded by blank lines.
(padded-blocks)
[error] 226-227: Delete
⏎
(prettier/prettier)
[error] 227-229: Block must not be padded by blank lines.
(padded-blocks)
[error] 228-230: Replace
⏎······}⏎
with······}
(prettier/prettier)
[error] 229-231: Block must not be padded by blank lines.
(padded-blocks)
[error] 231-233: Block must not be padded by blank lines.
(padded-blocks)
[error] 232-233: Delete
⏎
(prettier/prettier)
[error] 235-238: Delete
⏎⏎⏎
(prettier/prettier)
[error] 235-238: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 242-245: Delete
⏎⏎⏎
(prettier/prettier)
[error] 242-245: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 245-247: Block must not be padded by blank lines.
(padded-blocks)
[error] 246-247: Replace
⏎};
with};⏎
(prettier/prettier)
[error] 247-247: Newline required at end of file but not found.
(eol-last)
config/tools-manual.json (1)
32-117
: Validation of New Manual Template Entries
The new entries under the "AsyncAPI Generator Templates" section are well-structured and consistent. Each template object includes the expected keys ("title", "description", "links", and "filters") with a uniform schema. Please verify that these manually added templates do not reintroduce duplicates previously eliminated from the automation process. Also, ensure that any references or integrations (e.g., in components/tools/ToolsDashboard.tsx via processToolsData()) have been updated accordingly to use these manual entries.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
components/navigation/MobileNavMenu.tsx
(3 hunks)components/tools/ToolsCard.tsx
(1 hunks)components/tools/ToolsDashboard.tsx
(2 hunks)config/generator-templates.json
(1 hunks)config/tools-automated.json
(4 hunks)config/tools-manual.json
(1 hunks)config/tools.json
(0 hunks)pages/casestudies/[id].tsx
(1 hunks)utils/processToolsData.ts
(1 hunks)
💤 Files with no reviewable changes (1)
- config/tools.json
🚧 Files skipped from review as they are similar to previous changes (3)
- components/tools/ToolsCard.tsx
- components/navigation/MobileNavMenu.tsx
- config/tools-automated.json
🧰 Additional context used
🧬 Code Definitions (1)
components/tools/ToolsDashboard.tsx (2)
utils/processToolsData.ts (1)
processToolsData
(48-247)types/components/tools/ToolDataType.ts (1)
ToolsListData
(40-46)
🪛 ESLint
utils/processToolsData.ts
[error] 1-7: Run autofix to sort these imports!
(simple-import-sort/imports)
[error] 9-12: Delete ⏎⏎⏎
(prettier/prettier)
[error] 9-12: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 16-19: Delete ⏎⏎⏎
(prettier/prettier)
[error] 16-19: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 19-19: Expected space or tab after '//' in comment.
(spaced-comment)
[error] 21-22: Delete ⏎
(prettier/prettier)
[error] 30-31: Delete ⏎
(prettier/prettier)
[error] 40-41: Delete ⏎
(prettier/prettier)
[error] 42-46: Replace ⏎}⏎⏎⏎
with }
(prettier/prettier)
[error] 45-48: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 48-50: Block must not be padded by blank lines.
(padded-blocks)
[error] 48-49: Delete ⏎
(prettier/prettier)
[error] 54-57: Delete ⏎⏎⏎
(prettier/prettier)
[error] 54-57: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 61-64: Delete ⏎⏎⏎
(prettier/prettier)
[error] 61-64: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 66-68: Block must not be padded by blank lines.
(padded-blocks)
[error] 66-67: Delete ⏎
(prettier/prettier)
[error] 68-70: Block must not be padded by blank lines.
(padded-blocks)
[error] 69-71: Replace ⏎······tagColorMap[tag.name]·=·{⏎
with ······tagColorMap[tag.name]·=·{
(prettier/prettier)
[error] 74-75: Delete ⏎
(prettier/prettier)
[error] 76-78: Block must not be padded by blank lines.
(padded-blocks)
[error] 77-79: Replace ⏎····});⏎
with ····});
(prettier/prettier)
[error] 78-80: Block must not be padded by blank lines.
(padded-blocks)
[error] 80-82: Block must not be padded by blank lines.
(padded-blocks)
[error] 80-81: Delete ⏎
(prettier/prettier)
[error] 84-86: Block must not be padded by blank lines.
(padded-blocks)
[error] 85-87: Replace ⏎······tagColorMap[tag.name]·=·{⏎
with ······tagColorMap[tag.name]·=·{
(prettier/prettier)
[error] 91-93: Replace ⏎······};⏎
with ······};
(prettier/prettier)
[error] 92-94: Block must not be padded by blank lines.
(padded-blocks)
[error] 94-97: Delete ⏎⏎⏎
(prettier/prettier)
[error] 96-99: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 99-101: Block must not be padded by blank lines.
(padded-blocks)
[error] 100-102: Replace ⏎······tagColorMap[tag.name]·=·{⏎
with ······tagColorMap[tag.name]·=·{
(prettier/prettier)
[error] 106-108: Replace ⏎······};⏎
with ······};
(prettier/prettier)
[error] 107-109: Block must not be padded by blank lines.
(padded-blocks)
[error] 109-111: Block must not be padded by blank lines.
(padded-blocks)
[error] 110-114: Replace ⏎··}⏎⏎⏎
with ··}
(prettier/prettier)
[error] 113-116: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 120-123: Delete ⏎⏎⏎
(prettier/prettier)
[error] 120-123: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 125-127: Block must not be padded by blank lines.
(padded-blocks)
[error] 125-126: Delete ⏎
(prettier/prettier)
[error] 129-130: Delete ⏎
(prettier/prettier)
[error] 132-133: Delete ⏎
(prettier/prettier)
[error] 138-140: Replace ⏎········}))⏎
with ········}))
(prettier/prettier)
[error] 141-144: Delete ⏎⏎⏎
(prettier/prettier)
[error] 143-146: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 149-150: Delete ⏎
(prettier/prettier)
[error] 151-152: Replace ⏎
with ··
(prettier/prettier)
[error] 153-154: Replace ⏎
with ··
(prettier/prettier)
[error] 156-156: Insert ··
(prettier/prettier)
[error] 158-158: Insert ··
(prettier/prettier)
[error] 159-160: Replace ⏎········
with ··········
(prettier/prettier)
[error] 161-163: Replace ⏎······]⏎
with ········]
(prettier/prettier)
[error] 166-169: Delete ⏎⏎⏎
(prettier/prettier)
[error] 166-169: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 171-172: Delete ⏎
(prettier/prettier)
[error] 179-180: Delete ⏎
(prettier/prettier)
[error] 190-192: Replace ⏎······}⏎
with ······}
(prettier/prettier)
[error] 193-194: Delete ⏎
(prettier/prettier)
[error] 193-195: Block must not be padded by blank lines.
(padded-blocks)
[error] 197-200: Delete ⏎⏎⏎
(prettier/prettier)
[error] 197-200: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 202-204: Block must not be padded by blank lines.
(padded-blocks)
[error] 202-203: Delete ⏎
(prettier/prettier)
[error] 204-206: Block must not be padded by blank lines.
(padded-blocks)
[error] 205-206: Delete ⏎
(prettier/prettier)
[error] 206-208: Block must not be padded by blank lines.
(padded-blocks)
[error] 207-209: Replace ⏎········result[category]·=·{⏎
with ········result[category]·=·{
(prettier/prettier)
[error] 213-214: Delete ⏎
(prettier/prettier)
[error] 214-216: Block must not be padded by blank lines.
(padded-blocks)
[error] 215-219: Replace ⏎······}⏎⏎⏎
with ······}
(prettier/prettier)
[error] 218-221: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 221-223: Block must not be padded by blank lines.
(padded-blocks)
[error] 221-222: Delete ⏎
(prettier/prettier)
[error] 223-225: Block must not be padded by blank lines.
(padded-blocks)
[error] 224-225: Delete ⏎
(prettier/prettier)
[error] 225-227: Block must not be padded by blank lines.
(padded-blocks)
[error] 226-227: Delete ⏎
(prettier/prettier)
[error] 227-229: Block must not be padded by blank lines.
(padded-blocks)
[error] 228-230: Replace ⏎······}⏎
with ······}
(prettier/prettier)
[error] 229-231: Block must not be padded by blank lines.
(padded-blocks)
[error] 231-233: Block must not be padded by blank lines.
(padded-blocks)
[error] 232-233: Delete ⏎
(prettier/prettier)
[error] 235-238: Delete ⏎⏎⏎
(prettier/prettier)
[error] 235-238: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 242-245: Delete ⏎⏎⏎
(prettier/prettier)
[error] 242-245: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 245-247: Block must not be padded by blank lines.
(padded-blocks)
[error] 246-247: Replace ⏎};
with };⏎
(prettier/prettier)
[error] 247-247: Newline required at end of file but not found.
(eol-last)
pages/casestudies/[id].tsx
[error] 45-45: Insert ·
(prettier/prettier)
components/tools/ToolsDashboard.tsx
[error] 15-15: Expected 1 empty line after import statement not followed by another import.
(import/newline-after-import)
[error] 15-15: @/utils/processToolsData
import should occur before import of ../../config/tools.json
(import/order)
[error] 16-16: Expected blank line after variable declarations.
(newline-after-var)
🪛 GitHub Actions: PR testing - if Node project
pages/casestudies/[id].tsx
[error] 45-45: Error: Insert ·
prettier/prettier
components/tools/ToolsDashboard.tsx
[error] 1-1: Error: Run autofix to sort these imports! simple-import-sort/imports
[error] 6-6: Error: 'ToolsDataList' is defined but never used. unused-imports/no-unused-imports
[error] 6-6: Error: 'ToolsDataList' is defined but never used. no-unused-vars
[error] 15-15: Error: Expected 1 empty line after import statement not followed by another import. import/newline-after-import
[error] 15-15: Error: @/utils/processToolsData
import should occur before import of ../../config/tools.json
import/order
[error] 16-16: Error: Expected blank line after variable declarations. newline-after-var
[error] 17-17: Error: Expected line before comment. lines-around-comment
[error] 20-20: Error: Expected blank line before this statement. padding-line-between-statements
🔇 Additional comments (1)
components/tools/ToolsDashboard.tsx (1)
62-63
: Add explicit type to improve type safety.Good addition of the explicit type annotation to the
useMemo
hook for better type safety.
utils/processToolsData.ts
Outdated
interface RawToolData { | ||
|
||
title: string; | ||
|
||
description: string | null; | ||
|
||
links: any; | ||
|
||
filters: { | ||
|
||
categories?: string[]; | ||
|
||
hasCommercial: boolean; | ||
|
||
isAsyncAPIOwner: boolean; | ||
|
||
language?: string; | ||
|
||
technology?: string[]; | ||
|
||
}; | ||
|
||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix formatting in interface definition.
The interface definition has inconsistent spacing and excessive blank lines.
-interface RawToolData {
-
- title: string;
-
- description: string | null;
-
- links: any;
-
- filters: {
-
- categories?: string[];
-
- hasCommercial: boolean;
-
- isAsyncAPIOwner: boolean;
-
- language?: string;
-
- technology?: string[];
-
- };
-
-}
+interface RawToolData {
+ title: string;
+ description: string | null;
+ links: any;
+ filters: {
+ categories?: string[];
+ hasCommercial: boolean;
+ isAsyncAPIOwner: boolean;
+ language?: string;
+ technology?: string[];
+ };
+}
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
interface RawToolData { | |
title: string; | |
description: string | null; | |
links: any; | |
filters: { | |
categories?: string[]; | |
hasCommercial: boolean; | |
isAsyncAPIOwner: boolean; | |
language?: string; | |
technology?: string[]; | |
}; | |
} | |
interface RawToolData { | |
title: string; | |
description: string | null; | |
links: any; | |
filters: { | |
categories?: string[]; | |
hasCommercial: boolean; | |
isAsyncAPIOwner: boolean; | |
language?: string; | |
technology?: string[]; | |
}; | |
} |
🧰 Tools
🪛 ESLint
[error] 21-22: Delete ⏎
(prettier/prettier)
[error] 30-31: Delete ⏎
(prettier/prettier)
[error] 40-41: Delete ⏎
(prettier/prettier)
utils/processToolsData.ts
Outdated
|
||
|
||
|
||
|
||
// Caching and return the result data from the result object | ||
|
||
cachedToolsData = result; | ||
|
||
|
||
|
||
|
||
return result; | ||
|
||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix formatting in caching and return logic.
The caching and return logic has excessive blank lines and is missing a newline at the end of file.
-
-
-
-
- // Caching and return the result data from the result object
-
- cachedToolsData = result;
-
-
-
-
-
- return result;
-
-};
+ // Caching and return the result data from the result object
+ cachedToolsData = result;
+
+ return result;
+};
+
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
// Caching and return the result data from the result object | |
cachedToolsData = result; | |
return result; | |
}; | |
// Caching and return the result data from the result object | |
cachedToolsData = result; | |
return result; | |
}; |
🧰 Tools
🪛 ESLint
[error] 235-238: Delete ⏎⏎⏎
(prettier/prettier)
[error] 235-238: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 242-245: Delete ⏎⏎⏎
(prettier/prettier)
[error] 242-245: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 245-247: Block must not be padded by blank lines.
(padded-blocks)
[error] 246-247: Replace ⏎};
with };⏎
(prettier/prettier)
[error] 247-247: Newline required at end of file but not found.
(eol-last)
utils/processToolsData.ts
Outdated
|
||
|
||
|
||
// Caching the processed results to avoid unnecessary reprocessing of the data | ||
|
||
let cachedToolsData: ToolsListData | null = null; | ||
|
||
|
||
|
||
|
||
//Interface for tool object data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix formatting: Remove excessive blank lines and add spacing in comment.
There are too many blank lines and the comment is missing a space after the slashes.
-
-
-
-
-// Caching the processed results to avoid unnecessary reprocessing of the data
-
-let cachedToolsData: ToolsListData | null = null;
-
-
-
-
-
-//Interface for tool object data
+// Caching the processed results to avoid unnecessary reprocessing of the data
+let cachedToolsData: ToolsListData | null = null;
+
+// Interface for tool object data
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
// Caching the processed results to avoid unnecessary reprocessing of the data | |
let cachedToolsData: ToolsListData | null = null; | |
//Interface for tool object data | |
// Caching the processed results to avoid unnecessary reprocessing of the data | |
let cachedToolsData: ToolsListData | null = null; | |
// Interface for tool object data |
🧰 Tools
🪛 ESLint
[error] 9-12: Delete ⏎⏎⏎
(prettier/prettier)
[error] 9-12: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 16-19: Delete ⏎⏎⏎
(prettier/prettier)
[error] 16-19: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 19-19: Expected space or tab after '//' in comment.
(spaced-comment)
utils/processToolsData.ts
Outdated
|
||
|
||
|
||
// Initializing the result object to store the processed tools data in the required format | ||
|
||
const result: ToolsListData = {}; | ||
|
||
|
||
|
||
|
||
// Helper function to process a tool object and return the processed tool object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix formatting in result object initialization.
The result object initialization has excessive blank lines.
-
-
-
-
- // Initializing the result object to store the processed tools data in the required format
-
- const result: ToolsListData = {};
-
-
-
-
+ // Initializing the result object to store the processed tools data in the required format
+ const result: ToolsListData = {};
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
// Initializing the result object to store the processed tools data in the required format | |
const result: ToolsListData = {}; | |
// Helper function to process a tool object and return the processed tool object | |
// Initializing the result object to store the processed tools data in the required format | |
const result: ToolsListData = {}; | |
// Helper function to process a tool object and return the processed tool object |
🧰 Tools
🪛 ESLint
[error] 113-116: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 120-123: Delete ⏎⏎⏎
(prettier/prettier)
[error] 120-123: More than 1 blank line not allowed.
(no-multiple-empty-lines)
utils/processToolsData.ts
Outdated
|
||
|
||
|
||
export const processToolsData = (): ToolsListData => { | ||
|
||
// Returning the cached data if available in the memory | ||
|
||
if (cachedToolsData) return cachedToolsData; | ||
|
||
|
||
|
||
|
||
// Creating a tag color lookup mapping from the allTags data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix formatting in function declaration.
The function declaration has excessive blank lines and inconsistent spacing.
-
-
-
-
-export const processToolsData = (): ToolsListData => {
-
- // Returning the cached data if available in the memory
-
- if (cachedToolsData) return cachedToolsData;
-
-
-
-
+export const processToolsData = (): ToolsListData => {
+ // Returning the cached data if available in the memory
+ if (cachedToolsData) return cachedToolsData;
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
export const processToolsData = (): ToolsListData => { | |
// Returning the cached data if available in the memory | |
if (cachedToolsData) return cachedToolsData; | |
// Creating a tag color lookup mapping from the allTags data | |
export const processToolsData = (): ToolsListData => { | |
// Returning the cached data if available in the memory | |
if (cachedToolsData) return cachedToolsData; | |
// Creating a tag color lookup mapping from the allTags data |
🧰 Tools
🪛 ESLint
[error] 45-48: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 48-50: Block must not be padded by blank lines.
(padded-blocks)
[error] 48-49: Delete ⏎
(prettier/prettier)
[error] 54-57: Delete ⏎⏎⏎
(prettier/prettier)
[error] 54-57: More than 1 blank line not allowed.
(no-multiple-empty-lines)
8723234
to
86c1802
Compare
There was a problem hiding this 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
🔭 Outside diff range comments (1)
components/tools/ToolsDashboard.tsx (1)
6-6
:⚠️ Potential issueRemove unused import for ToolsDataList.
The
ToolsDataList
import is no longer used since you've switched to usingprocessToolsData()
.-import ToolsDataList from '../../config/tools.json';
🧰 Tools
🪛 ESLint
[error] 6-6: 'ToolsDataList' is defined but never used.
(unused-imports/no-unused-imports)
[error] 6-6: 'ToolsDataList' is defined but never used.
(no-unused-vars)
🪛 GitHub Actions: PR testing - if Node project
[error] 6-6: Error: 'ToolsDataList' is defined but never used. unused-imports/no-unused-imports
[error] 6-6: Error: 'ToolsDataList' is defined but never used. no-unused-vars
♻️ Duplicate comments (2)
pages/casestudies/[id].tsx (1)
45-45
:⚠️ Potential issueFix formatting: Add a space after the type annotation colon.
The type annotation needs a space after the colon to comply with the project's formatting standards.
- let typeStyle:HeadingTypeStyle; + let typeStyle: HeadingTypeStyle;🧰 Tools
🪛 ESLint
[error] 45-45: Insert
·
(prettier/prettier)
🪛 GitHub Actions: PR testing - if Node project
[error] 45-45: Error: Insert
·
prettier/prettierutils/processToolsData.ts (1)
1-247
:⚠️ Potential issueFix numerous formatting issues throughout the file.
This file has multiple formatting issues including excessive blank lines, missing spaces in comments, and inconsistent indentation. These issues are causing CI pipeline failures.
Apply these formatting changes:
- Sort imports:
-import allTags from '../config/all-tags.json'; - -import automatedTools from '../config/tools-automated.json'; - -import manualTools from '../config/tools-manual.json'; - -import type { ToolData, ToolsListData } from '../types/components/tools/ToolDataType'; +import type { ToolData, ToolsListData } from '../types/components/tools/ToolDataType'; + +import allTags from '../config/all-tags.json'; +import automatedTools from '../config/tools-automated.json'; +import manualTools from '../config/tools-manual.json';
- Fix comment spacing:
-//Interface for tool object data +// Interface for tool object data
- Fix interface formatting:
-interface RawToolData { - - title: string; - - description: string | null; - - links: any; - - filters: { - - categories?: string[]; - - hasCommercial: boolean; - - isAsyncAPIOwner: boolean; - - language?: string; - - technology?: string[]; - - }; - -} +interface RawToolData { + title: string; + description: string | null; + links: any; + filters: { + categories?: string[]; + hasCommercial: boolean; + isAsyncAPIOwner: boolean; + language?: string; + technology?: string[]; + }; +}
Fix function formatting and remove excessive blank lines throughout the file.
Add a newline at the end of the file.
I recommend running your code formatter (Prettier) on this file to automatically fix all these issues.
🧰 Tools
🪛 ESLint
[error] 1-7: Run autofix to sort these imports!
(simple-import-sort/imports)
[error] 9-12: Delete
⏎⏎⏎
(prettier/prettier)
[error] 9-12: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 16-19: Delete
⏎⏎⏎
(prettier/prettier)
[error] 16-19: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 19-19: Expected space or tab after '//' in comment.
(spaced-comment)
[error] 21-22: Delete
⏎
(prettier/prettier)
[error] 30-31: Delete
⏎
(prettier/prettier)
[error] 40-41: Delete
⏎
(prettier/prettier)
[error] 42-46: Replace
⏎}⏎⏎⏎
with}
(prettier/prettier)
[error] 45-48: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 48-50: Block must not be padded by blank lines.
(padded-blocks)
[error] 48-49: Delete
⏎
(prettier/prettier)
[error] 54-57: Delete
⏎⏎⏎
(prettier/prettier)
[error] 54-57: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 61-64: Delete
⏎⏎⏎
(prettier/prettier)
[error] 61-64: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 66-68: Block must not be padded by blank lines.
(padded-blocks)
[error] 66-67: Delete
⏎
(prettier/prettier)
[error] 68-70: Block must not be padded by blank lines.
(padded-blocks)
[error] 69-71: Replace
⏎······tagColorMap[tag.name]·=·{⏎
with······tagColorMap[tag.name]·=·{
(prettier/prettier)
[error] 74-75: Delete
⏎
(prettier/prettier)
[error] 76-78: Block must not be padded by blank lines.
(padded-blocks)
[error] 77-79: Replace
⏎····});⏎
with····});
(prettier/prettier)
[error] 78-80: Block must not be padded by blank lines.
(padded-blocks)
[error] 80-82: Block must not be padded by blank lines.
(padded-blocks)
[error] 80-81: Delete
⏎
(prettier/prettier)
[error] 84-86: Block must not be padded by blank lines.
(padded-blocks)
[error] 85-87: Replace
⏎······tagColorMap[tag.name]·=·{⏎
with······tagColorMap[tag.name]·=·{
(prettier/prettier)
[error] 91-93: Replace
⏎······};⏎
with······};
(prettier/prettier)
[error] 92-94: Block must not be padded by blank lines.
(padded-blocks)
[error] 94-97: Delete
⏎⏎⏎
(prettier/prettier)
[error] 96-99: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 99-101: Block must not be padded by blank lines.
(padded-blocks)
[error] 100-102: Replace
⏎······tagColorMap[tag.name]·=·{⏎
with······tagColorMap[tag.name]·=·{
(prettier/prettier)
[error] 106-108: Replace
⏎······};⏎
with······};
(prettier/prettier)
[error] 107-109: Block must not be padded by blank lines.
(padded-blocks)
[error] 109-111: Block must not be padded by blank lines.
(padded-blocks)
[error] 110-114: Replace
⏎··}⏎⏎⏎
with··}
(prettier/prettier)
[error] 113-116: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 120-123: Delete
⏎⏎⏎
(prettier/prettier)
[error] 120-123: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 125-127: Block must not be padded by blank lines.
(padded-blocks)
[error] 125-126: Delete
⏎
(prettier/prettier)
[error] 129-130: Delete
⏎
(prettier/prettier)
[error] 132-133: Delete
⏎
(prettier/prettier)
[error] 138-140: Replace
⏎········}))⏎
with········}))
(prettier/prettier)
[error] 141-144: Delete
⏎⏎⏎
(prettier/prettier)
[error] 143-146: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 149-150: Delete
⏎
(prettier/prettier)
[error] 151-152: Replace
⏎
with··
(prettier/prettier)
[error] 153-154: Replace
⏎
with··
(prettier/prettier)
[error] 156-156: Insert
··
(prettier/prettier)
[error] 158-158: Insert
··
(prettier/prettier)
[error] 159-160: Replace
⏎········
with··········
(prettier/prettier)
[error] 161-163: Replace
⏎······]⏎
with········]
(prettier/prettier)
[error] 166-169: Delete
⏎⏎⏎
(prettier/prettier)
[error] 166-169: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 171-172: Delete
⏎
(prettier/prettier)
[error] 179-180: Delete
⏎
(prettier/prettier)
[error] 190-192: Replace
⏎······}⏎
with······}
(prettier/prettier)
[error] 193-194: Delete
⏎
(prettier/prettier)
[error] 193-195: Block must not be padded by blank lines.
(padded-blocks)
[error] 197-200: Delete
⏎⏎⏎
(prettier/prettier)
[error] 197-200: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 202-204: Block must not be padded by blank lines.
(padded-blocks)
[error] 202-203: Delete
⏎
(prettier/prettier)
[error] 204-206: Block must not be padded by blank lines.
(padded-blocks)
[error] 205-206: Delete
⏎
(prettier/prettier)
[error] 206-208: Block must not be padded by blank lines.
(padded-blocks)
[error] 207-209: Replace
⏎········result[category]·=·{⏎
with········result[category]·=·{
(prettier/prettier)
[error] 213-214: Delete
⏎
(prettier/prettier)
[error] 214-216: Block must not be padded by blank lines.
(padded-blocks)
[error] 215-219: Replace
⏎······}⏎⏎⏎
with······}
(prettier/prettier)
[error] 218-221: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 221-223: Block must not be padded by blank lines.
(padded-blocks)
[error] 221-222: Delete
⏎
(prettier/prettier)
[error] 223-225: Block must not be padded by blank lines.
(padded-blocks)
[error] 224-225: Delete
⏎
(prettier/prettier)
[error] 225-227: Block must not be padded by blank lines.
(padded-blocks)
[error] 226-227: Delete
⏎
(prettier/prettier)
[error] 227-229: Block must not be padded by blank lines.
(padded-blocks)
[error] 228-230: Replace
⏎······}⏎
with······}
(prettier/prettier)
[error] 229-231: Block must not be padded by blank lines.
(padded-blocks)
[error] 231-233: Block must not be padded by blank lines.
(padded-blocks)
[error] 232-233: Delete
⏎
(prettier/prettier)
[error] 235-238: Delete
⏎⏎⏎
(prettier/prettier)
[error] 235-238: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 242-245: Delete
⏎⏎⏎
(prettier/prettier)
[error] 242-245: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 245-247: Block must not be padded by blank lines.
(padded-blocks)
[error] 246-247: Replace
⏎};
with};⏎
(prettier/prettier)
[error] 247-247: Newline required at end of file but not found.
(eol-last)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
components/navigation/MobileNavMenu.tsx
(3 hunks)components/tools/ToolsCard.tsx
(1 hunks)components/tools/ToolsDashboard.tsx
(2 hunks)config/generator-templates.json
(1 hunks)config/tools-automated.json
(4 hunks)config/tools-manual.json
(1 hunks)pages/casestudies/[id].tsx
(1 hunks)utils/processToolsData.ts
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
- components/navigation/MobileNavMenu.tsx
- components/tools/ToolsCard.tsx
- config/generator-templates.json
🧰 Additional context used
🧬 Code Definitions (1)
components/tools/ToolsDashboard.tsx (2)
utils/processToolsData.ts (1)
processToolsData
(48-247)types/components/tools/ToolDataType.ts (1)
ToolsListData
(40-46)
🪛 ESLint
components/tools/ToolsDashboard.tsx
[error] 15-15: Expected 1 empty line after import statement not followed by another import.
(import/newline-after-import)
[error] 15-15: @/utils/processToolsData
import should occur before import of ../../config/tools.json
(import/order)
[error] 16-16: Expected blank line after variable declarations.
(newline-after-var)
pages/casestudies/[id].tsx
[error] 45-45: Insert ·
(prettier/prettier)
utils/processToolsData.ts
[error] 1-7: Run autofix to sort these imports!
(simple-import-sort/imports)
[error] 9-12: Delete ⏎⏎⏎
(prettier/prettier)
[error] 9-12: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 16-19: Delete ⏎⏎⏎
(prettier/prettier)
[error] 16-19: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 19-19: Expected space or tab after '//' in comment.
(spaced-comment)
[error] 21-22: Delete ⏎
(prettier/prettier)
[error] 30-31: Delete ⏎
(prettier/prettier)
[error] 40-41: Delete ⏎
(prettier/prettier)
[error] 42-46: Replace ⏎}⏎⏎⏎
with }
(prettier/prettier)
[error] 45-48: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 48-50: Block must not be padded by blank lines.
(padded-blocks)
[error] 48-49: Delete ⏎
(prettier/prettier)
[error] 54-57: Delete ⏎⏎⏎
(prettier/prettier)
[error] 54-57: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 61-64: Delete ⏎⏎⏎
(prettier/prettier)
[error] 61-64: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 66-68: Block must not be padded by blank lines.
(padded-blocks)
[error] 66-67: Delete ⏎
(prettier/prettier)
[error] 68-70: Block must not be padded by blank lines.
(padded-blocks)
[error] 69-71: Replace ⏎······tagColorMap[tag.name]·=·{⏎
with ······tagColorMap[tag.name]·=·{
(prettier/prettier)
[error] 74-75: Delete ⏎
(prettier/prettier)
[error] 76-78: Block must not be padded by blank lines.
(padded-blocks)
[error] 77-79: Replace ⏎····});⏎
with ····});
(prettier/prettier)
[error] 78-80: Block must not be padded by blank lines.
(padded-blocks)
[error] 80-82: Block must not be padded by blank lines.
(padded-blocks)
[error] 80-81: Delete ⏎
(prettier/prettier)
[error] 84-86: Block must not be padded by blank lines.
(padded-blocks)
[error] 85-87: Replace ⏎······tagColorMap[tag.name]·=·{⏎
with ······tagColorMap[tag.name]·=·{
(prettier/prettier)
[error] 91-93: Replace ⏎······};⏎
with ······};
(prettier/prettier)
[error] 92-94: Block must not be padded by blank lines.
(padded-blocks)
[error] 94-97: Delete ⏎⏎⏎
(prettier/prettier)
[error] 96-99: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 99-101: Block must not be padded by blank lines.
(padded-blocks)
[error] 100-102: Replace ⏎······tagColorMap[tag.name]·=·{⏎
with ······tagColorMap[tag.name]·=·{
(prettier/prettier)
[error] 106-108: Replace ⏎······};⏎
with ······};
(prettier/prettier)
[error] 107-109: Block must not be padded by blank lines.
(padded-blocks)
[error] 109-111: Block must not be padded by blank lines.
(padded-blocks)
[error] 110-114: Replace ⏎··}⏎⏎⏎
with ··}
(prettier/prettier)
[error] 113-116: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 120-123: Delete ⏎⏎⏎
(prettier/prettier)
[error] 120-123: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 125-127: Block must not be padded by blank lines.
(padded-blocks)
[error] 125-126: Delete ⏎
(prettier/prettier)
[error] 129-130: Delete ⏎
(prettier/prettier)
[error] 132-133: Delete ⏎
(prettier/prettier)
[error] 138-140: Replace ⏎········}))⏎
with ········}))
(prettier/prettier)
[error] 141-144: Delete ⏎⏎⏎
(prettier/prettier)
[error] 143-146: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 149-150: Delete ⏎
(prettier/prettier)
[error] 151-152: Replace ⏎
with ··
(prettier/prettier)
[error] 153-154: Replace ⏎
with ··
(prettier/prettier)
[error] 156-156: Insert ··
(prettier/prettier)
[error] 158-158: Insert ··
(prettier/prettier)
[error] 159-160: Replace ⏎········
with ··········
(prettier/prettier)
[error] 161-163: Replace ⏎······]⏎
with ········]
(prettier/prettier)
[error] 166-169: Delete ⏎⏎⏎
(prettier/prettier)
[error] 166-169: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 171-172: Delete ⏎
(prettier/prettier)
[error] 179-180: Delete ⏎
(prettier/prettier)
[error] 190-192: Replace ⏎······}⏎
with ······}
(prettier/prettier)
[error] 193-194: Delete ⏎
(prettier/prettier)
[error] 193-195: Block must not be padded by blank lines.
(padded-blocks)
[error] 197-200: Delete ⏎⏎⏎
(prettier/prettier)
[error] 197-200: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 202-204: Block must not be padded by blank lines.
(padded-blocks)
[error] 202-203: Delete ⏎
(prettier/prettier)
[error] 204-206: Block must not be padded by blank lines.
(padded-blocks)
[error] 205-206: Delete ⏎
(prettier/prettier)
[error] 206-208: Block must not be padded by blank lines.
(padded-blocks)
[error] 207-209: Replace ⏎········result[category]·=·{⏎
with ········result[category]·=·{
(prettier/prettier)
[error] 213-214: Delete ⏎
(prettier/prettier)
[error] 214-216: Block must not be padded by blank lines.
(padded-blocks)
[error] 215-219: Replace ⏎······}⏎⏎⏎
with ······}
(prettier/prettier)
[error] 218-221: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 221-223: Block must not be padded by blank lines.
(padded-blocks)
[error] 221-222: Delete ⏎
(prettier/prettier)
[error] 223-225: Block must not be padded by blank lines.
(padded-blocks)
[error] 224-225: Delete ⏎
(prettier/prettier)
[error] 225-227: Block must not be padded by blank lines.
(padded-blocks)
[error] 226-227: Delete ⏎
(prettier/prettier)
[error] 227-229: Block must not be padded by blank lines.
(padded-blocks)
[error] 228-230: Replace ⏎······}⏎
with ······}
(prettier/prettier)
[error] 229-231: Block must not be padded by blank lines.
(padded-blocks)
[error] 231-233: Block must not be padded by blank lines.
(padded-blocks)
[error] 232-233: Delete ⏎
(prettier/prettier)
[error] 235-238: Delete ⏎⏎⏎
(prettier/prettier)
[error] 235-238: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 242-245: Delete ⏎⏎⏎
(prettier/prettier)
[error] 242-245: More than 1 blank line not allowed.
(no-multiple-empty-lines)
[error] 245-247: Block must not be padded by blank lines.
(padded-blocks)
[error] 246-247: Replace ⏎};
with };⏎
(prettier/prettier)
[error] 247-247: Newline required at end of file but not found.
(eol-last)
🪛 GitHub Actions: PR testing - if Node project
components/tools/ToolsDashboard.tsx
[error] 1-1: Error: Run autofix to sort these imports! simple-import-sort/imports
[error] 6-6: Error: 'ToolsDataList' is defined but never used. unused-imports/no-unused-imports
[error] 6-6: Error: 'ToolsDataList' is defined but never used. no-unused-vars
[error] 15-15: Error: Expected 1 empty line after import statement not followed by another import. import/newline-after-import
[error] 15-15: Error: @/utils/processToolsData
import should occur before import of ../../config/tools.json
import/order
[error] 16-16: Error: Expected blank line after variable declarations. newline-after-var
[error] 17-17: Error: Expected line before comment. lines-around-comment
[error] 20-20: Error: Expected blank line before this statement. padding-line-between-statements
pages/casestudies/[id].tsx
[error] 45-45: Error: Insert ·
prettier/prettier
🔇 Additional comments (5)
config/tools-automated.json (3)
1394-1406
: Node.js Websockets Template looks good.The new template entry properly replaces the functionality of the Multiprotocol template with a more specific WebSockets implementation, which aligns with the PR objectives.
1436-1447
: Java Spring Cloud Stream Template looks good.The updated template entry for Java Spring Cloud Stream with appropriate technology tags is a good addition.
1464-1476
: HTML Template description update looks good.The minor clarification in the HTML template description improves understanding of how it uses the AsyncAPI React component.
components/tools/ToolsDashboard.tsx (1)
62-62
: Type annotation for useMemo looks good.Adding explicit type annotation to
useMemo
improves type safety.config/tools-manual.json (1)
32-105
: New Generator Templates Added and ConsolidatedThe new entries under the "AsyncAPI Generator Templates" section are well-structured and clearly defined. Each template entry includes a proper title, description, links, and filter settings. This update successfully adds the following manual templates:
- Go Watermill Template
- Node.js Template
- Markdown Template
- Python Paho Template
- Dotnet RabbitMQ Template
- Node.js WebSocket Template
A few points for your consideration:
- Consistency Check: Ensure that these new templates are also reflected in the corresponding configuration (e.g., in
config/generator-templates.json
) to maintain consistency across the system.- Duplicate Removal Verification: Since the PR objective mentions the removal of automation duplicates, please double-check that no essential templates have been inadvertently removed.
- Preview Deployment: Given the concerns in the PR comments regarding the Netlify preview not reflecting the updates, please verify that the changes propagate correctly in the deployed environment.
Overall, this updated configuration enhances the AsyncAPI Generator by providing a broader range of template options.
config/tools-automated.json
Outdated
{ | ||
"title": "Node.js Multiprotocol Template", | ||
"description": "This template generates a server using your AsyncAPI document. It supports multiple different protocols, like Kafka or MQTT. It is designed in the way that generated code is a library and with it's API you can start the server, send messages or register a middleware for listening incoming messages. Runtime message validation included.", | ||
"description": "This template generates a server using your AsyncAPI document. It supports multiple different protocols, like Kafka or MQTT. It is designed in the way that generated code is a library and with its API you can start the server, send messages, or register a middleware for listening to incoming messages. Runtime message validation included.", | ||
"links": { | ||
"repoUrl": "https://github.com/asyncapi/nodejs-template" | ||
}, | ||
"filters": { | ||
"language": "javascript", | ||
"technology": [ | ||
"Node.js" | ||
], | ||
"categories": [ | ||
"generator-template" | ||
], | ||
"technology": ["Node.js"], | ||
"categories": ["generator-template"], | ||
"hasCommercial": false, | ||
"isAsyncAPIOwner": true | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove duplicate Node.js Multiprotocol Template entry.
According to the PR objectives, the Node.js Multiprotocol Template should be removed to eliminate duplicates. Currently, both the new "Node.js Websockets Template" and this entry are present.
Remove the "Node.js Multiprotocol Template" entry (lines 1407-1419) to complete the duplicate cleanup as mentioned in the PR objectives.
components/tools/ToolsDashboard.tsx
Outdated
import { processToolsData } from '@/utils/processToolsData'; | ||
const ToolsData = processToolsData() as ToolsListData; | ||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix import order and add required blank lines.
The import structure needs to be fixed to comply with the project's style guidelines, and blank lines need to be added in appropriate places.
+import { processToolsData } from '@/utils/processToolsData';
import ToolsDataList from '../../config/tools.json';
import ToolFilter, { ToolFilterContext } from '../../context/ToolFilterContext';
import ArrowDown from '../icons/ArrowDown';
import Cross from '../icons/Cross';
import FilterIcon from '../icons/Filter';
import SearchIcon from '../icons/Search';
import CategoryDropdown from './CategoryDropdown';
import Filters from './Filters';
import ToolsList from './ToolsList';
-import { processToolsData } from '@/utils/processToolsData';
const ToolsData = processToolsData() as ToolsListData;
+
/**
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
import { processToolsData } from '@/utils/processToolsData'; | |
const ToolsData = processToolsData() as ToolsListData; | |
/** | |
import { processToolsData } from '@/utils/processToolsData'; | |
import ToolsDataList from '../../config/tools.json'; | |
import ToolFilter, { ToolFilterContext } from '../../context/ToolFilterContext'; | |
import ArrowDown from '../icons/ArrowDown'; | |
import Cross from '../icons/Cross'; | |
import FilterIcon from '../icons/Filter'; | |
import SearchIcon from '../icons/Search'; | |
import CategoryDropdown from './CategoryDropdown'; | |
import Filters from './Filters'; | |
import ToolsList from './ToolsList'; | |
const ToolsData = processToolsData() as ToolsListData; | |
/** |
🧰 Tools
🪛 ESLint
[error] 15-15: Expected 1 empty line after import statement not followed by another import.
(import/newline-after-import)
[error] 15-15: @/utils/processToolsData
import should occur before import of ../../config/tools.json
(import/order)
[error] 16-16: Expected blank line after variable declarations.
(newline-after-var)
🪛 GitHub Actions: PR testing - if Node project
[error] 15-15: Error: Expected 1 empty line after import statement not followed by another import. import/newline-after-import
[error] 15-15: Error: @/utils/processToolsData
import should occur before import of ../../config/tools.json
import/order
[error] 16-16: Error: Expected blank line after variable declarations. newline-after-var
[error] 17-17: Error: Expected line before comment. lines-around-comment
a185930
to
3373128
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (4)
config/tools-manual.json (4)
32-44
: New Template Entry: Go Watermill TemplateThe entry for the Go Watermill Template is well-formed. It provides the title, description, repo URL, and filters (language, technology, categories) as expected. Please verify that the repository URL is correct and that the filters align with the project's categorization.
45-57
: New Template Entry: Node.js TemplateThe Node.js Template entry looks correct with the appropriate title, description, and filter settings. Note that line 46 contains extraneous whitespace. Removing this extra line would help maintain clean JSON formatting.
58-69
: New Template Entry: Markdown TemplateThe Markdown Template entry is properly defined. The description and repo URL are clear, and the filters are set accordingly. Since the "technology" field is an empty array here, ensure that this is intentional (indicating no specific technology requirement) rather than an omission.
82-93
: New Template Entry: Dotnet RabbitMQ TemplateThe Dotnet RabbitMQ Template is implemented correctly with all required fields. One suggestion for consistency: consider using “.NET RabbitMQ Template” in the title (instead of "Dotnet") to match the description and industry-standard nomenclature for .NET.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
config/tools-automated.json
(13 hunks)config/tools-manual.json
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- config/tools-automated.json
🔇 Additional comments (2)
config/tools-manual.json (2)
70-81
: New Template Entry: Python Paho TemplateThe Python Paho Template includes all necessary information such as title, description, and repository link. The filters correctly designate the language and technology. Double-check that the provided repo URL is current and that it meets the project documentation standards.
94-105
: New Template Entry: Node.js WebSocket TemplateThis entry is clear and complete. It correctly includes title, description, repo URL, and filters. As a minor point, please verify that the use of “WebSocket” (singular) in the title and filters is intentional rather than “Websockets,” which might be used elsewhere in the project.
There was a problem hiding this 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 (7)
config/tools-automated.json (7)
117-137
: 🛠️ Refactor suggestionDuplicate "AsyncAPI.Net" Entry in Code-first Tools
This block duplicates an existing "AsyncAPI.Net" entry. In line with the PR objectives to remove duplicates from automation, please verify if this duplicate is intentional. If not, consider removing one of the entries to avoid redundancy.
269-298
: 🛠️ Refactor suggestionDuplicate "Golang AsyncAPI Code Generator" Entries
Two consecutive entries for "Golang AsyncAPI Code Generator" are present (one starting at line 269 and the following block from 284 to 298). Please consolidate these into a single entry to prevent confusion and ensure consistency.
711-730
: 🛠️ Refactor suggestionDuplicate "Zod Sockets" Entry (First Instance) in Frameworks Section
This block for "Zod Sockets" is marked as changed and appears to be a duplicate entry in the Frameworks section. Please remove the redundant instance to adhere to the removal of duplicates.
733-753
: 🛠️ Refactor suggestionDuplicate "Zod Sockets" Entry (Second Instance) in Frameworks Section
Another instance of "Zod Sockets" is found immediately after the first. Consolidate these duplicates so that only one unique entry remains.
1087-1105
: 🛠️ Refactor suggestionDuplicate "jasyncapicmp" Entry in Compare Tools
A duplicate entry for "jasyncapicmp" (the second occurrence here) is marked with changes. Please verify and remove the redundant entry so that only one correct listing remains.
1382-1398
: 🛠️ Refactor suggestionConflicting "asyncapi-preview" Entries with Different Repo URLs
This block for the "asyncapi-preview" VSCode extension shows a repository URL pointing to
https://github.com/Savio629/testing2
and marks a change. Since there is another "asyncapi-preview" entry using the official repository, please determine which version is correct and remove the duplicate(s) to prevent confusion.
1399-1416
: 🛠️ Refactor suggestionRedundant "asyncapi-preview" Duplicate
Another duplicate instance of "asyncapi-preview" appears with the same conflicting details as above. Consolidate these so that only one accurate entry remains.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
config/generator-templates.json
(1 hunks)config/tools-automated.json
(9 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- config/generator-templates.json
🔇 Additional comments (4)
config/tools-automated.json (4)
139-156
: 🛠️ Refactor suggestionDuplicate "nestjs-asyncapi" Entry
This block introduces a duplicate "nestjs-asyncapi" entry. To streamline the tools list and meet the PR’s duplicate removal goal, evaluate if both entries are required. If they are identical, remove the duplicate.
1464-1477
: Review "Java Spring Template" Entry UpdateThe "Java Spring Template" entry appears updated (language set to Java and technology list adjusted). Please verify that the values accurately reflect the intended configuration.
1478-1491
: HTML Template Entry VerificationThe update for the "HTML Template" entry looks correct. Ensure that the technology filter (set to "HTML") and the language (javascript) are in line with intended usage.
1492-1505
: Java Spring Cloud Stream Template Entry CheckThe "Java Spring Cloud Stream Template" update has been applied with changes to language and technology filters. Confirm that these settings (language as Java and technology including "Spring Cloud Streams" and "Maven") are correct per the specification.
config/tools-automated.json
Outdated
"title": "Node.js Multiprotocol Template", | ||
"description": "This template generates a server using your AsyncAPI document. It supports multiple different protocols, like Kafka or MQTT. It is designed in the way that generated code is a library and with it's API you can start the server, send messages or register a middleware for listening incoming messages. Runtime message validation included.", | ||
"description": "This template generates a server using your AsyncAPI document. It supports multiple different protocols, like Kafka or MQTT. It is designed in the way that generated code is a library and with its API you can start the server, send messages, or register a middleware for listening to incoming messages. Runtime message validation included.", | ||
"links": { | ||
"repoUrl": "https://github.com/asyncapi/nodejs-template" | ||
}, | ||
"filters": { | ||
"language": "javascript", | ||
"technology": [ | ||
"Node.js" | ||
], | ||
"categories": [ | ||
"generator-template" | ||
], | ||
"technology": ["Node.js"], | ||
"categories": ["generator-template"], | ||
"hasCommercial": false, | ||
"isAsyncAPIOwner": true | ||
} | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Residue of "Node.js Multiprotocol Template" Entry
Despite the duplicate cleanup objective described in the PR, the "Node.js Multiprotocol Template" entry is still present. Since the PR indicates that this template should be replaced by the new "Node.js Websockets Template," please remove this redundant entry unless there is a specific reason to retain it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove changes from config/tools-automated.json
as they are not needed - will only confuse until next overwrite from automation
f3e7da8
to
6433c45
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🔭 Outside diff range comments (2)
config/tools-automated.json (2)
1432-1452
: 💡 Verification agent❓ Verification inconclusive
Verify "Java Spring Cloud Stream Template" Configuration
The "Java Spring Cloud Stream Template" entry remains unchanged. However, similarly to the previous entry, its"language"
field is set to an array with"javascript"
, which seems inconsistent with a Java-based template. Please confirm if this is intentional or if it should be updated (for example, to"java"
) to accurately reflect its technology stack.
Action Required: Correct the Language Field for the Java Template
The "Java Spring Cloud Stream Template" entry is inconsistent with its nature—the title, description, and linked technologies (Spring Cloud Streams, Maven) clearly point to a Java-based template, yet its"language"
field is set to["javascript"]
. Please confirm if this is intentional; if not, update it to["java"]
inconfig/tools-automated.json
(lines 1432-1452).
1410-1431
: 💡 Verification agent🧩 Analysis chain
Review "Java Spring Template" Entry for Accuracy and Duplication
The "Java Spring Template" entry is present, but note that its"language"
field is defined as an array containing"javascript"
. Given that this is a Java-based template, this appears to be a mismatch and might be an error. Furthermore, according to the enriched summary the entry was expected to be removed to avoid duplication—please verify whether this entry is still required or should be eliminated.
Based on the provided snippet—which shows that the "Java Spring Template" entry is still present with a
"language"
field set to["javascript"]
despite being a Java-based template—and the review comment’s suggestion that this entry might be a duplicate, please verify the following:
- Confirm whether the "Java Spring Template" entry is intentionally maintained.
- If it remains necessary, update the
"language"
field to accurately reflect its technology (e.g.,"java"
instead of"javascript"
).- Otherwise, remove the entry to resolve duplication issues as noted in the enriched summary.
Action Required: Please review and update the "Java Spring Template" entry accordingly.
🏁 Script executed:
#!/bin/bash # Verify the relevant snippet in config/tools-automated.json to check the "Java Spring Template" entry echo "Extracting the snippet from config/tools-automated.json (lines 1410-1431):" sed -n '1410,1431p' config/tools-automated.jsonLength of output: 902
Action Required: Correct or Remove the "Java Spring Template" Entry
The extracted snippet confirms that the "Java Spring Template" entry in
config/tools-automated.json
(lines 1410-1431) still exists with a"language"
field set to["javascript"]
, which is clearly a mismatch for a Java-based template. Please review whether this entry:
- Should remain and have its
"language"
field updated to accurately reflect "java" (or another appropriate value), or- Is a duplicate as mentioned in the enriched summary and should be removed entirely.
Ensure that the final state of this entry aligns with its intended usage in the repository.
🧹 Nitpick comments (1)
config/tools-automated.json (1)
1392-1409
: New "Node.js Websockets Template" Entry Added
The new template entry for Node.js WebSockets is added with the expected fields: title, description, links, and filters. The configuration appears correct. Consider verifying if the"language"
value should be capitalized as"JavaScript"
(or adjusted for consistency with your other template entries) if that matches your project’s naming conventions.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
config/tools-automated.json
(1 hunks)
🔇 Additional comments (3)
config/tools-automated.json (3)
1473-1490
: "HTML Template" Entry Looks Correct
The "HTML Template" entry is retained and appears to be well configured in terms of links and filters. The use of"javascript"
for the language might be acceptable if it correlates with the usage of the AsyncAPI React component under the hood; however, please double-check that this is aligned with your overall configuration strategy.
1491-1508
:⚠️ Potential issueRemove Duplicate "Node.js Multiprotocol Template" Entry
The "Node.js Multiprotocol Template" entry is still present in this configuration; however, per the PR objectives and previous review discussions, this duplicate entry should be removed to avoid confusion and redundancy.Would you like assistance with a diff code block suggesting its removal?
1453-1472
:❓ Verification inconclusive
Review "Java Template" Entry for Duplication and Language Setting
The "Java Template" entry is still present, yet its"language"
field is also set to["javascript"]
. Since this template is intended for Java, this setting seems incorrect. Moreover, the enriched summary indicated that this entry might have been scheduled for removal to eliminate duplicates. Please verify if retaining this entry is intended or if it should be removed to align with the PR objectives.
I'll run a couple of shell queries to verify the details around the "Java Template" entry. In particular, I'll:
- Search for all occurrences of
"title": "Java Template"
across the repository to see if there are duplicate entries.- Inspect the relevant section in
config/tools-automated.json
to confirm the language setting and nearby context.I'll await the results from these scripts before proceeding with the final review comment.
🏁 Script executed:
#!/bin/bash echo "Searching for duplicate 'Java Template' entries across the repository:" rg '"title":\s*"Java Template"' -n . echo "" echo "Showing context for the 'Java Template' entry in config/tools-automated.json:" rg -A 5 -B 2 '"title":\s*"Java Template"' config/tools-automated.jsonLength of output: 65851
Action Needed: Review Duplicate & Language Mismatch in "Java Template" Entry
- The "Java Template" entry in
config/tools-automated.json
(lines 1453–1472) still exists with its"language"
filter set to["javascript"]
, which is inconsistent with its intended Java use.- There is an indication (via the grep output) that a similar "Java Template" entry exists in another configuration file (e.g.,
config/tools.json
), suggesting potential duplication.- Please verify whether this entry is meant to be retained. If so, update the
"language"
field to correctly reflect Java (e.g.,["Java"]
). Otherwise, consider removing the duplicate entry to align with the PR objectives.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
config/tools-automated.json (2)
1473-1490
: Potential Duplicate: Node.js Multiprotocol Template
The block for "Node.js Multiprotocol Template" has been reformatted with an updated description. However, given the PR objective of removing duplicate templates and the previous review comments suggesting removal of a duplicate Node.js multiprotocol entry, please confirm whether keeping this template is intentional.
If this entry duplicates the functionality provided by the new "Node.js Websockets Template" (introduced below), consider removing it to avoid confusion.
1491-1508
: New Addition: Node.js Websockets Template
A new "Node.js Websockets Template" entry has been introduced. The updated title, description, and repo URL ("https://github.com/asyncapi/nodejs-ws-template") align with the aim of manually adding missing templates.
A couple of points for consideration:
- Please confirm that the naming is consistent with other Node.js template entries. For example, if the term “WebSocket” is preferred in other parts of the project (singular, title-cased), you might consider standardizing it here.
- Verify that the description clearly distinguishes this template’s functionality from the multiprotocol alternative.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
config/tools-automated.json
(3 hunks)
⏰ Context from checks skipped due to timeout of 180000ms (3)
- GitHub Check: Redirect rules - asyncapi-website
- GitHub Check: Header rules - asyncapi-website
- GitHub Check: Pages changed - asyncapi-website
🔇 Additional comments (1)
config/tools-automated.json (1)
1393-1397
: Review of Java Template changes
The updates to the "Java Template" entry (title, description, and repoUrl) appear to standardize the entry with the intended repository link. Please verify that the repo URL ("https://github.com/asyncapi/java-template") is correct and that the string values (e.g. the capitalization of "Java Template") are consistent across all templates.
f479d91
to
fe3bfaa
Compare
/rtm |
Description
Multiple duplicate templates were observed under Asyncapi Generator Template.

Tried to add few templates manually and removed the duplicate templates.
-I Couldn't run the updates locally, please review pr by checking the output.
Related issue(s)
This PR tries to resolve asyncapi/generator#921,
@derberg
Summary by CodeRabbit