You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resolves all 28 repo-level Codacy issues on main (23 High, 3 Error, 2 Warning) via a mix of real code fixes and false-positive suppressions.
Root cause
.codacy.yml disables ESLint9_-prefixed rules, but Codacy's cloud analysis actually runs the legacy ESLint (v8) engine, which reports ESLint8_-prefixed pattern IDs — so every suppression was silently ineffective. Added an eslint-8 engine section with matching ESLint8_ suppressions for verified false-positive patterns.
We reviewed changes in 63558b9...a5182f8 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.
Some issues found as part of this review are outside of the diff in this pull request and aren't shown in the inline review comments due to GitHub's API limitations. You can see those issues on the DeepSource dashboard.
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
The reason will be displayed to describe this comment to others. Learn more.
Expected 'undefined' and instead saw 'void'
The void operator takes an operand and returns undefined. It can be used to ignore the value produced by an expression. However, this can lead to code that is difficult to understand and maintain. Historically, the void operator was used to get a "pure" undefined value, as the undefined variable was mutable prior to ES5.
The reason will be displayed to describe this comment to others. Learn more.
Expected 'undefined' and instead saw 'void'
The void operator takes an operand and returns undefined. It can be used to ignore the value produced by an expression. However, this can lead to code that is difficult to understand and maintain. Historically, the void operator was used to get a "pure" undefined value, as the undefined variable was mutable prior to ES5.
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer TIP This summary will be updated as you push new changes.
The reason will be displayed to describe this comment to others. Learn more.
🦉 OwlWatch [HIGH · tracker] Missing guard for FormField context leads to potential runtime error
The removal of the fieldContext guard in useFormField allows calling useFormState with an undefined name if the hook is used outside of a FormField provider, leading to potential runtime errors.
Convert the five JS-0067-flagged export function declarations (TrizView,
TypeSelector, CommandPalette, useIsMobile, Overlay) to const arrow
functions, the AGENTS.md-preferred form, and drop the void operator from
the two JS-0098-flagged promise call sites (clipboard write, encrypted
export) in favor of .catch(() => undefined), which satisfies Codacy's
no-floating-promises rule without the void keyword.
DeepSource reported issuesSuppressedCount: 0 for these codes despite the
issue_patterns in .deepsource.toml, so the code fix is the primary remedy.
The reason will be displayed to describe this comment to others. Learn more.
`Overlay` has a cyclomatic complexity of 7 with "medium" risk
A function with high cyclomatic complexity can be hard to understand and
maintain. Cyclomatic complexity is a software metric that measures the number of
independent paths through a function. A higher cyclomatic complexity indicates
that the function has more decision points and is more complex.
The reason will be displayed to describe this comment to others. Learn more.
`TrizView` has a cyclomatic complexity of 27 with "very-high" risk
A function with high cyclomatic complexity can be hard to understand and
maintain. Cyclomatic complexity is a software metric that measures the number of
independent paths through a function. A higher cyclomatic complexity indicates
that the function has more decision points and is more complex.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves all 28 repo-level Codacy issues on
main(23 High, 3 Error, 2 Warning) via a mix of real code fixes and false-positive suppressions.Root cause
.codacy.ymldisablesESLint9_-prefixed rules, but Codacy's cloud analysis actually runs the legacy ESLint (v8) engine, which reportsESLint8_-prefixed pattern IDs — so every suppression was silently ineffective. Added aneslint-8engine section with matchingESLint8_suppressions for verified false-positive patterns.Real code fixes (9)
triz-view.tsxvoid ... .catch()+ try/catch (no-floating-promises, no-unnecessary-condition)type-selector.tsx?.on in-bounds NodeList indexcommand-palette.tsxshared-primitives.tsx[0]→.at(0)so?? containerfallback is type-honestform.tsxif (!fieldContext)guard (never null; dereferenced above)use-mobile.tsencrypt-export-dialog.tsxvoid handleExport(...)(no-misused-promises)export-format-grid.tsxself-fix-loop.shFalse positives suppressed (19)
validateOllamaUrl(localhost-only) / protocol +isPrivateIPchecks; added inline// nosemgrepmarkers with justificationxss/no-mixed-html— React JSX components, DOM-node refs, and file downloads (not raw HTML strings executed in DOM)security/detect-object-injection— indexing constant lookup tables (TRIZ_PARAMETERS,BUTTON_VARIANTS) with typed keysno-unnecessary-condition— runtime-defensive optional chaining where the type system is non-nullableValidation
tsc -p tsconfig.app.json --noEmit✓shellcheckonself-fix-loop.sh✓