Skip to content

Commit dd28d62

Browse files
author
Daniil Yankouski
committed
chore: updated pacakges and added support for mobile platform
1 parent 1a00b7d commit dd28d62

File tree

98 files changed

+7989
-4537
lines changed

Some content is hidden

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

98 files changed

+7989
-4537
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ configs/husky/_
1111
configs/husky/.gitignore
1212

1313
dist
14+
dist*
1415
coverage
1516
node_modules
1617

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Layered Architecture for developing web/mobile/desktop applications using JavaSc
2727
- [Project Scripts](./docs/SCRIPTS.md "Project Scripts Documentation")
2828
- [Architecture](./docs/ARCHITECTURE.md "Project Architecture Documentation")
2929
- [Code Conventions](./docs/CODE_CONVENTIONS.md "Project Code Conventions") *In progress*
30-
- [Style Guides](./docs/CODE_CONVENTIONS.md "Project Code Conventions") *In progress*
30+
- [Style Guides](./docs/CODE_CONVENTIONS.md "Project Style Guides") *In progress*
3131

3232
## Technologies Used
3333
- Core
@@ -54,7 +54,7 @@ Layered Architecture for developing web/mobile/desktop applications using JavaSc
5454

5555
## Contributing
5656

57-
You are welcome to contribute to this project, just open a Pull Request.
57+
You are welcome to contribute this project, just open a Pull Request and waiting for review ;)
5858

5959
## License
6060

assets/locales/en/common.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
11
{
2-
"auth": {
3-
"form": {
4-
"labels" : {
5-
"login": "Input login"
6-
}
7-
}
8-
}
2+
"auth.form.labels.login": "Input login"
93
}

configs/.eslintrc

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"@typescript-eslint",
55
"prettier",
66
"sort-keys-fix",
7-
"import"
7+
"import",
8+
"simple-import-sort",
9+
"unused-imports"
810
],
911
"extends": [
1012
"airbnb",
@@ -14,7 +16,8 @@
1416
"plugin:prettier/recommended",
1517
"plugin:import/typescript",
1618
"plugin:@typescript-eslint/recommended",
17-
"plugin:@typescript-eslint/recommended-requiring-type-checking"
19+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
20+
"plugin:path/recommended"
1821
],
1922
"env": {
2023
"browser": true,
@@ -61,24 +64,8 @@
6164
"configs/*"
6265
],
6366
"rules": {
64-
"import/order": [
65-
"error",
66-
{
67-
"alphabetize": {
68-
"order": "asc",
69-
"caseInsensitive": true
70-
},
71-
"groups": [
72-
"builtin",
73-
"external",
74-
"internal",
75-
"index",
76-
"sibling",
77-
"parent"
78-
]
79-
}
80-
],
8167
"guard-for-in": "off",
68+
"import/order": "off",
8269
"import/extensions": "off",
8370
"import/no-extraneous-dependencies": "off",
8471
"import/no-unresolved": "error",
@@ -96,6 +83,7 @@
9683
"no-sequences": "off",
9784
"no-underscore-dangle": "off",
9885
"no-unused-expressions": "off",
86+
"no-unused-vars": "off",
9987
"no-useless-constructor": "off",
10088
"no-shadow": "off",
10189
"no-prototype-builtins": "off",
@@ -119,6 +107,7 @@
119107
"error",
120108
"as-needed"
121109
],
110+
"prettier/prettier": "error",
122111
"react/destructuring-assignment": "off",
123112
"react/forbid-prop-types": "off",
124113
"react/no-unused-prop-types": "warn",
@@ -130,7 +119,23 @@
130119
"react-hooks/rules-of-hooks": "error",
131120
"react-hooks/exhaustive-deps": "warn",
132121
"react/jsx-props-no-spreading": "off",
133-
"prettier/prettier": "error",
122+
"simple-import-sort/imports": [
123+
"error",
124+
{
125+
"groups": [
126+
[ "^react$", "^react", "^@?\\w", "^__mocks__(/.*|$)" ],
127+
[ "^(containers|core|data|domain|presentation|typings)(/.*|$)" ],
128+
[
129+
"^\\.\\.(?!/?$)",
130+
"^\\.\\./?$",
131+
"^\\./(?=.*/)(?!/?$)",
132+
"^\\.(?!/?$)",
133+
"^\\./?$"
134+
],
135+
["^\\u0000"]
136+
]
137+
}
138+
],
134139
"@typescript-eslint/no-unsafe-assignment": "off",
135140
"@typescript-eslint/no-explicit-any": "warn",
136141
"@typescript-eslint/no-unnecessary-type-constraint": "off",
@@ -139,6 +144,7 @@
139144
"@typescript-eslint/array-type": "off",
140145
"@typescript-eslint/no-unsafe-call": "off",
141146
"@typescript-eslint/no-unsafe-member-access": "off",
142-
"@typescript-eslint/unbound-method": "off"
147+
"@typescript-eslint/unbound-method": "off",
148+
"@typescript-eslint/no-unused-vars": "off"
143149
}
144150
}

configs/husky/commit-msg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/common.sh"
3+
. "$(dirname "$0")/_/husky.sh"
4+
5+
npm run commitlint

configs/husky/common.sh

100644100755
File mode changed.

configs/husky/pre-commit

100644100755
File mode changed.

configs/husky/pre-push

100644100755
File mode changed.

configs/jest/config.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { Config } from '@jest/types';
2-
import {BuildDefine} from '../vite/define';
2+
import { BuildDefine } from '../vite/define';
3+
import { resolve } from 'path';
34

45
type JestConfig = Partial<
56
Omit<Config.ProjectConfig, 'moduleNameMapper' | 'transform'> & Config.GlobalConfig
@@ -9,7 +10,7 @@ type JestConfig = Partial<
910
transform: Record<string, string>;
1011
};
1112

12-
process.env.TZ = 'UTC'
13+
process.env.TZ = 'UTC';
1314

1415
const config: JestConfig = {
1516
collectCoverageFrom: ['<rootDir>/src/{domain,data,core}/**/*.ts'],
@@ -42,13 +43,13 @@ const config: JestConfig = {
4243
moduleDirectories: ['<rootDir>/node_modules', '<rootDir>/node_modules/@types', '<rootDir>/src'],
4344
moduleNameMapper: {
4445
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
45-
'<rootDir>/.jest/__mock__/fileTransformer.js',
46+
'<rootDir>/.jest/plugins/fileTransformer.js',
4647
},
4748
preset: 'ts-jest',
48-
rootDir: '../../',
49+
rootDir: resolve(process.cwd()),
4950
roots: ['<rootDir>/src'],
5051
setupFiles: ['<rootDir>/configs/jest/setup.ts'],
51-
testRegex: ['.test.ts$', '.spec.ts$'],
52+
testRegex: ['.test.ts$', '.spec.ts$', '.test.tsx$', '.spec.tsx$'],
5253
transform: {
5354
'^.+\\.(tsx|ts)?$': 'ts-jest',
5455
},
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const path = require('path');
22

33
module.exports = {
4-
process(src, filename) {
4+
process(_, filename) {
55
return 'module.exports = ' + JSON.stringify(path.basename(filename)) + ';';
66
},
77
};

0 commit comments

Comments
 (0)