Skip to content

Commit fdde44c

Browse files
authored
Merge pull request #115 from BinaryStudioAcademy/development
development to production
2 parents 1dbb218 + c0d480f commit fdde44c

File tree

574 files changed

+11753
-8075
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

574 files changed

+11753
-8075
lines changed

.eslintrc.yml

Lines changed: 75 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,24 @@ parserOptions:
44
ecmaVersion: 2022
55
sourceType: module
66
project:
7-
- ./client/jsconfig.json
7+
- ./tsconfig.json
8+
- ./shared/tsconfig.json
9+
- ./client/tsconfig.json
10+
- ./server/tsconfig.json
811

912
settings:
1013
node: true
1114

1215
extends:
1316
- eslint:recommended
1417
- plugin:import/recommended
18+
- plugin:import/typescript
19+
- plugin:@typescript-eslint/recommended
20+
- plugin:@typescript-eslint/recommended-type-checked
21+
- plugin:@typescript-eslint/strict
22+
- plugin:@typescript-eslint/strict-type-checked
23+
- plugin:@typescript-eslint/stylistic
24+
- plugin:@typescript-eslint/stylistic-type-checked
1525
- plugin:unicorn/recommended
1626
- plugin:sonarjs/recommended
1727

@@ -56,9 +66,7 @@ rules:
5666
import/no-duplicates:
5767
- error
5868
no-unused-vars:
59-
- error
60-
- argsIgnorePattern: ^_
61-
ignoreRestSiblings: true
69+
- off
6270
sonarjs/cognitive-complexity:
6371
- error
6472
- 18
@@ -68,19 +76,74 @@ rules:
6876
object-curly-spacing:
6977
- error
7078
- always
71-
semi:
79+
'@typescript-eslint/no-unused-vars':
80+
- error
81+
- argsIgnorePattern: ^_
82+
ignoreRestSiblings: true
83+
'@typescript-eslint/lines-between-class-members':
84+
- error
85+
'@typescript-eslint/padding-line-between-statements':
86+
- error
87+
- blankLine: never
88+
prev: export
89+
next: export
90+
- blankLine: always
91+
prev:
92+
- const
93+
- class
94+
next: export
95+
- blankLine: always
96+
prev: '*'
97+
next:
98+
- switch
99+
- class
100+
- function
101+
- if
102+
- return
103+
- try
104+
- interface
105+
- type
106+
'@typescript-eslint/consistent-type-definitions':
107+
- off
108+
'@typescript-eslint/non-nullable-type-assertion-style':
109+
- off
110+
'@typescript-eslint/no-unnecessary-condition':
111+
- off
112+
'@typescript-eslint/return-await':
113+
- error
114+
- always
115+
'@typescript-eslint/quotes':
116+
- error
117+
- single
118+
'@typescript-eslint/consistent-type-imports':
119+
- error
120+
'@typescript-eslint/consistent-type-exports':
121+
- error
122+
'@typescript-eslint/no-unnecessary-type-assertion':
123+
- off
124+
'@typescript-eslint/explicit-function-return-type':
125+
- error
126+
- allowTypedFunctionExpressions: true
127+
'@typescript-eslint/no-empty-interface':
128+
- error
129+
- allowSingleExtends: true
130+
'@typescript-eslint/explicit-member-accessibility':
131+
- error
132+
'@typescript-eslint/no-misused-promises':
133+
- error
134+
- checksVoidReturn: false
135+
'@typescript-eslint/object-curly-spacing':
136+
- error
137+
- always
138+
'@typescript-eslint/semi':
72139
- error
73140
- always
74141

75142
overrides:
76143
- files:
77-
- project.config.cjs
78-
- commitlint.config.cjs
79-
- dangerfile.cjs
80-
parserOptions:
81-
sourceType: commonjs
82-
env:
83-
node: true
144+
- project.config.ts
145+
- commitlint.config.ts
146+
- dangerfile.ts
84147
rules:
85148
'import/no-default-export':
86149
- off

.github/workflows/ci-pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
4545
- name: Lint Commits
4646
run: |
47-
npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose -g ./commitlint.config.cjs
47+
npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose -g ./commitlint.config.ts
4848
4949
- name: Add Folder Labels
5050
uses: actions/labeler@v4
@@ -62,4 +62,4 @@ jobs:
6262
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6363

6464
run: |
65-
npx danger ci --failOnErrors --text-only -d ./dangerfile.cjs
65+
npx danger ci --failOnErrors --text-only

.lintstagedrc.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'*': npm run lint:editorconfig && npm run lint:fs
2-
'*.{js,jsx,scss,json,md,html}': npm run prettify
3-
shared/**/*.js: npm run lint:shared:js
4-
client/src/**/*.{js,jsx}: npm run lint:client:js
2+
'*.{ts,tsx,scss,json,md,html}': npm run prettify
3+
shared/**/*.ts: npm run lint:shared:js
4+
client/src/**/*.{ts,tsx}: npm run lint:client:js
55
client/src/**/*.scss: npm run lint:client:css
6-
server/**/*.js: npm run lint:server:js
6+
server/**/*.ts: npm run lint:server:js

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18
1+
18.18

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build
2+
dist

client/.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ VITE_API_SERVER=http://localhost:3001
66
VITE_SOCKET_SERVER=ws://localhost:3001
77
VITE_API_PATH=/api
88
VITE_SOCKET_PATH=/socket.io
9-
VITE_PORT=3000
10-
VITE_HOST=localhost
9+
VITE_APP_PORT=3000
10+
VITE_APP_HOST=localhost

client/.eslintrc.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ settings:
77

88
parserOptions:
99
project:
10-
- ./jsconfig.json
10+
- ./tsconfig.json
1111

1212
extends:
1313
- ../.eslintrc.yml
1414
- plugin:react/recommended
1515
- plugin:react/jsx-runtime
1616
- plugin:react-hooks/recommended
1717
- plugin:jsx-a11y/recommended
18+
- plugin:import/typescript
1819

1920
rules:
2021
react/jsx-no-bind:
@@ -29,10 +30,12 @@ rules:
2930
- error
3031
import/no-unresolved:
3132
- off
33+
react/prop-types:
34+
- off
3235

3336
overrides:
3437
- files:
35-
- vite.config.js
38+
- vite.config.ts
3639
rules:
3740
import/no-default-export:
3841
- off

client/.stylelintrc.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ plugins:
77

88
rules:
99
selector-class-pattern: null
10-
declaration-colon-newline-after: null
1110
selector-pseudo-class-no-unknown:
1211
- true
1312
- ignorePseudoClasses:

client/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
@@ -27,7 +27,7 @@
2727
<body>
2828
<noscript>You need to enable JavaScript to run this app.</noscript>
2929
<div id="root"></div>
30-
<script type="module" src="./src/index.jsx"></script>
30+
<script type="module" src="./src/index.tsx"></script>
3131
<!--
3232
This HTML file is a template.
3333
If you open it directly in the browser, you will see an empty page.

client/jsconfig.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)