Skip to content

Commit a59d9c4

Browse files
authored
Merge pull request #307 from FilenCloudDienste/dev/integration-tests
Application restructured to aid with integration testing
2 parents f8be6e0 + 632c34b commit a59d9c4

31 files changed

+6260
-7689
lines changed

.eslintrc

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

.github/workflows/eslint.yml

Lines changed: 23 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,37 +10,28 @@
1010
name: ESLint
1111

1212
on:
13-
push:
14-
pull_request:
15-
types: [opened, synchronize, reopened]
13+
push:
14+
pull_request:
15+
types: [opened, synchronize, reopened]
1616

1717
jobs:
18-
eslint:
19-
name: Run ESLint
20-
runs-on: ubuntu-latest
21-
permissions:
22-
contents: read
23-
security-events: write
24-
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
25-
steps:
26-
- name: Checkout code
27-
uses: actions/checkout@v3
28-
29-
- name: Install ESLint
30-
run: |
31-
npm install [email protected]
32-
npm install @microsoft/[email protected]
33-
34-
- name: Run ESLint
35-
run: npx eslint src/**/*
36-
--config .eslintrc
37-
--ext .js,.jsx,.ts,.tsx
38-
--format @microsoft/eslint-formatter-sarif
39-
--output-file eslint-results.sarif
40-
continue-on-error: true
41-
42-
- name: Upload analysis results to GitHub
43-
uses: github/codeql-action/upload-sarif@v2
44-
with:
45-
sarif_file: eslint-results.sarif
46-
wait-for-processing: true
18+
eslint:
19+
name: Run ESLint
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read
23+
security-events: write
24+
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v3
28+
- name: Setup Node
29+
uses: actions/setup-node@v4
30+
- run: npm ci
31+
- run: npm run lint-ci
32+
continue-on-error: true
33+
- name: Upload analysis results to GitHub
34+
uses: github/codeql-action/upload-sarif@v2
35+
with:
36+
sarif_file: eslint-report.sarif
37+
wait-for-processing: true
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
name: Run Jest tests
1+
name: Run Vitest tests
22

33
on:
44
push:
55
pull_request:
66
types: [opened, synchronize, reopened]
77

88
jobs:
9-
jest:
9+
vitest:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
1313
uses: actions/checkout@v3
1414
- name: Setup Node
1515
uses: actions/setup-node@v4
1616
- run: npm ci
17-
- run: npm test
17+
- run: npm run test

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
"source.fixAll.eslint": "never",
99
"source.fixAll.format": "never"
1010
},
11-
"typescript.tsdk": "node_modules\\typescript\\lib"
11+
"typescript.tsdk": "node_modules\\typescript\\lib",
12+
"eslint.lintTask.enable": true,
1213
}

eslint.config.mjs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import { defineConfig } from "eslint/config";
2+
import typescriptEslint from "@typescript-eslint/eslint-plugin";
3+
import globals from "globals";
4+
import tsParser from "@typescript-eslint/parser";
5+
import path from "node:path";
6+
import { fileURLToPath } from "node:url";
7+
import js from "@eslint/js";
8+
import { FlatCompat } from "@eslint/eslintrc";
9+
10+
const __filename = fileURLToPath(import.meta.url);
11+
const __dirname = path.dirname(__filename);
12+
const compat = new FlatCompat({
13+
baseDirectory: __dirname,
14+
recommendedConfig: js.configs.recommended,
15+
allConfig: js.configs.all
16+
});
17+
18+
export default defineConfig([{
19+
extends: compat.extends(
20+
"eslint:recommended",
21+
"plugin:@typescript-eslint/eslint-recommended",
22+
"plugin:@typescript-eslint/recommended",
23+
),
24+
25+
plugins: {
26+
"@typescript-eslint": typescriptEslint,
27+
},
28+
29+
languageOptions: {
30+
globals: {
31+
...globals.browser,
32+
...globals.node,
33+
},
34+
35+
parser: tsParser,
36+
},
37+
38+
rules: {
39+
eqeqeq: 2,
40+
quotes: ["error", "double"],
41+
"no-mixed-spaces-and-tabs": 0,
42+
"no-duplicate-imports": "error",
43+
},
44+
}]);

jest.config.js

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

0 commit comments

Comments
 (0)