feat: инициализация проекта с React 19 и TypeScript 5

- Создан package.json со всеми зависимостями
- Добавлены npm скрипты для разработки и сборки
- Создана базовая структура: src/, public/
- Настроен .gitignore (игнорирование папок с точкой)
- Добавлен базовый React компонент с TypeScript
This commit is contained in:
Ilia Mashkov
2025-11-19 10:17:50 +03:00
parent 1946ec7c41
commit 1318800f75
6 changed files with 8726 additions and 0 deletions

11
.gitignore vendored Normal file
View File

@@ -0,0 +1,11 @@
# Игнорировать все папки, начинающиеся с точки
.*
# Исключения (не игнорировать)
!.gitignore
# Директории сборки
/build
/node_modules
/dist
/storybook-static

68
package.json Normal file
View File

@@ -0,0 +1,68 @@
{
"name": "only-task",
"version": "1.0.0",
"description": "Modern React 19 + TypeScript 5 application",
"main": "index.js",
"scripts": {
"dev": "webpack serve --mode development",
"build": "webpack --mode production",
"lint": "eslint src --ext .ts,.tsx",
"lint:styles": "stylelint 'src/**/*.{css,scss}'",
"type-check": "tsc --noEmit"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@babel/core": "^7.26.0",
"@babel/preset-env": "^7.26.0",
"@babel/preset-react": "^7.26.0",
"@babel/preset-typescript": "^7.26.0",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
"@svgr/webpack": "^8.1.0",
"@types/node": "^22.0.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@types/webpack": "^5.28.5",
"@types/webpack-bundle-analyzer": "^4.7.0",
"@typescript-eslint/eslint-plugin": "^8.16.0",
"@typescript-eslint/parser": "^8.16.0",
"babel-loader": "^9.2.0",
"css-loader": "^7.1.0",
"eslint": "^9.15.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest": "^28.9.0",
"eslint-plugin-jsx-a11y": "^6.10.0",
"eslint-plugin-prettier": "^5.2.0",
"eslint-plugin-react": "^7.37.0",
"eslint-plugin-react-hooks": "^5.0.0",
"@eslint/js": "^9.15.0",
"typescript-eslint": "^8.16.0",
"globals": "^15.12.0",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.6.0",
"mini-css-extract-plugin": "^2.9.0",
"prettier": "^3.4.0",
"react-refresh": "^0.14.2",
"sass": "^1.81.0",
"sass-loader": "^16.0.0",
"style-loader": "^4.0.0",
"stylelint": "^16.11.0",
"stylelint-config-standard-scss": "^13.1.0",
"stylelint-order": "^6.0.4",
"stylelint-semantic-groups": "^1.2.1",
"ts-loader": "^9.5.0",
"ts-node": "^10.9.2",
"typescript": "^5.7.0",
"webpack": "^5.96.0",
"webpack-bundle-analyzer": "^4.10.0",
"webpack-cli": "^5.1.0",
"webpack-dev-server": "^5.1.0"
}
}

8615
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

15
public/index.html Normal file
View File

@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Test task for Only</title>
</head>
<body>
<div id="root"></div>
</body>
</html>

5
src/App.tsx Normal file
View File

@@ -0,0 +1,5 @@
const App = () => {
return <div>Test</div>
}
export default App

12
src/index.tsx Normal file
View File

@@ -0,0 +1,12 @@
import { createRoot } from 'react-dom/client'
import App from './App'
const container = document.getElementById('root')
if (!container) {
throw new Error('Root element not found')
}
const root = createRoot(container)
root.render(<App />)