Skip to content

Commit 89f1f5e

Browse files
authored
Merge pull request #132 from BinaryStudioAcademy/development
development to production
2 parents 89d22c8 + efbf613 commit 89f1f5e

File tree

617 files changed

+14048
-25378
lines changed

Some content is hidden

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

617 files changed

+14048
-25378
lines changed

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ end_of_line = lf
77
trim_trailing_whitespace = true
88
insert_final_newline = true
99
charset = utf-8
10+
11+
[*.md]
12+
indent_size = unset
13+
indent_style = space

.eslintrc.yml

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

.lintstagedrc.yml

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

.ls-lint.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@ ls:
2020
ignore:
2121
- .git
2222
- node_modules
23-
- build
24-
- shared/build
25-
- shared/node_modules
26-
- client/build
27-
- client/node_modules
28-
- server/build
29-
- server/node_modules
30-
- .idea
23+
- packages/shared/build
24+
- packages/shared/node_modules
25+
- apps/frontend/build
26+
- apps/frontend/node_modules
27+
- apps/backend/build
28+
- apps/backend/node_modules

.nvmrc

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

.prettierrc.yml

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

.stylelintrc.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,3 @@ DB_CLIENT=pg
2525
DB_POOL_MIN=1
2626
DB_POOL_MAX=10
2727

28-
#
29-
# AUTHENTICATION
30-
#
31-
# SECRET_KEY has to be changed to own random secret key
32-
SECRET_KEY=secretkeysecretkeysecretkey
33-
34-
# Image Storage
35-
#
36-
# GYAZO_ACCESS_TOKEN - has to be changed to a real key from Gyazo
37-
GYAZO_UPLOAD_API_URL=https://upload.gyazo.com/api/upload
38-
GYAZO_ACCESS_TOKEN=gyazoaccesstoken

apps/backend/eslint.config.js

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import baseConfig from '../../eslint.config.js';
2+
3+
/** @typedef {import("eslint").Linter.FlatConfig} */
4+
let FlatConfig;
5+
6+
/** @type {FlatConfig} */
7+
const ignoresConfig = {
8+
ignores: ['build']
9+
};
10+
11+
/** @type {FlatConfig[]} */
12+
const overridesConfigs = [
13+
{
14+
files: ['knexfile.ts'],
15+
rules: {
16+
'import/no-default-export': ['off']
17+
}
18+
},
19+
{
20+
files: ['jest.config.js'],
21+
rules: {
22+
'@typescript-eslint/explicit-function-return-type': ['off'],
23+
'@typescript-eslint/no-magic-numbers': ['off'],
24+
'@typescript-eslint/no-unsafe-argument': ['off'],
25+
'@typescript-eslint/no-unsafe-assignment': ['off'],
26+
'@typescript-eslint/no-unsafe-call': ['off'],
27+
'@typescript-eslint/no-unsafe-member-access': ['off'],
28+
'@typescript-eslint/no-unsafe-return': ['off'],
29+
'import/no-default-export': ['off']
30+
}
31+
},
32+
{
33+
files: ['src/db/migrations/**/*.ts'],
34+
rules: {
35+
'unicorn/filename-case': [
36+
'error',
37+
{
38+
case: 'snakeCase'
39+
}
40+
]
41+
}
42+
},
43+
{
44+
files: ['src/libs/modules/controller/controller.module.ts'],
45+
rules: {
46+
'@typescript-eslint/no-magic-numbers': ['off']
47+
}
48+
}
49+
];
50+
51+
/** @type {FlatConfig[]} */
52+
const config = [...baseConfig, ignoresConfig, ...overridesConfigs];
53+
54+
export default config;
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import { join } from 'node:path';
22
import { fileURLToPath } from 'node:url';
3-
43
import { pathsToModuleNameMapper } from 'ts-jest';
54

65
import tsconfigJson from './tsconfig.json' assert { type: 'json' };
76

87
const sourcePath = join(fileURLToPath(import.meta.url), '../');
98

109
const manageKey = key => {
11-
return key.includes('(.*)') ? key.slice(0, -1) + '\\.js$' : key;
10+
return key.includes('(.*)') ? key.slice(0, -1) + String.raw`\.js$` : key;
1211
};
1312

1413
const manageMapper = mapper => ({
@@ -19,19 +18,19 @@ const manageMapper = mapper => ({
1918
});
2019

2120
export default {
22-
testEnvironment: 'jest-environment-node',
23-
preset: 'ts-jest/presets/default-esm',
2421
extensionsToTreatAsEsm: ['.ts'],
25-
transformIgnorePatterns: ['node_modules/'],
26-
testPathIgnorePatterns: ['node_modules/', 'dist/', 'build/'],
2722
moduleNameMapper: manageMapper(
2823
pathsToModuleNameMapper(tsconfigJson.compilerOptions.paths, {
2924
prefix: sourcePath
3025
})
3126
),
27+
preset: 'ts-jest/presets/default-esm',
28+
testEnvironment: 'jest-environment-node',
29+
testPathIgnorePatterns: ['node_modules/', 'dist/', 'build/'],
30+
testTimeout: 10_000,
3231
transform: {
3332
'^.+\\.tsx?$': ['ts-jest', { useESM: true }]
3433
},
35-
testTimeout: 10_000,
34+
transformIgnorePatterns: ['node_modules/'],
3635
workerIdleMemoryLimit: '1GB'
3736
};

0 commit comments

Comments
 (0)