Skip to content

Conversation

@veronikaslc
Copy link
Contributor

No description provided.

@veronikaslc
Copy link
Contributor Author

DRAFT

@veronikaslc veronikaslc force-pushed the CARDS-2797 branch 2 times, most recently from 377804d to fad766b Compare December 18, 2025 18:30
setters["local"](phase);
}
if (setters.hasOwnProperty("remote")) {
if (Object.prototype.hasOwnProperty.call(setters, "remote")) {
Copy link
Contributor

Choose a reason for hiding this comment

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

All these hasOwnProperty calls look like ancient code... For example here, can't we just replace lines 108-110 with

setters["remote"]?.(phase);

?
Similar approaches for all the other occurrences.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Linter told to replace such if hasOwnProperty is used, your suggestion is better ofcourse

Copy link
Contributor

Choose a reason for hiding this comment

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

This commit should be pulled in a separate PR, it would be merged immediately.

Copy link
Contributor

Choose a reason for hiding this comment

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

This commit fixes 3 actual bugs and should be made into a separate PR for immediate merge.

onClick={(e) => {
disableDropdownItemLink && setSearch(result.entityIdentifier);
onSelect(e, result, props);
onSelect ? onSelect(e, result, props) : defaultRedirect(e, result, props);
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious, does this shorter version work?

(onSelect ?? defaultRedirect)(e, result, props);

@veronikaslc veronikaslc changed the base branch from dev to remove-curly-brackets December 19, 2025 17:15
Added an ESLint recommended rules
Turned off no-undef and  no-extra-boolean-cast rules
Fixed react-hooks/rules-of-hooks rule
- Migrated deprecated core ESLint codestyle rules to the @stylistic/eslint-plugin
- Fixed emerged codestyle errors
- Extend recommended rules via spreading
- Removed js from commonPlugins because @eslint/js is not a plugin in flat config
- Added jsxA11y to plugins for future use
Extended on react.configs.recommended.rules
Removed react duplicated rules that are already included in recommended set
Extended rules on accessibility rules jsxA11y.configs.recommended.rules
Added react rule to report unused prop types
Added stylistic rule to monitor extra semicolimn
@veronikaslc veronikaslc changed the base branch from remove-curly-brackets to max-len December 19, 2025 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants