Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,17 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci
- name: Install root dependencies
run: npm install

- name: Install client dependencies
run: cd client && npm install

- name: Install server dependencies
run: cd server && npm install

- name: Check code formatting
run: npm run format:check
Expand Down
4 changes: 4 additions & 0 deletions client/.env.example
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
VITE_SERVER_DOMAIN=https://code-a2z.onrender.com
VITE_ACCESS_TOKEN_DURATION=15
VITE_REFRESH_TOKEN_DURATION=7
VITE_ACCESS_TOKEN_NAME=access_token
VITE_REFRESH_TOKEN_NAME=refresh_token
6 changes: 6 additions & 0 deletions client/.vercelignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
projects/*
server/*
client/src/modules/edit-profile/*
client/src/modules/manage-projects/*
client/src/modules/notification/*
src/modules/edit-profile/*
src/modules/manage-projects/*
src/modules/notification/*
26 changes: 16 additions & 10 deletions client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,33 @@ This template provides a minimal setup to get React working in Vite with HMR and

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh
- [@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

## React Compiler

The React Compiler is enabled on this template. See [this documentation](https://react.dev/learn/react-compiler) for more information.

Note: This will impact Vite dev & build performances.

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

```js
export default tseslint.config([
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...

// Remove tseslint.configs.recommended and replace with this
...tseslint.configs.recommendedTypeChecked,
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
...tseslint.configs.strictTypeChecked,
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
...tseslint.configs.stylisticTypeChecked,
tseslint.configs.stylisticTypeChecked,

// Other configs...
],
Expand All @@ -36,17 +42,17 @@ export default tseslint.config([
// other options...
},
},
])
]);
```

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:

```js
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
import reactX from 'eslint-plugin-react-x';
import reactDom from 'eslint-plugin-react-dom';

export default tseslint.config([
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
Expand All @@ -65,5 +71,5 @@ export default tseslint.config([
// other options...
},
},
])
]);
```
9 changes: 7 additions & 2 deletions client/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'
import { globalIgnores } from 'eslint/config'
import { defineConfig, globalIgnores } from 'eslint/config'

export default tseslint.config([
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
Expand All @@ -19,5 +19,10 @@ export default tseslint.config([
ecmaVersion: 2020,
globals: globals.browser,
},
rules: {
// Disable react-in-jsx-scope for React 17+ (not needed)
'react/react-in-jsx-scope': 'off',
'react/jsx-uses-react': 'off',
},
},
])
Loading