djangoindia / djangoindia.org

Official website of djangoindia community.
MIT License
6 stars 8 forks source link

unescaped apostrophes in React components during build #28

Closed SureshPradhana closed 1 week ago

SureshPradhana commented 1 week ago

Description:

When running npm run buildon /frontend directory, I encountered the following error:

./src/components/Goals/page.tsx
51:27  Error: `'` can be escaped with `'`, `‘`, `'`, `’`.  react/no-unescaped-entities

./src/components/WhatIsDjango/page.tsx
43:35  Error: `'` can be escaped with `'`, `‘`, `'`, `’`.  react/no-unescaped-entities
44:32  Error: `'` can be escaped with `'`, `‘`, `'`, `’`.  react/no-unescaped-entities
45:16  Error: `'` can be escaped with `'`, `‘`, `'`, `’`.  react/no-unescaped-entities

Environment:

Next.js version: 14.2.3 Node.js version: 20.12.2 OS: Arch linux

Suggested Possible Solution

Render as a JS string literal (with double-quotes):

return (<p>{"I've seen the movie."}</p>)

... or use the HTML entity for an apostrophe, ':

return (<p>I&apos;ve seen the movie.</p>)
harshav1989 commented 1 week ago

hey @SureshPradhana i'd like to help with this. can u assign me this issue?

SureshPradhana commented 1 week ago

Hello @harshav1989 , I can't assign issues here . I suggest you request @DevilsAutumn or the repo owners for assignment. btw, i made a pull request on this issue.