Skip to content

Commit 1308ea3

Browse files
committed
merge base into branch, fix new issues
2 parents 313ca9f + 1f27e59 commit 1308ea3

27 files changed

+2151
-812
lines changed

.eslintrc.json

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,13 @@
1313
"plugin:@typescript-eslint/recommended",
1414
"plugin:prettier/recommended"
1515
],
16-
"ignorePatterns": [".vscode"],
1716
"parser": "@typescript-eslint/parser",
1817
"parserOptions": {
1918
"ecmaFeatures": {
2019
"jsx": true
2120
},
2221
"ecmaVersion": 2024,
23-
"project": [
24-
"src/ui/tsconfig.json",
25-
"src/ui/tsconfig.test.json",
26-
"src/ui/tsconfig.cypress.json"
27-
],
22+
"project": ["src/ui/tsconfig.json", "tsconfig.test.json", "tsconfig.cypress.json"],
2823
"sourceType": "module"
2924
},
3025
"plugins": ["@typescript-eslint", "import", "jest", "no-secrets", "react"],
@@ -60,13 +55,13 @@
6055
"no-secrets/no-secrets": ["error", { "additionalRegexes": {}, "ignoreContent": [] }]
6156
},
6257
"settings": {
63-
"next": { "rootDir": ["src/ui/"] },
58+
"next": { "rootDir": ["src/ui/", "tests/ui/"] },
6459
"import/resolver": {
6560
"typescript": {
6661
"project": [
6762
"src/ui/tsconfig.json",
68-
"src/ui/tsconfig.test.json",
69-
"src/ui/tsconfig.cypress.json"
63+
"tsconfig.test.json",
64+
"tsconfig.cypress.json"
7065
]
7166
}
7267
}

.github/workflows/development.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,9 @@ jobs:
3131

3232
- name: Install dependencies
3333
run: npm ci
34-
working-directory: src/ui
3534

3635
- name: Run quality and typing checks
3736
run: npm run lint
38-
working-directory: src/ui
3937

4038
type-checks:
4139
runs-on: ubuntu-latest
@@ -63,11 +61,9 @@ jobs:
6361

6462
- name: Install dependencies
6563
run: npm ci
66-
working-directory: src/ui
6764

6865
- name: Run quality and typing checks
6966
run: npm run type-check
70-
working-directory: src/ui
7167

7268
precommit-checks:
7369
runs-on: ubuntu-latest
@@ -94,12 +90,10 @@ jobs:
9490
uses: actions/checkout@v3
9591

9692
- name: Install dependencies
97-
working-directory: src/ui
9893
run: npm ci
9994

10095
- name: Run pre-commit checks
10196
run: npx husky run pre-commit
102-
working-directory: src/ui
10397

10498
unit-tests:
10599
runs-on: ubuntu-latest
@@ -127,11 +121,9 @@ jobs:
127121

128122
- name: Install dependencies
129123
run: npm ci
130-
working-directory: src/ui
131124

132125
- name: Run unit tests
133126
run: npm run test:unit
134-
working-directory: src/ui
135127

136128
integration-tests:
137129
runs-on: ubuntu-latest
@@ -159,11 +151,9 @@ jobs:
159151

160152
- name: Install dependencies
161153
run: npm ci
162-
working-directory: src/ui
163154

164155
- name: Run integration tests
165156
run: npm run test:integration
166-
working-directory: src/ui
167157

168158
build:
169159
runs-on: ubuntu-latest

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,14 @@ yarn-error.log*
214214
src/ui/.vercel
215215

216216
# typescript
217-
src/ui/*.tsbuildinfo
217+
*.tsbuildinfo
218218
src/ui/next-env.d.ts
219219

220220
# Root-level UI config files that should be tracked
221221
!package.json
222222
!package-lock.json
223223
!.eslintrc.json
224+
!tsconfig.json
224225
!tsconfig.*.json
225226
!src/ui/lib
227+
!src/ui/public/manifest.json

.prettierignore

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
1-
/bin
2-
/build
3-
/public
4-
/.meta
5-
/.next
6-
/out
1+
# === Don't touch ===
2+
*.md
3+
*.mdx
4+
*.yaml
5+
*.yml
6+
7+
# === Skip all JSON …
8+
*.json
9+
10+
# === include relevant json ===
11+
!src/ui/**/*.json
12+
!tests/ui/**/*.json
13+
14+
# Root-level configs to format
15+
!/.eslintrc.json
16+
!/tsconfig*.json
17+
!/*.config.{js,ts}
18+
!/jest.setup.ts

cypress.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { defineConfig } from 'cypress';
22

33
export default defineConfig({
44
e2e: {
5-
setupNodeEvents(on, config) {
6-
// implement node event listeners here
7-
},
5+
specPattern: 'tests/ui/cypress/e2e/**/*.cy.{js,jsx,ts,tsx}',
6+
supportFile: 'tests/ui/cypress/support/e2e.ts',
7+
baseUrl: 'http://localhost:3000', // optional, but good practice
88
},
99
});

jest.config.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
1+
const path = require('path');
12
const nextJest = require('next/jest');
23

34
const createJestConfig = nextJest({
4-
dir: __dirname,
5+
dir: path.resolve(__dirname, 'src/ui'),
56
});
67

78
const customJestConfig = {
8-
collectCoverage: false,
9-
collectCoverageFrom: ['tests'],
10-
coverageDirectory: './.meta',
11-
coverageReporters: ['json-summary'],
9+
collectCoverage: true,
10+
collectCoverageFrom: ['./src/ui/**/*.{ts,tsx}'],
11+
coverageDirectory: './coverage',
12+
coverageProvider: 'v8',
13+
coverageReporters: ['json', 'text-summary', 'lcov'],
1214
moduleFileExtensions: ['ts', 'tsx', 'js'],
1315
moduleNameMapper: {
1416
'^.+\\.(svg)$': '<rootDir>/tests/ui/__mocks__/svg.js',
1517
'^@/(.*)$': '<rootDir>/src/$1',
1618
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
1719
'<rootDir>/tests/ui/__mocks__/fileMock.js',
1820
'\\.(css|less|scss|sass)$': '<rootDir>/tests/ui/__mocks__/styleMock.js',
19-
'^@/(.*)$': '<rootDir>/$1',
2021
},
2122
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
2223
testEnvironment: 'jest-environment-jsdom',
24+
testMatch: [
25+
'<rootDir>/tests/ui/unit/**/*.(test|spec).{ts,tsx,js,jsx}',
26+
'<rootDir>/tests/ui/integration/**/*.(test|spec).{ts,tsx,js,jsx}',
27+
],
2328
};
2429

2530
module.exports = createJestConfig(customJestConfig);

0 commit comments

Comments
 (0)