Skip to content

Commit ff0536b

Browse files
committed
feat(plugin-knip-e2e): adds e2e base project setup
1 parent 9eccc41 commit ff0536b

File tree

5 files changed

+88
-0
lines changed

5 files changed

+88
-0
lines changed

e2e/plugin-knip-e2e/.eslintrc.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": ["../../.eslintrc.json"],
3+
"ignorePatterns": ["!**/*", "code-pushup.config*.ts"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts", "*.tsx"],
7+
"parserOptions": {
8+
"project": ["e2e/plugin-knip-e2e/tsconfig.*?.json"]
9+
}
10+
}
11+
]
12+
}

e2e/plugin-knip-e2e/project.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "plugin-knip-e2e",
3+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
4+
"sourceRoot": "examples/plugin-knip-e2e/src",
5+
"projectType": "application",
6+
"targets": {
7+
"lint": {
8+
"executor": "@nx/linter:eslint",
9+
"outputs": ["{options.outputFile}"],
10+
"options": {
11+
"lintFilePatterns": ["e2e/plugin-knip-e2e/**/*.ts"]
12+
}
13+
},
14+
"e2e": {
15+
"executor": "@nx/vite:test",
16+
"options": {
17+
"config": "e2e/plugin-knip-e2e/vite.config.e2e.ts"
18+
}
19+
}
20+
},
21+
"implicitDependencies": ["plugin-knip"],
22+
"tags": ["scope:tooling", "type:e2e"]
23+
}

e2e/plugin-knip-e2e/tsconfig.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"extends": "../../tsconfig.base.json",
3+
"compilerOptions": {
4+
"module": "ESNext",
5+
"forceConsistentCasingInFileNames": true,
6+
"strict": true,
7+
"noImplicitOverride": true,
8+
"noPropertyAccessFromIndexSignature": true,
9+
"noImplicitReturns": true,
10+
"noFallthroughCasesInSwitch": true,
11+
"types": ["vitest"]
12+
},
13+
"files": [],
14+
"include": [],
15+
"references": [
16+
{
17+
"path": "./tsconfig.test.json"
18+
}
19+
]
20+
}
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../../dist/out-tsc",
5+
"types": ["vitest/globals", "vitest/importMeta", "vite/client", "node"]
6+
},
7+
"include": [
8+
"vite.config.e2e.ts",
9+
"tests/**/*.e2e.test.ts",
10+
"tests/**/*.d.ts",
11+
"mocks/**/*.ts"
12+
]
13+
}
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/// <reference types="vitest" />
2+
import { defineConfig } from 'vite';
3+
4+
export default defineConfig({
5+
cacheDir: '../../node_modules/.vite/plugin-knip-e2e',
6+
test: {
7+
reporters: ['basic'],
8+
testTimeout: 60_000,
9+
globals: true,
10+
pool: 'threads',
11+
poolOptions: { threads: { singleThread: true } },
12+
cache: {
13+
dir: '../../node_modules/.vitest',
14+
},
15+
environment: 'node',
16+
include: ['tests/**/*.e2e.test.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
17+
globalSetup: ['../../global-setup.ts'],
18+
setupFiles: ['../../testing/test-setup/src/lib/reset.mocks.ts'],
19+
},
20+
});

0 commit comments

Comments
 (0)