Skip to content

Commit

Permalink
updated onlineshop
Browse files Browse the repository at this point in the history
  • Loading branch information
jskonst committed Feb 10, 2024
1 parent 2d62032 commit 45eedf2
Show file tree
Hide file tree
Showing 35 changed files with 15,158 additions and 9,188 deletions.
27 changes: 13 additions & 14 deletions onlineshop/nest.code-workspace
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
{
"folders": [
{
"name": "Server",
"path": "packages/server"
},
{
"name": "Client",
"path": "packages/client"
},
{
"name": "Configs (Root)",
"path": "."
},

],
{
"name": "Server",
"path": "source/server"
},
{
"name": "Client",
"path": "source/client"
},
{
"name": "Configs (Root)",
"path": "."
}
],
"settings": {
"files.exclude": {
"**/.git": true,
Expand Down
38 changes: 19 additions & 19 deletions onlineshop/source/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "4.0.3",
"web-vitals": "^1.1.2"
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"web-vitals": "^3.5.2"
},
"scripts": {
"start": "react-scripts start",
Expand Down Expand Up @@ -35,20 +35,20 @@
]
},
"devDependencies": {
"@testing-library/jest-dom": "^5.13.0",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^12.8.3",
"@types/jest": "^26.0.23",
"@types/node": "^12.20.15",
"@types/react": "^17.0.10",
"@types/react-dom": "^17.0.7",
"eslint": "^7.28.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"prettier": "^2.3.1",
"typescript": "^4.3.2"
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^14.2.1",
"@testing-library/user-event": "^14.5.2",
"@types/jest": "^29.5.12",
"@types/node": "^20.11.17",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"prettier": "^3.2.5",
"typescript": "^5.3.3"
}
}
9,861 changes: 9,861 additions & 0 deletions onlineshop/source/client/yarn.lock

Large diffs are not rendered by default.

256 changes: 128 additions & 128 deletions onlineshop/source/server/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,136 +1,136 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin', 'prettier'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:prettier/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
rules: {
'no-param-reassign': ['error'],
'prettier/prettier': 'error',
'linebreak-style': ['error', 'unix'],
'arrow-body-style': [
'error',
'as-needed',
{
requireReturnForObjectLiteral: false,
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin', 'prettier'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:prettier/recommended',
],
curly: ['error', 'all'],
'no-implicit-coercion': ['error'],
'spaced-comment': ['error', 'always'],
eqeqeq: ['error', 'always'],
'prefer-template': 'error',
'no-useless-concat': 'error',
'prefer-destructuring': [
'error',
{
VariableDeclarator: {
array: false,
object: true,
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
rules: {
'no-param-reassign': ['error'],
'prettier/prettier': 'error',
'linebreak-style': ['error', 'unix'],
'arrow-body-style': [
'error',
'as-needed',
{
requireReturnForObjectLiteral: false,
},
AssignmentExpression: {
array: false,
object: true,
],
curly: ['error', 'all'],
'no-implicit-coercion': ['error'],
'spaced-comment': ['error', 'always'],
eqeqeq: ['error', 'always'],
'prefer-template': 'error',
'no-useless-concat': 'error',
'prefer-destructuring': [
'error',
{
VariableDeclarator: {
array: false,
object: true,
},
AssignmentExpression: {
array: false,
object: true,
},
},
},
{
enforceForRenamedProperties: false,
},
],
'no-restricted-imports': [
'error',
{
patterns: ['../*'],
},
],
'import/extensions': [
'error',
'ignorePackages',
{
ts: 'never',
tsx: 'never',
},
],
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
'import/order': [
'error',
{
'newlines-between': 'always',
groups: ['builtin', 'external', 'parent', 'sibling', 'index'],
pathGroups: [
{
pattern: 'src/**',
group: 'parent',
position: 'after',
{
enforceForRenamedProperties: false,
},
],
'no-restricted-imports': [
'error',
{
patterns: ['../*'],
},
],
'import/extensions': [
'error',
'ignorePackages',
{
ts: 'never',
tsx: 'never',
},
],
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
'import/order': [
'error',
{
'newlines-between': 'always',
groups: ['builtin', 'external', 'parent', 'sibling', 'index'],
pathGroups: [
{
pattern: 'src/**',
group: 'parent',
position: 'after',
},
],
},
],
'import/newline-after-import': 'error',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/ban-types': ['error'],
"@typescript-eslint/no-shadow": ["error"],
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'default',
format: ['camelCase'],
},
{
selector: ['enumMember', 'variable'],
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
},
{
selector: 'parameter',
format: ['camelCase'],
leadingUnderscore: 'allow',
modifiers: ['unused'],
},
{
selector: 'objectLiteralProperty',
filter: {
// Regular expression for BEM classnames
// Source: https://medium.com/takeaway-tech/the-search-for-a-regex-to-match-hyphenated-bem-css-class-names-5f8b66cc2bd9
regex: '^[a-z]([a-z0-9-]+)?(__([a-z0-9]+-?)+)?(--([a-z0-9]+-?)+){0,2}$',
match: true,
},
],
},
],
'import/newline-after-import': 'error',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/ban-types': ['error'],
"@typescript-eslint/no-shadow": ["error"],
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'default',
format: ['camelCase'],
},
{
selector: ['enumMember', 'variable'],
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
},
{
selector: 'parameter',
format: ['camelCase'],
leadingUnderscore: 'allow',
modifiers: ['unused'],
},
{
selector: 'objectLiteralProperty',
filter: {
// Regular expression for BEM classnames
// Source: https://medium.com/takeaway-tech/the-search-for-a-regex-to-match-hyphenated-bem-css-class-names-5f8b66cc2bd9
regex: '^[a-z]([a-z0-9-]+)?(__([a-z0-9]+-?)+)?(--([a-z0-9]+-?)+){0,2}$',
match: true,
format: null,
},
format: null,
},
{
selector: 'typeLike',
format: ['PascalCase'],
},
{
selector: 'typeProperty',
format: ['snake_case', 'camelCase'],
},
],
},
settings: {
'import/resolver': {
node: {
paths: ['./'],
extensions: ['.ts'],
{
selector: 'typeLike',
format: ['PascalCase'],
},
{
selector: 'typeProperty',
format: ['snake_case', 'camelCase'],
},
],
},
settings: {
'import/resolver': {
node: {
paths: ['./'],
extensions: ['.ts'],
},
typescript: {} // this loads <rootdir>/tsconfig.json to eslint
},
typescript: {} // this loads <rootdir>/tsconfig.json to eslint
},
},
};
};
27 changes: 22 additions & 5 deletions onlineshop/source/server/.gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
# compiled output
/dist
/node_modules

# images
*.jpg
*.jpeg
*.png
/build

# Logs
logs
*.log
npm-debug.log*
pnpm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
Expand All @@ -37,3 +34,23 @@ lerna-debug.log*
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# temp directory
.temp
.tmp

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
Loading

0 comments on commit 45eedf2

Please sign in to comment.