2025-08-11 16:16:38 +03:00
Add
2025-07-29 15:43:31 +03:00
Add
2025-07-29 15:43:31 +03:00
2025-08-11 16:16:38 +03:00
Add
2025-07-29 15:43:31 +03:00
Add
2025-07-29 15:43:31 +03:00
Add
2025-07-29 15:43:31 +03:00
Add
2025-07-29 15:43:31 +03:00
Add
2025-07-29 15:43:31 +03:00
Add
2025-07-29 15:43:31 +03:00
Add
2025-07-29 15:43:31 +03:00
Add
2025-07-29 15:43:31 +03:00

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

Expanding the ESLint configuration

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

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

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

      // Other configs...
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])

You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:

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

export default tseslint.config([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...
      // Enable lint rules for React
      reactX.configs['recommended-typescript'],
      // Enable lint rules for React DOM
      reactDom.configs.recommended,
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])

Инструкция на ютуб: https://www.youtube.com/watch?v=WqVM0W2Hb5A&ab_channel=NickGatzoulis

tatyana@fedora:~/Рабочий стол/777$ npm create vite@latest react -- --template react-ts

npx create-vite react --template react-ts

│ ◇ Scaffolding project in /home/tatyana/Рабочий стол/777/react... │ └ Done. Now run:

cd react npm install npm run dev

tatyana@fedora:/Рабочий стол/777$ cd react tatyana@fedora:/Рабочий стол/777/react$ npm install tailwindcss @tailwindcss/vite

added 208 packages, and audited 209 packages in 8s

51 packages are looking for funding run npm fund for details

found 0 vulnerabilities tatyana@fedora:~/Рабочий стол/777/react$ npm run dev

//1. И еще надо удалить App.css //2. Убрать импорт сss из App.tsx

Description
No description provided
Readme 14 MiB
Languages
TypeScript 96.9%
JavaScript 1.9%
CSS 0.8%
HTML 0.4%