Skip to content

Commit 0b160a5

Browse files
justin808claude
andcommitted
Fix ESLint no-base-to-string with JSON.stringify
String() still triggers the rule since it calls toString() internally. Use JSON.stringify() instead which properly handles object types. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 1fa0de9 commit 0b160a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

react_on_rails_pro/spec/dummy/client/app/components/LazyApolloGraphQL.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const UserPanel = () => {
7777
</button>
7878

7979
{updating && <div>Updating...</div>}
80-
{updateError && <div style={{ color: 'red' }}>Error while updating User: {String(updateError)}</div>}
80+
{updateError && <div style={{ color: 'red' }}>Error while updating User: {JSON.stringify(updateError)}</div>}
8181
</div>
8282
);
8383
};

0 commit comments

Comments
 (0)