Skip to content

Conversation

mantasha-shaikh
Copy link

Perfect! Yahaan updated documentation hai without point 5 (OpenSSL Warning) and 6 (rm -rf PowerShell error):


Resolved Errors & Warnings – React Project (Documentation)


1. ⚠️ jsx-a11y/anchor-is-valid

🔹 Issue:
Anchor (<a>) tag invalid usage — jaise ki href="#" bina actual navigation ke.

🔹 Solution:

  • Use React Router’s <Link> instead of <a>.
  • Ya agar <a> hi use karna ho, toh proper href lagaayein (e.g., /home, https://example.com).

✅ Fixed Example:

import { Link } from 'react-router-dom';

<Link to="/home">Home</Link>

2. ⚠️ no-unused-vars

🔹 Issue:
Aapne koi variable ya parameter declare kiya jo baad mein kabhi use nahi hua.

🔹 Solution:

  • Unused variable ko remove karo
  • Ya agar temporarily disable karna ho, toh ESLint ignore comment use karo.

✅ Fixed Example:

// ❌ Wrong
const unused = "I am not used";

// ✅ Fixed
// Removed the unused variable

3. ❌ React Component Should Start with Capital Letter

🔹 Issue:
JSX mein component lowercase se likha (e.g., <ourImpact/>), jo HTML tag samjha gaya.

🔹 Solution:
React components ka naam UpperCamelCase mein hona chahiye.

✅ Fixed Example:

// ❌ Wrong
<ourImpact />

// ✅ Correct
<OurImpact />

4. ❌ PostCSS Version Incompatibility Error

🔹 Issue:
Error: Cannot find module 'postcss/lib/tokenize'
Caused by version mismatch between postcss and postcss-safe-parser.

🔹 Solution:
Compatible versions manually install kiye:

npm install postcss@8.4.21 postcss-safe-parser@6.0.0

🧼 Recommended Step After Fixes:

# Clean Install (if needed)
rm -rf node_modules package-lock.json  # Mac/Linux
# or use correct PowerShell syntax in Windows
npm install
npm start

i changes react rename but still redo

✅ Conclusion:

Ab tumhara project:

  • ✅ ESLint warnings se mostly clean hai
  • ✅ Compatibility issues resolve ho chuke hain
  • ✅ Accessibility improve ho chuki hai

Agar chaho toh main isse .md ya .txt file bana du upload ke liye. Batao?

@mantasha-shaikh
Copy link
Author

hey i dont know not any one response to me this my fisrt i dont know its good or bad let me somthing i am very enjoy

@mantasha-shaikh
Copy link
Author

hey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant