Skip to content

Commit c80ada6

Browse files
committed
chore: updated project structure for alignment
1 parent 7891215 commit c80ada6

15 files changed

+930
-520
lines changed

.eslintrc

+16-3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,17 @@
2828
"no-constant-condition": 0,
2929
"no-useless-escape": 0,
3030
"no-console": "error",
31+
"no-restricted-globals": [
32+
"error",
33+
{
34+
"name": "global",
35+
"message": "Use `globalThis` instead"
36+
},
37+
{
38+
"name": "window",
39+
"message": "Use `globalThis` instead"
40+
}
41+
],
3142
"require-yield": 0,
3243
"eqeqeq": ["error", "smart"],
3344
"spaced-comment": [
@@ -39,7 +50,8 @@
3950
},
4051
"block": {
4152
"exceptions": ["*"]
42-
}
53+
},
54+
"markers": ["/"]
4355
}
4456
],
4557
"capitalized-comments": [
@@ -80,7 +92,8 @@
8092
],
8193
"pathGroupsExcludedImportTypes": [
8294
"type"
83-
]
95+
],
96+
"newlines-between": "never"
8497
}
8598
],
8699
"@typescript-eslint/no-namespace": 0,
@@ -102,7 +115,7 @@
102115
"@typescript-eslint/consistent-type-imports": ["error"],
103116
"@typescript-eslint/consistent-type-exports": ["error"],
104117
"no-throw-literal": "off",
105-
"@typescript-eslint/no-throw-literal": ["error"],
118+
"@typescript-eslint/no-throw-literal": "off",
106119
"@typescript-eslint/no-floating-promises": ["error", {
107120
"ignoreVoid": true,
108121
"ignoreIIFE": true

.github/workflows/codesee-arch-diagram.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
# This workflow was added by CodeSee. Learn more at https://codesee.io/
2+
# This is v2.0 of this workflow file
13
on:
24
push:
35
branches:
4-
- master
6+
- staging
57
pull_request_target:
68
types: [opened, synchronize, reopened]
79

@@ -18,3 +20,4 @@ jobs:
1820
- uses: Codesee-io/codesee-action@v2
1921
with:
2022
codesee-token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}
23+
codesee-url: https://app.codesee.io

.gitlab-ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ build:windows:
184184
- ./scripts/choco-install.ps1
185185
- refreshenv
186186
- npm install --ignore-scripts
187-
- $env:Path = "$(npm bin);" + $env:Path
187+
- $env:Path = "$(npm root)\.bin;" + $env:Path
188188
- npm run prebuild --verbose
189189
- npm test -- --ci --coverage
190190
- npm run bench
@@ -221,7 +221,7 @@ build:macos:
221221
- ./scripts/brew-install.sh
222222
- hash -r
223223
- npm install --ignore-scripts
224-
- export PATH="$(npm bin):$PATH"
224+
- export PATH="$(npm root)/.bin:$PATH"
225225
- npm run prebuild --verbose
226226
- npm test -- --ci --coverage
227227
- npm run bench

jest.config.js

+19-3
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,21 @@ module.exports = {
3333
roots: ['<rootDir>/tests'],
3434
testMatch: ['**/?(*.)+(spec|test|unit.test).+(ts|tsx|js|jsx)'],
3535
transform: {
36-
'^.+\\.tsx?$': 'ts-jest',
37-
'^.+\\.jsx?$': 'babel-jest',
36+
"^.+\\.(t|j)sx?$": [
37+
"@swc/jest",
38+
{
39+
jsc: {
40+
parser: {
41+
syntax: "typescript",
42+
tsx: true,
43+
decorators: compilerOptions.experimentalDecorators,
44+
dynamicImport: true,
45+
},
46+
target: compilerOptions.target.toLowerCase(),
47+
keepClassNames: true,
48+
},
49+
}
50+
],
3851
},
3952
reporters: [
4053
'default',
@@ -60,6 +73,9 @@ module.exports = {
6073
// Setup files after env are executed before each test file
6174
// after the jest test environment is installed
6275
// Can access globals
63-
setupFilesAfterEnv: ['<rootDir>/tests/setupAfterEnv.ts'],
76+
setupFilesAfterEnv: [
77+
'jest-extended/all',
78+
'<rootDir>/tests/setupAfterEnv.ts'
79+
],
6480
moduleNameMapper: moduleNameMapper,
6581
};

0 commit comments

Comments
 (0)