Skip to content

Commit 4f25f90

Browse files
authored
Merge pull request #5 from HellBus1/staging
v1.0.0
2 parents 0dbe857 + b13781b commit 4f25f90

27 files changed

+2338
-232
lines changed

.eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
reportWebVitals.js
2+
setupTests.js
3+
vite.config.js

.eslintrc.cjs

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,31 @@
11
module.exports = {
22
root: true,
3-
env: { browser: true, es2020: true },
3+
env: {
4+
browser: true, es2020: true,
5+
},
46
extends: [
57
'eslint:recommended',
68
'plugin:@typescript-eslint/recommended',
79
'plugin:react-hooks/recommended',
810
],
911
ignorePatterns: ['dist', '.eslintrc.cjs'],
1012
parser: '@typescript-eslint/parser',
13+
parserOptions: {
14+
ecmaFeatures: {
15+
tsx: true,
16+
},
17+
ecmaVersion: 'latest',
18+
requireConfigFile: false,
19+
sourceType: 'module'
20+
},
1121
plugins: ['react-refresh'],
1222
rules: {
1323
'react-refresh/only-export-components': [
1424
'warn',
1525
{ allowConstantExport: true },
1626
],
27+
'comma-dangle': ['error', 'never'],
28+
'no-underscore-dangle': 'off',
29+
'class-methods-use-this': 'off',
1730
},
1831
}

.husky/pre-commit

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
#npm test
5+
6+
npm run lint-staged

.prettierignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Ignore artifacts
2+
build
3+
coverage
4+
5+
# Ignore public content
6+
public

.prettierrc.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"semi": false,
3+
"tabWidth": 2,
4+
"printWidth": 100,
5+
"singleQuote": true,
6+
"trailingComma": "none",
7+
"jsxSingleQuote": true,
8+
"bracketSpacing": true,
9+
"arrowParens": "always"
10+
}

README.md

+57-21
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,66 @@
1-
# React + TypeScript + Vite
1+
# Lightweight React JS + Vite Starter Kit Template
22

3-
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
3+
<https://github.com/user-attachments/assets/2ee04f33-57dd-42d0-80d7-bc173aa76b2e>
44

5-
Currently, two official plugins are available:
5+
<div align="center">
6+
<!-- <img alt="GitHub release" src="https://img.shields.io/github/v/release//HellBus1/ts-react-tailwind-starter?include_prereleases"> -->
7+
<img alt="GitHub react version" src="https://img.shields.io/github/package-json/dependency-version/HellBus1/ts-react-tailwind-starter/react?style=flat">
8+
</div>
69

7-
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
8-
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
10+
## Description
911

10-
## Expanding the ESLint configuration
12+
A React.js template with Vite ⚡ is super simple and ready to go. It comes packed with all the essential libraries you need for modern frontend development.
1113

12-
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
14+
### Why Vite?
1315

14-
- Configure the top-level `parserOptions` property like this:
16+
Here is several things that made vite is better bundler out there :
1517

16-
```js
17-
export default {
18-
// other rules...
19-
parserOptions: {
20-
ecmaVersion: 'latest',
21-
sourceType: 'module',
22-
project: ['./tsconfig.json', './tsconfig.node.json', './tsconfig.app.json'],
23-
tsconfigRootDir: __dirname,
24-
},
25-
}
18+
1. **Instant Server Start**: No more waiting around—start your server instantly.
19+
2. **Lightning Fast HMR**: Hot Module Replacement that's truly fast.
20+
3. **Create React App Best Alternative**: Skip the unecessary clutter of Create React App 🙂.
21+
4. **And More**: There are plenty of other reasons to love Vite!
22+
23+
If you’re curious to explore Vite further, check out the [link](https://vitejs.dev/)
24+
25+
## Features
26+
27+
Here is the building blocks of this repository
28+
29+
- 📟 **Navigation**: Configured with [React Router DOM](https://reactrouter.com/en/main) for dynamic routing.
30+
- 🔋 **CSS Frameworks**: [Tailwind CSS](https://tailwindcss.com/) and [Daisy UI](https://daisyui.com/) for rapid UI development with minimal custom styling.
31+
- 📊 **Code Formatting**: [Prettier](https://prettier.io/) is integrated to ensure consistent code style across the project.
32+
- 🗂️ **Linting**: [ESLint](https://eslint.org/) is set up to enforce coding standards and best practices.
33+
- 📮 **Pre-commit Hooks**: [Husky](https://github.com/lint-staged/lint-staged) is utilized to run automated checks before code is committed.
34+
- 🛠️ **Lint-Staged**: Paired with Husky, [lint-staged](https://github.com/lint-staged/lint-staged) handles formatting and linting for all staged changes.
35+
36+
## Getting Started
37+
38+
1. **Clone the repository** :
39+
```shell
40+
git clone https://github.com/HellBus1/ts-react-tailwind-starter.git
41+
cd ts-react-tailwind-starter
42+
```
43+
44+
2. **Install dependencies** :
45+
```shell
46+
npm install
2647
```
2748

28-
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
29-
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
30-
- 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
49+
3. **Run the development server** :
50+
```shell
51+
npm run dev
52+
```
53+
54+
4. **Build for production** :
55+
```shell
56+
npm run build
57+
```
58+
59+
## Getting Started
60+
61+
Contributions are welcome! Please open an issue or submit a pull request.
62+
63+
## Supports Me
64+
Want to see more free, high-quality code and articles? Buy me a coffee and make it happen!
65+
66+
[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/syubban)

0 commit comments

Comments
 (0)