Refactore #2
Refactore #2
Quality Gate failed
Failed conditions
10.1% Duplication on New Code (required ≤ 3%)
B Reliability Rating on New Code (required ≥ A)
See analysis details on SonarQube Cloud
Catch issues before they fail your Quality Gate with our IDE extension
SonarQube for IDE
Annotations
Check warning on line 422 in src/components/fields/ArrayField.tsx
sonarqubecloud / SonarCloud Code Analysis
Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.
See more on https://sonarcloud.io/project/issues?id=CISCODE-MA_FormKit-UI&issues=AZ0_iml8gwD9Sv-kUZ8Y&open=AZ0_iml8gwD9Sv-kUZ8Y&pullRequest=2
Check warning on line 326 in src/components/fields/SelectField.tsx
sonarqubecloud / SonarCloud Code Analysis
Non-interactive elements should not be assigned interactive roles.
See more on https://sonarcloud.io/project/issues?id=CISCODE-MA_FormKit-UI&issues=AZ0_imkOgwD9Sv-kUZ7h&open=AZ0_imkOgwD9Sv-kUZ7h&pullRequest=2
Check warning on line 304 in src/components/fields/DateTimeField.tsx
sonarqubecloud / SonarCloud Code Analysis
Elements with the ARIA role "combobox" must have the following attributes defined: aria-controls,aria-expanded
See more on https://sonarcloud.io/project/issues?id=CISCODE-MA_FormKit-UI&issues=AZ0_imlVgwD9Sv-kUZ75&open=AZ0_imlVgwD9Sv-kUZ75&pullRequest=2
Check warning on line 152 in src/components/fields/TimeField.tsx
sonarqubecloud / SonarCloud Code Analysis
Unexpected negated condition.
See more on https://sonarcloud.io/project/issues?id=CISCODE-MA_FormKit-UI&issues=AZ0_imiKgwD9Sv-kUZ6s&open=AZ0_imiKgwD9Sv-kUZ6s&pullRequest=2
Check warning on line 180 in src/components/form/DynamicForm.tsx
sonarqubecloud / SonarCloud Code Analysis
Mark the props of the component as read-only.
See more on https://sonarcloud.io/project/issues?id=CISCODE-MA_FormKit-UI&issues=AZ0_impmgwD9Sv-kUZ8y&open=AZ0_impmgwD9Sv-kUZ8y&pullRequest=2
Check warning on line 437 in src/components/fields/MultiSelectField.tsx
sonarqubecloud / SonarCloud Code Analysis
Non-interactive elements should not be assigned interactive roles.
See more on https://sonarcloud.io/project/issues?id=CISCODE-MA_FormKit-UI&issues=AZ0_imkygwD9Sv-kUZ7w&open=AZ0_imkygwD9Sv-kUZ7w&pullRequest=2
Check warning on line 23 in src/components/layout/FieldError.tsx
sonarqubecloud / SonarCloud Code Analysis
Mark the props of the component as read-only.
See more on https://sonarcloud.io/project/issues?id=CISCODE-MA_FormKit-UI&issues=AZ0_imocgwD9Sv-kUZ8o&open=AZ0_imocgwD9Sv-kUZ8o&pullRequest=2
Check warning on line 138 in src/components/fields/TagsField.tsx
sonarqubecloud / SonarCloud Code Analysis
Visible, non-interactive elements with click handlers must have at least one keyboard listener.
See more on https://sonarcloud.io/project/issues?id=CISCODE-MA_FormKit-UI&issues=AZ0_imnxgwD9Sv-kUZ8l&open=AZ0_imnxgwD9Sv-kUZ8l&pullRequest=2
Check warning on line 118 in src/core/schema-helpers.ts
sonarqubecloud / SonarCloud Code Analysis
This assertion is unnecessary since it does not change the type of the expression.
See more on https://sonarcloud.io/project/issues?id=CISCODE-MA_FormKit-UI&issues=AZ0_imqwgwD9Sv-kUZ8-&open=AZ0_imqwgwD9Sv-kUZ8-&pullRequest=2
Check warning on line 87 in src/components/fields/SwitchField.tsx
sonarqubecloud / SonarCloud Code Analysis
Visible, non-interactive elements with click handlers must have at least one keyboard listener.
See more on https://sonarcloud.io/project/issues?id=CISCODE-MA_FormKit-UI&issues=AZ0_imi5gwD9Sv-kUZ7D&open=AZ0_imi5gwD9Sv-kUZ7D&pullRequest=2
Check warning on line 344 in src/components/fields/SelectField.tsx
sonarqubecloud / SonarCloud Code Analysis
Non-interactive elements should not be assigned interactive roles.
See more on https://sonarcloud.io/project/issues?id=CISCODE-MA_FormKit-UI&issues=AZ0_imkOgwD9Sv-kUZ7k&open=AZ0_imkOgwD9Sv-kUZ7k&pullRequest=2
Check warning on line 98 in src/hooks/useFormKit.ts
sonarqubecloud / SonarCloud Code Analysis
useState call is not destructured into value + setter pair
See more on https://sonarcloud.io/project/issues?id=CISCODE-MA_FormKit-UI&issues=AZ0_imrOgwD9Sv-kUZ9A&open=AZ0_imrOgwD9Sv-kUZ9A&pullRequest=2
Check warning on line 308 in src/components/fields/DateField.tsx
sonarqubecloud / SonarCloud Code Analysis
Elements with the ARIA role "combobox" must have the following attributes defined: aria-controls,aria-expanded
See more on https://sonarcloud.io/project/issues?id=CISCODE-MA_FormKit-UI&issues=AZ0_imjbgwD9Sv-kUZ7M&open=AZ0_imjbgwD9Sv-kUZ7M&pullRequest=2
Check warning on line 217 in src/components/fields/PhoneField.tsx
sonarqubecloud / SonarCloud Code Analysis
Non-interactive elements should not be assigned interactive roles.
See more on https://sonarcloud.io/project/issues?id=CISCODE-MA_FormKit-UI&issues=AZ0_immQgwD9Sv-kUZ8g&open=AZ0_immQgwD9Sv-kUZ8g&pullRequest=2
Check warning on line 15 in src/components/fields/__tests__/RangeSliderField.test.tsx
sonarqubecloud / SonarCloud Code Analysis
Do not use an object literal as default for parameter `defaultValue`.
See more on https://sonarcloud.io/project/issues?id=CISCODE-MA_FormKit-UI&issues=AZ0_imhogwD9Sv-kUZ6k&open=AZ0_imhogwD9Sv-kUZ6k&pullRequest=2
Check warning on line 213 in src/components/fields/PhoneField.tsx
sonarqubecloud / SonarCloud Code Analysis
Use <select size=...>, <select multiple=...>, or <datalist> instead of the "listbox" role to ensure accessibility across all devices.
See more on https://sonarcloud.io/project/issues?id=CISCODE-MA_FormKit-UI&issues=AZ0_immQgwD9Sv-kUZ8d&open=AZ0_immQgwD9Sv-kUZ8d&pullRequest=2
Check warning on line 276 in src/components/fields/TimeField.tsx
sonarqubecloud / SonarCloud Code Analysis
Use <input list=...>, <input list=...>, <input list=...>, <input list=...>, <input list=...>, <input list=...>, or <select multiple=...> instead of the "combobox" role to ensure accessibility across all devices.
See more on https://sonarcloud.io/project/issues?id=CISCODE-MA_FormKit-UI&issues=AZ0_imiKgwD9Sv-kUZ6u&open=AZ0_imiKgwD9Sv-kUZ6u&pullRequest=2
Check warning on line 126 in src/components/fields/OTPField.tsx
sonarqubecloud / SonarCloud Code Analysis
Prefer `String#replaceAll()` over `String#replace()`.
See more on https://sonarcloud.io/project/issues?id=CISCODE-MA_FormKit-UI&issues=AZ0_imhFgwD9Sv-kUZ6e&open=AZ0_imhFgwD9Sv-kUZ6e&pullRequest=2
Check failure on line 184 in src/components/fields/DateField.tsx
sonarqubecloud / SonarCloud Code Analysis
Refactor this function to reduce its Cognitive Complexity from 29 to the 15 allowed.
See more on https://sonarcloud.io/project/issues?id=CISCODE-MA_FormKit-UI&issues=AZ0_rcrM7npyK73SkKZD&open=AZ0_rcrM7npyK73SkKZD&pullRequest=2
Check warning on line 21 in src/components/fields/SwitchField.tsx
sonarqubecloud / SonarCloud Code Analysis
Mark the props of the component as read-only.
See more on https://sonarcloud.io/project/issues?id=CISCODE-MA_FormKit-UI&issues=AZ0_imi5gwD9Sv-kUZ7B&open=AZ0_imi5gwD9Sv-kUZ7B&pullRequest=2
Check warning on line 94 in src/components/fields/ArrayField.tsx
sonarqubecloud / SonarCloud Code Analysis
This assertion is unnecessary since it does not change the type of the expression.
See more on https://sonarcloud.io/project/issues?id=CISCODE-MA_FormKit-UI&issues=AZ0_iml8gwD9Sv-kUZ8P&open=AZ0_iml8gwD9Sv-kUZ8P&pullRequest=2
Check warning on line 244 in src/components/fields/TimeField.tsx
sonarqubecloud / SonarCloud Code Analysis
Elements with the ARIA role "combobox" must have the following attributes defined: aria-controls,aria-expanded
See more on https://sonarcloud.io/project/issues?id=CISCODE-MA_FormKit-UI&issues=AZ0_imiKgwD9Sv-kUZ6v&open=AZ0_imiKgwD9Sv-kUZ6v&pullRequest=2
Check warning on line 340 in src/components/fields/DateField.tsx
sonarqubecloud / SonarCloud Code Analysis
Use <input list=...>, <input list=...>, <input list=...>, <input list=...>, <input list=...>, <input list=...>, or <select multiple=...> instead of the "combobox" role to ensure accessibility across all devices.
See more on https://sonarcloud.io/project/issues?id=CISCODE-MA_FormKit-UI&issues=AZ0_rcrM7npyK73SkKZE&open=AZ0_rcrM7npyK73SkKZE&pullRequest=2
Check warning on line 34 in src/components/layout/FieldLabel.tsx
sonarqubecloud / SonarCloud Code Analysis
Mark the props of the component as read-only.
See more on https://sonarcloud.io/project/issues?id=CISCODE-MA_FormKit-UI&issues=AZ0_imorgwD9Sv-kUZ8p&open=AZ0_imorgwD9Sv-kUZ8p&pullRequest=2
Check warning on line 214 in src/components/fields/SelectField.tsx
sonarqubecloud / SonarCloud Code Analysis
Extract this nested ternary operation into an independent statement.
See more on https://sonarcloud.io/project/issues?id=CISCODE-MA_FormKit-UI&issues=AZ0_imkOgwD9Sv-kUZ7f&open=AZ0_imkOgwD9Sv-kUZ7f&pullRequest=2