This commit is contained in:
2020-10-10 13:52:57 +03:00
committed by Stepan Usatiuk
commit 442e882b72
24 changed files with 18262 additions and 0 deletions

38
frontend/.eslintrc.json Normal file
View File

@@ -0,0 +1,38 @@
{
"plugins": [
"jest",
"react",
"react-hooks",
"html"
],
"extends": [
"plugin:jest/recommended",
"plugin:react-hooks/recommended",
"plugin:react/recommended"
],
"env": {
"browser": true
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"project": "./tsconfig.json"
},
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [
".ts",
".tsx"
]
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true,
"project": [
"./tsconfig.json"
]
}
}
}
}

13
frontend/.gitignore vendored Normal file
View File

@@ -0,0 +1,13 @@
.idea/
node_modules/
build/
tmp/
temp/
dist/
ormconfig.json
ormconfig.test.json
.env
.cache
.directory
.history
.parcel-cache

13278
frontend/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

42
frontend/package.json Normal file
View File

@@ -0,0 +1,42 @@
{
"name": "photos-frontend",
"scripts": {
"start": "parcel serve src/index.html",
"build": "parcel build src/index.html",
"lint": "eslint ./src/** --ext .js,.jsx,.ts,.tsx",
"test": "jest"
},
"postcss": {
"plugins": {
"autoprefixer": true
}
},
"dependencies": {
"@typescript-eslint/eslint-plugin": "^4.4.0",
"@typescript-eslint/parser": "^4.4.0",
"eslint": "^7.10.0",
"eslint-config-prettier": "^6.12.0",
"eslint-import-resolver-typescript": "^2.3.0",
"eslint-plugin-html": "^6.1.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^24.1.0",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.21.3",
"eslint-plugin-react-hooks": "^4.1.2",
"jest": "^26.5.2",
"parcel": "^2.0.0-nightly.419",
"prettier": "^2.1.2",
"prettier-eslint": "^11.0.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"typescript": "^4.0.3"
},
"devDependencies": {
"@types/eslint": "^7.2.4",
"@types/eslint-plugin-prettier": "^3.1.0",
"@types/prettier": "^2.1.1",
"@types/react": "^16.9.51",
"@types/react-dom": "^16.9.8"
}
}

14
frontend/src/index.html Normal file
View File

@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>My Parcel Project</title>
</head>
<body>
<div id="root"></div>
<script src="./index.tsx"></script>
</body>
</html>

4
frontend/src/index.tsx Normal file
View File

@@ -0,0 +1,4 @@
import * as React from "react";
import { render } from "react-dom";
render(<h1>Hello World</h1>, document.getElementById("root"));

24
frontend/tsconfig.json Normal file
View File

@@ -0,0 +1,24 @@
{
"compilerOptions": {
"lib": [
"es2017",
"dom"
],
"jsx": "react",
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"outDir": "./dist",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": true,
"noImplicitAny": true,
"allowSyntheticDefaultImports": true,
"strictFunctionTypes": true,
"strictNullChecks": true
},
"include": [
"./src/**/*.ts",
"./src/**/*.tsx"
],
}