diff --git a/.github/workflows /main.yml b/.github/workflows /main.yml deleted file mode 100644 index 0760e01..0000000 --- a/.github/workflows /main.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Deploy to Server - -on: - push: - branches: - - main - -jobs: - deploy: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Install sshpass - run: | - env - mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -p 6969 ${{ secrets.HOST }} >> ~/.ssh/known_hosts - sudo apt-get install sshpass - - - name: Deploy to server - run: | - sshpass -p '${{ secrets.SSH_PRIVATE_KEY }}' ssh -v -o StrictHostKeyChecking=no ${{ secrets.USER }}@${{ secrets.HOST }} -p 6969 <<'ENDSSH' - cd ${{ secrets.WORK_DIR }} - git pull - ENDSSH diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 0760e01..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Deploy to Server - -on: - push: - branches: - - main - -jobs: - deploy: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Install sshpass - run: | - env - mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan -p 6969 ${{ secrets.HOST }} >> ~/.ssh/known_hosts - sudo apt-get install sshpass - - - name: Deploy to server - run: | - sshpass -p '${{ secrets.SSH_PRIVATE_KEY }}' ssh -v -o StrictHostKeyChecking=no ${{ secrets.USER }}@${{ secrets.HOST }} -p 6969 <<'ENDSSH' - cd ${{ secrets.WORK_DIR }} - git pull - ENDSSH diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..1b8ac88 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +# Ignore artifacts: +build +coverage diff --git a/.prettierrc b/.prettierrc index fd496a8..0967ef4 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,4 +1 @@ -{ - "singleQuote": true, - "semi": false -} +{} diff --git a/README.md b/README.md index 7059a96..a36934d 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,12 @@ 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-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh +- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs) +- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) + +## React Compiler + +The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation). ## Expanding the ESLint configuration diff --git a/eslint.config.js b/eslint.config.js index ec2b712..6196e83 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,33 +1,29 @@ -import js from '@eslint/js' -import globals from 'globals' -import reactHooks from 'eslint-plugin-react-hooks' -import reactRefresh from 'eslint-plugin-react-refresh' +import js from "@eslint/js"; +import globals from "globals"; +import reactHooks from "eslint-plugin-react-hooks"; +import reactRefresh from "eslint-plugin-react-refresh"; +import { defineConfig, globalIgnores } from "eslint/config"; -export default [ - { ignores: ['dist'] }, +export default defineConfig([ + globalIgnores(["dist"]), { - files: ['**/*.{js,jsx}'], + files: ["**/*.{js,jsx}"], + extends: [ + js.configs.recommended, + reactHooks.configs.flat.recommended, + reactRefresh.configs.vite, + ], languageOptions: { ecmaVersion: 2020, globals: globals.browser, parserOptions: { - ecmaVersion: 'latest', + ecmaVersion: "latest", ecmaFeatures: { jsx: true }, - sourceType: 'module', + sourceType: "module", }, }, - plugins: { - 'react-hooks': reactHooks, - 'react-refresh': reactRefresh, - }, rules: { - ...js.configs.recommended.rules, - ...reactHooks.configs.recommended.rules, - 'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }], - 'react-refresh/only-export-components': [ - 'warn', - { allowConstantExport: true }, - ], + "no-unused-vars": ["error", { varsIgnorePattern: "^[A-Z_]" }], }, }, -] +]); diff --git a/eslintrc.json b/eslintrc.json deleted file mode 100644 index 83183a4..0000000 --- a/eslintrc.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "env": { - "browser": true, - "es2021": true - }, - "extends": [ - "eslint:recommended", - "plugin:react/recommended", - "plugin:prettier/recommended" - ], - "parserOptions": { - "ecmaVersion": 12, - "sourceType": "module" - }, - "rules": { - "prettier/prettier": [ - "error", - { - "singleQuote": true, - "semi": false - } - ] - } -} diff --git a/index.html b/index.html index f54d6bf..6f7b2ef 100644 --- a/index.html +++ b/index.html @@ -1,17 +1,13 @@ - -
- - - -