Skip to content

Commit

Permalink
fix(js): Fix eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
desiprisg committed Jul 11, 2024
1 parent f976182 commit a3e3039
Show file tree
Hide file tree
Showing 5 changed files with 225 additions and 81 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@
"@types/inquirer": "8.2.10",
"@types/jest": "29.5.2",
"@types/node": "^20.14.10",
"@typescript-eslint/eslint-plugin": "^5.50.0",
"@typescript-eslint/parser": "^5.50.0",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"auto": "^10.36.5",
"chalk": "4.1.2",
"chalk-animation": "^1.6.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/js/src/ui/components/Popover/PopoverContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ export const PopoverContent: ParentComponent<{ classes: string }> = (props) => {
],
});

const handleClickOutside = (e: any) => {
if (contentRef()?.contains(e.target)) return;
const handleClickOutside = (e: MouseEvent) => {
if (contentRef()?.contains(e.target as Node)) return;
onClose();
};

const handleEscapeKey = (e: any) => {
const handleEscapeKey = (e: KeyboardEvent) => {
if (e.key === 'Escape') {
onClose();
}
Expand Down
3 changes: 2 additions & 1 deletion packages/js/src/ui/context/AppearanceContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export type CSSProperties = {

export type ElementStyles = string | CSSProperties;

/* The double underscore signals that entire key extends the right part of the key
/*
* The double underscore signals that entire key extends the right part of the key
* i.e. foo__bar means that foo_bar is an extension of bar. Both keys will be applied when foo_bar is used
* meaning you would have `bar foo__bar` in the dom
*/
Expand Down
1 change: 1 addition & 0 deletions packages/js/src/ui/helpers/useStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const useStyle = () => {
finalAppearanceKeys.sort((a, b) => {
const countA = (a.match(/__/g) || []).length;
const countB = (b.match(/__/g) || []).length;

return countA - countB;
});

Expand Down
Loading

0 comments on commit a3e3039

Please sign in to comment.