Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammadaziz01-dev committed Apr 18, 2024
1 parent eaaadca commit 87e57ab
Show file tree
Hide file tree
Showing 6 changed files with 709 additions and 123 deletions.
94 changes: 3 additions & 91 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,94 +1,6 @@
# React + TypeScript + Vite
## Happy coding : )
### Serverni ishga tushurish ushun terminalda qoydagi kamandani yozing janob

# Main

- Try to keep pages server component;
- Use BEM
- Use FC generic for Component
- Use the same node version (v20.9.0)

# Imports order

- Next components and utils
- React
- Third libraries
- React components
- Utils
- Style

# Pages

- Pages are stored in the app folder

- Naming -> CategoriesPage, CategoryPage

# Files

File naming is `kebab-case`

- User.jsx => bad
- user.jsx => good

<br />

- loginCard.jsx => bad
- LoginCard.jsx => bad
- login-card.jsx => good

# Components

- Creating component
```
modal
index.tsx
style.scss
card
index.tsx
style.scss
```
- Component naming is PascalCase

```
<UserComponent />
```
- Component is made without margin

# Hooks

Hooks naming is camelCase

```
useFetch
```

# Variables

Sass folder -> variables.scss





## Expanding the ESLint configuration

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

- Configure the top-level `parserOptions` property like this:

```js
export default {
// other rules...
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
}
```
npm run server
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
```
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@

<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/svg+xml" href="https://cdn2.iconfinder.com/data/icons/flat-style-svg-icons-part-1/512/client_list_text-512.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Link React-bootstrap -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous" />
<!-- Link Botstrap Icons -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
<title>Table API</title>
</head>

Expand Down
Loading

0 comments on commit 87e57ab

Please sign in to comment.