Skip to content

Commit

Permalink
chore: upgrade husky and dev dependencies majors
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbarion committed May 8, 2024
1 parent 04bdb86 commit bb7380c
Show file tree
Hide file tree
Showing 3 changed files with 436 additions and 878 deletions.
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"eslint": "eslint --ext=js --ext=jsx --ext=ts --ext=tsx --fix ./src",
"stylelint": "stylelint \"src/**/*.css\"",
"prettier": "prettier --config ./.prettierrc.json --write \"src/**/*{.js,.jsx,.ts,.tsx,.css}\"",
"prepare": "husky install",
"prepare": "husky",
"bundlesize": "bundlesize",
"esbuild": "esbuild",
"test": "jest",
Expand Down Expand Up @@ -71,20 +71,20 @@
"esbuild-css-modules-plugin": "^2.7.1",
"eslint": "8.57.0",
"eslint-config-airbnb": "19.0.4",
"eslint-config-prettier": "8.6.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-jsx-a11y": "6.8.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-react": "7.34.1",
"eslint-plugin-react-hooks": "^4.2.0",
"husky": "8.0.3",
"husky": "9.0.11",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"jest-transform-css": "6.0.1",
"lint-staged": "13.1.2",
"lint-staged": "15.2.2",
"minimist": "^1.2.8",
"postcss": "8.4.36",
"prettier": "2.8.4",
"postcss": "8.4.37",
"prettier": "3.2.5",
"process": "^0.11.10",
"react": "16.14.0",
"react-dom": "16.14.0",
Expand All @@ -102,9 +102,9 @@
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-visualizer": "5.12.0",
"style-loader": "3.3.4",
"stylelint": "^13.13.1",
"stylelint-config-prettier": "^8.0.2",
"stylelint-config-standard": "^22.0.0",
"stylelint": "16.2.1",
"stylelint-config-prettier": "9.0.5",
"stylelint-config-standard": "36.0.0",
"ts-jest": "29.1.2",
"ts-node": "10.9.2",
"typescript": "5.4.2"
Expand Down
17 changes: 10 additions & 7 deletions src/components/TooltipController/TooltipController.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,16 @@ const TooltipController = React.forwardRef<TooltipRefProps, ITooltipController>(
const styleInjectionRef = useRef(disableStyleInjection)

const getDataAttributesFromAnchorElement = (elementReference: HTMLElement) => {
const dataAttributes = elementReference?.getAttributeNames().reduce((acc, name) => {
if (name.startsWith('data-tooltip-')) {
const parsedAttribute = name.replace(/^data-tooltip-/, '') as DataAttribute
acc[parsedAttribute] = elementReference?.getAttribute(name) ?? null
}
return acc
}, {} as Record<DataAttribute, string | null>)
const dataAttributes = elementReference?.getAttributeNames().reduce(
(acc, name) => {
if (name.startsWith('data-tooltip-')) {
const parsedAttribute = name.replace(/^data-tooltip-/, '') as DataAttribute
acc[parsedAttribute] = elementReference?.getAttribute(name) ?? null
}
return acc
},
{} as Record<DataAttribute, string | null>,
)

return dataAttributes
}
Expand Down
Loading

0 comments on commit bb7380c

Please sign in to comment.