Skip to content
This repository has been archived by the owner on Oct 12, 2024. It is now read-only.

Commit

Permalink
chore: git cache
Browse files Browse the repository at this point in the history
  • Loading branch information
emre-cil committed May 16, 2023
1 parent 0a11ac9 commit 5fbe170
Show file tree
Hide file tree
Showing 38 changed files with 4,956 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env.development.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_API_URL=https://api.example.com
1 change: 1 addition & 0 deletions .env.production.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_API_URL=https://api.example.com
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
node_modules/*
public
build
dist
dist-ssr
70 changes: 70 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
module.exports = {
extends: [
'airbnb',
'prettier',
'eslint:recommended',
'plugin:react/recommended',
'plugin:import/recommended',
'plugin:jsx-a11y/recommended',
'eslint-config-prettier',
],
plugins: ['react', 'react-hooks', 'prettier', 'jsx-a11y', 'import'],
settings: {
react: {
// Tells eslint-plugin-react to automatically detect the version of React to use.
version: 'detect',
},
// Tells eslint how to resolve imports
'import/resolver': {
node: {
paths: ['src'],
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
env: {
browser: true,
es2021: true,
jest: true,
},
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
rules: {
'import/extensions': 'off',
'import/no-unresolved': 'off',
'react/prop-types': 'off',
'prettier/prettier': 'error',
'jsx-a11y/anchor-is-valid': 'off',
'react-hooks/exhaustive-deps': 'off',
'react/react-in-jsx-scope': 'off',
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
'no-unused-expressions': [
'error',
{ allowShortCircuit: true, allowTernary: true },
],
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true,
},
],
'linebreak-style': 'off',
'implicit-arrow-linebreak': 'off',
indent: 'off',
'object-curly-newline': 'off',
'operator-linebreak': 'off',
'no-confusing-arrow': 'off',
'function-paren-newline': 'off',
'no-mixed-operators': 'off',
'no-underscore-dangle': 'off',
'no-plusplus': 'off',
'no-param-reassign': 'off',
'no-unused-vars': 'off',
'react/react-in-jsx-scope': 'off',
},
};
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

.env
9 changes: 9 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
node_modules
/.cache
/.husky
.eslintignore
.gitignore
.git
LICENSE
build
dist
7 changes: 7 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": true,
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": true
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Emre Çil

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
73 changes: 73 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
## viterjs-template

JavaScript + React + Redux + Mui + Axios + ESLint + Prettier

![viterjs-template](https://iili.io/yYpGaV.md.png)

### Getting Started

#### Clone the repo

```
npx degit emre-cil/viterjs-template my-app
```

```
cd my-app
```

#### Install Dependencies

```
pnpm install
```

#### Run

```
pnpm dev
```

#### Paths

Application using absolute paths
Example: '@/components/Counter/Counter';

if you don't want to use you can remove these lines from

> vite.config.js
```
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
},
extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'],
},
```

> jsconfig.json
```
"paths": {
"@/*": ["./*"]
}
```



### Scripts

| Script | Description |
| ------------- | ---------------------------------- |
| pnpm dev | Runs the application. |
| pnpm build | Create builds for the application. |
| pnpm preview | Runs the Vite preview |
| pnpm lint | Display eslint errors |
| pnpm lint:fix | Fix the eslint errors |
| pnpm format | Runs prettier for all files |
| pnpm test | Run tests |


### Check List
````
16 changes: 16 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Dosis:wght@300;400;500;600&display=swap" rel="stylesheet" />
<title>Vite + React</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
18 changes: 18 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "ESNext",
"jsx": "react-jsx",
"allowJs": true,
"noEmit": true,
"resolveJsonModule": true,
"moduleResolution": "Node",
"allowSyntheticDefaultImports": true,
"baseUrl": "./src",
"paths": {
"@/*": ["./*"]
}
},
"exclude": ["node_modules", "**/node_modules/*", "dist", "**/dist/*"],
"include": ["src/**/*"]
}
71 changes: 71 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"name": "viterjs-template",
"version": "1.1.7",
"description": "React + Vite + Redux + MuI + axios + RRD + Prettier => Boilerplate",
"license": "MIT",
"author": "emrecil <info.emrecil@gmail.com>",
"keywords": [
"react",
"boilerplate",
"javaScript",
"starter",
"vite",
"redux",
"material-ui",
"axios",
"rrd",
"prettier"
],
"repository": {
"type": "git",
"url": "https://github.com/emre-cil/viterjs-template.git"
},
"bugs": {
"url": "https://github.com/emre-cil/viterjs-template/issues"
},
"homepage": "https://github.com/emre-cil/viterjs-template#readme",
"scripts": {
"dev": "vite --open",
"start": "vite --open",
"host": "vite --open --host",
"build": "vite build",
"preview": "vite preview",
"lint": "eslint src --ext .js,.jsx,.ts,.tsx",
"lint:fix": "eslint src --ext .js,.jsx,.ts,.tsx --fix",
"format": "prettier \"src/**/*.{js,jsx,ts,tsx,css,scss}\" --write",
"format+lint": "prettier \"src/**/*.{js,jsx,ts,tsx,css,scss}\" --write && eslint src --ext .js,.jsx,.ts,.tsx --fix",
"test": "vitest run",
"test:watch": "vitest",
"test:cover": "vitest run --coverage"
},
"dependencies": {
"@emotion/react": "^11.11.0",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.11.16",
"@mui/material": "^5.13.0",
"@reduxjs/toolkit": "^1.9.5",
"axios": "^1.4.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-redux": "^8.0.5",
"react-router-dom": "^6.11.1"
},
"devDependencies": {
"@babel/core": "^7.21.8",
"@types/react": "^18.2.6",
"@types/react-dom": "^18.2.4",
"@vitejs/plugin-react-swc": "^3.3.1",
"eslint": "^8.40.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"prettier": "^2.8.8",
"vite": "^4.3.6",
"vite-plugin-fonts": "^0.7.0",
"vitest": "^0.31.0"
}
}
Loading

0 comments on commit 5fbe170

Please sign in to comment.