Skip to content

Commit fc3fc7a

Browse files
nzakasamareshsm
andauthored
fix: Scope errors (#51)
Co-authored-by: Amaresh S M <[email protected]>
1 parent 759ec6b commit fc3fc7a

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

package-lock.json

Lines changed: 4 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"eslint-plugin-jsx-a11y": "^6.9.0",
5757
"eslint-plugin-react": "^7.35.0",
5858
"eslint-plugin-react-hooks": "^4.6.2",
59-
"eslint-scope": "^8.0.1",
59+
"eslint-scope": "^8.1.0",
6060
"espree": "^10.1.0",
6161
"global": "^4.4.0",
6262
"graphviz-react": "^1.2.5",

src/components/scope/scope-item.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ export const ScopeItem: FC<ScopeItemProperties> = ({
3636
key = (data as Record<string, string>)?.type ?? typeof data;
3737
}
3838

39+
// filter out hidden properties
40+
const properties = Object.entries(data).filter(
41+
([name]) => !name.startsWith("__"),
42+
);
43+
3944
return (
4045
<AccordionItem
4146
value={path + "." + index + "." + key}
@@ -46,7 +51,7 @@ export const ScopeItem: FC<ScopeItemProperties> = ({
4651
</AccordionTrigger>
4752
<AccordionContent className="p-4 border-t">
4853
<div className="space-y-1">
49-
{Object.entries(data).map((item, index) => (
54+
{properties.map((item, index) => (
5055
<TreeEntry
5156
key={item[0]}
5257
data={item}

0 commit comments

Comments
 (0)