Skip to content

Commit 7fc6562

Browse files
Merge pull request #1206 from Code-A2Z/avdhesh/jsx-to-tsx
Upgrading JSX to TSX
2 parents dbdfe9d + d09f70f commit 7fc6562

File tree

110 files changed

+11672
-78
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+11672
-78
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ bower_components
9797
# misc
9898
.sass-cache
9999
connect.lock
100-
typings
101100

102101
# Optional npm cache directory
103102
.npm

README.md

Lines changed: 4 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ It’s perfect for developers and writers who want to **showcase their work, col
4949

5050
Join us, contribute, and grow together! 🌍✨
5151

52-
<details>
53-
<summary><h4>:zap: Key Features 🏢</h4></summary>
52+
### :zap: Key Features 🏢
5453

5554
| **Feature** | **Description** |
5655
|----------------------------------|----------------|
@@ -64,10 +63,7 @@ Join us, contribute, and grow together! 🌍✨
6463
| **SEO Optimization** | Code A2Z - Project Blog ensures your content is easily found on search engines like Google. This helps in reaching more people and increasing engagement. |
6564
| **Role-Based Dashboard** | Different users have different levels of access. Admins can manage everything, collaborators can work on assigned projects, contributors can submit their work, and regular users can read and interact with blogs. |
6665

67-
</details>
68-
69-
<details>
70-
<summary><h4>:zap: What Can You Contribute? 👩‍💻</h4></summary>
66+
### :zap: What Can You Contribute? 👩‍💻
7167

7268
> Choose a contribution area that suits your skills
7369
@@ -81,10 +77,7 @@ Join us, contribute, and grow together! 🌍✨
8177
| **Code Readability** |
8278
| **Optimization** |
8379

84-
</details>
85-
86-
<details>
87-
<summary><h4>:zap: How to Contribute? 🤔</h4></summary>
80+
### :zap: How to Contribute? 🤔
8881

8982
1. Star the repository on GitHub to show your support.
9083
2. Browse the [**Issues**](https://github.com/Code-A2Z/code-a2z/issues) to find tasks that need attention.
@@ -95,80 +88,14 @@ Join us, contribute, and grow together! 🌍✨
9588
7. Submit a [**Pull Request**](https://github.com/Code-A2Z/code-a2z/pulls), and it will be reviewed.
9689
8. Make sure to read and follow the [**Contributing Guidelines**](https://github.com/Code-A2Z/code-a2z/blob/main/CONTRIBUTING.md) and [**Code of Conduct**](https://github.com/Code-A2Z/code-a2z/blob/main/CODE_OF_CONDUCT.md).
9790

98-
</details>
99-
100-
<details>
101-
<summary><h4>:zap: Add Your Project as a Submodule 🚀</h4></summary>
102-
103-
> We want your work to be readable by others; therefore, we encourage you to note the following:
104-
105-
<p align="center">
106-
<img src="https://raw.githubusercontent.com/Code-A2Z/assets/main/blog-script-submodule-addition.gif" alt="https://github.com/Code-A2Z/assets/blob/main/blog-script-submodule-addition.gif" width="700" />
107-
</p>
108-
109-
1. Project/Repository names should be in `kebab-case` letters (e.g., `to-do-list`, `joke-telling-application`).
110-
111-
> Ensure your repository contains the following files:
112-
113-
1. *README.md* → Briefly explain the project, its features, and use cases.
114-
2. *SETUP.md* → Step-by-step guide to setting up the project locally.
115-
3. *LICENSE* → Define the licensing terms for project usage.
116-
4. *SCREENSHOT* → Add an image showcasing the project’s UI, if available.
117-
5. *WORKING PROTOTYPE* → (Optional) Provide a live demo link or preview GIF/video.
118-
6. *DEPLOYED URL* → Attach a deployed URL in your project repository.
119-
120-
2. Run the following command to add your project as a submodule:
121-
122-
> Run this command from the root directory `/workspaces/<this-project-name>`
123-
124-
```bash
125-
git submodule add --depth 1 <your_project_repo_url> projects/<category>/<project_name>
126-
```
127-
128-
> Example for a web development project:
129-
> ```bash
130-
> git submodule add --depth 1 https://github.com/your-username/my-web-project.git projects/web-development/my-web-project
131-
> ```
132-
133-
3. Create a new branch.
134-
135-
```bash
136-
git checkout -b <add/project_name>
137-
```
138-
139-
4. Stage the changes
140-
```bash
141-
git add .
142-
```
143-
144-
5. Commit and Push changes
145-
146-
> Commit message should be clear. Never write un-necessary things in the commit messages.
147-
148-
```bash
149-
git commit -m "Add <project_name> as a submodule under <category>"
150-
git push -u origin <add/project_name>
151-
```
152-
153-
6. Create a Pull Request
154-
1. Go to your forked repository on GitHub.
155-
2. Click on Compare & pull request.
156-
3. Provide a clear description of your project.
157-
4. Submit the PR for review.
158-
159-
</details>
160-
161-
<details>
162-
<summary><h4>:zap: Pull Requests Review Criteria 🧲</h4></summary>
91+
### :zap: Pull Requests Review Criteria 🧲
16392

16493
1. Fill out the ***PR template*** properly when submitting a pull request.
16594
2. Do not commit directly to the `main` branch, otherwise your PR will be instantly rejected.
16695
3. Don't create more than 3-4 commits unless permitted by Admin and Mentors in your PR.
16796
4. Add comments to your code wherever necessary for clarity.
16897
5. 🚀 **Before submitting a PR, you must publish a blog about your project on our website. PRs without a blog will not be accepted.**
16998

170-
</details>
171-
17299
---
173100

174101
<div align="center">

client/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VITE_SERVER_DOMAIN=https://code-a2z.onrender.com

client/.vercelignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
projects/*
2+
backend/*

client/README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# React + TypeScript + Vite
2+
3+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4+
5+
Currently, two official plugins are available:
6+
7+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
8+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9+
10+
## Expanding the ESLint configuration
11+
12+
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
13+
14+
```js
15+
export default tseslint.config([
16+
globalIgnores(['dist']),
17+
{
18+
files: ['**/*.{ts,tsx}'],
19+
extends: [
20+
// Other configs...
21+
22+
// Remove tseslint.configs.recommended and replace with this
23+
...tseslint.configs.recommendedTypeChecked,
24+
// Alternatively, use this for stricter rules
25+
...tseslint.configs.strictTypeChecked,
26+
// Optionally, add this for stylistic rules
27+
...tseslint.configs.stylisticTypeChecked,
28+
29+
// Other configs...
30+
],
31+
languageOptions: {
32+
parserOptions: {
33+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
34+
tsconfigRootDir: import.meta.dirname,
35+
},
36+
// other options...
37+
},
38+
},
39+
])
40+
```
41+
42+
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
43+
44+
```js
45+
// eslint.config.js
46+
import reactX from 'eslint-plugin-react-x'
47+
import reactDom from 'eslint-plugin-react-dom'
48+
49+
export default tseslint.config([
50+
globalIgnores(['dist']),
51+
{
52+
files: ['**/*.{ts,tsx}'],
53+
extends: [
54+
// Other configs...
55+
// Enable lint rules for React
56+
reactX.configs['recommended-typescript'],
57+
// Enable lint rules for React DOM
58+
reactDom.configs.recommended,
59+
],
60+
languageOptions: {
61+
parserOptions: {
62+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
63+
tsconfigRootDir: import.meta.dirname,
64+
},
65+
// other options...
66+
},
67+
},
68+
])
69+
```

client/eslint.config.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
import reactHooks from 'eslint-plugin-react-hooks'
4+
import reactRefresh from 'eslint-plugin-react-refresh'
5+
import tseslint from 'typescript-eslint'
6+
import { globalIgnores } from 'eslint/config'
7+
8+
export default tseslint.config([
9+
globalIgnores(['dist']),
10+
{
11+
files: ['**/*.{ts,tsx}'],
12+
extends: [
13+
js.configs.recommended,
14+
tseslint.configs.recommended,
15+
reactHooks.configs['recommended-latest'],
16+
reactRefresh.configs.vite,
17+
],
18+
languageOptions: {
19+
ecmaVersion: 2020,
20+
globals: globals.browser,
21+
},
22+
},
23+
])

client/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/logo.png" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Code A2Z - Project Blog</title>
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
<script type="module" src="/src/main.tsx"></script>
12+
</body>
13+
</html>

0 commit comments

Comments
 (0)