@schafevormfenster/eslint-config 0.0.18 → 0.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
 
2
2
  
3
- > @schafevormfenster/eslint-config@0.0.17 check /Users/jan-henrik.hempel/Projects/commons/packages/eslint-config
3
+ > @schafevormfenster/eslint-config@0.0.19 check /Users/jan-henrik.hempel/Projects/commons/packages/eslint-config
4
4
  > echo 'eslint-config: no build required'
5
5
 
6
6
  eslint-config: no build required
@@ -153,7 +153,7 @@ These configurations apply only to test files and should be added **after** your
153
153
 
154
154
  **Use when**: Writing end-to-end tests with Playwright
155
155
 
156
- **Applies to**: `**/e2e/**`, `**/*.spec.ts` files
156
+ **Applies to**: `**/e2e/**`, `**/*.spec.ts`, `**/*.spec.tsx` files
157
157
 
158
158
  **Related documentation**: See `docs/instructions/testing-standards-guide.md` and `docs/instructions/rest-api-e2e-testing-guide.md` in `@schafevormfenster/eslint-plugin`
159
159
 
@@ -163,7 +163,9 @@ These configurations apply only to test files and should be added **after** your
163
163
  **Key rules**:
164
164
  - Enforce `*.test.ts`, `*.component.test.ts`, and `*.integration.test.ts` file naming
165
165
  - Prefer loose error matching (regex over exact strings)
166
- - Require environment setup hooks for env-var-based tests
166
+ - Require environment setup hooks for env-var-based unit tests (`beforeEach`/`afterEach`)
167
+ - Require environment guard hooks for integration tests (`beforeEach`/`beforeAll` presence check)
168
+ - Forbid `delete process.env.*` in `beforeEach` in integration tests
167
169
  - No environment variable preservation
168
170
  - Forbid `vi.mock()`, `vi.spyOn()`, `vi.fn()` in integration tests
169
171
  - Forbid `it.skip()`, `it.skipIf()`, `describe.skip()`, `it.todo()`, etc. in integration tests
@@ -174,7 +176,7 @@ These configurations apply only to test files and should be added **after** your
174
176
 
175
177
  **Use when**: Writing Vitest tests across unit/component/integration tiers
176
178
 
177
- **Applies to**: `**/*.test.ts`, `**/*.component.test.ts`, `**/*.integration.test.ts` files
179
+ **Applies to**: `**/*.test.ts`, `**/*.test.tsx`, `**/*.component.test.ts`, `**/*.component.test.tsx`, `**/*.integration.test.ts`, `**/*.integration.test.tsx` files
178
180
 
179
181
  **Related documentation**: See `docs/instructions/testing-standards-guide.md` and `docs/instructions/unit-test-env-vars-guide.md` in `@schafevormfenster/eslint-plugin`
180
182
 
@@ -192,7 +194,7 @@ These configurations apply only to test files and should be added **after** your
192
194
 
193
195
  **Use when**: Writing component tests for services/coordinators with mocked boundaries
194
196
 
195
- **Applies to**: `**/*.component.test.ts` files
197
+ **Applies to**: `**/*.component.test.ts`, `**/*.component.test.tsx` files
196
198
 
197
199
  **Related documentation**: See `docs/instructions/component-test-guide.md` and `docs/instructions/testing-standards-guide.md` in `@schafevormfenster/eslint-plugin`
198
200
 
@@ -205,14 +207,15 @@ These configurations apply only to test files and should be added **after** your
205
207
  - Forbid `it.skip()`, `it.skipIf()`, `describe.skip()`, `it.todo()`, etc. — integration tests must always run
206
208
  - Prefer loose error matching (regex over exact strings)
207
209
  - No environment variable preservation
208
- - Require environment setup in beforeEach
210
+ - Forbid `delete process.env.*` in `beforeEach` — env vars come from `.env` files, not test setup
211
+ - Require a `beforeAll` guard that checks required env vars are present (env vars come from `.env` files / dotenv — integration tests must not set or delete them)
209
212
  - Require describe() wrappers for test organization
210
213
  - Enforce meaningful test descriptions
211
214
  - Suggest test categorization (Happy Path → Error → Edge Cases)
212
215
 
213
216
  **Use when**: Writing integration tests with real external APIs
214
217
 
215
- **Applies to**: `**/*.integration.test.ts` files
218
+ **Applies to**: `**/*.integration.test.ts`, `**/*.integration.test.tsx` files
216
219
 
217
220
  **Related documentation**: See `docs/instructions/integration-test-guide.md` and `docs/instructions/testing-standards-guide.md` in `@schafevormfenster/eslint-plugin`
218
221
 
@@ -225,7 +228,7 @@ These configurations apply only to test files and should be added **after** your
225
228
 
226
229
  **Use when**: Enforcing that client/service/coordinator source files have required test tiers
227
230
 
228
- **Applies to**: `**/clients/**/*.ts`, `**/services/**/*.ts`, `**/coordinators/**/*.ts` (excluding test and index/type/schema/contract files)
231
+ **Applies to**: `**/clients/**/*.ts`, `**/clients/**/*.tsx`, `**/services/**/*.ts`, `**/services/**/*.tsx`, `**/coordinators/**/*.ts`, `**/coordinators/**/*.tsx` (excluding test and index/type/schema/contract files)
229
232
 
230
233
  **Related documentation**: See `docs/instructions/testing-standards-guide.md` and `docs/instructions/client-service-coordinator-guide.md` in `@schafevormfenster/eslint-plugin`
231
234
 
@@ -327,7 +330,8 @@ These rules apply across all Vitest tiers. Tier-specific rules (unit, component,
327
330
  | `prefer-loose-error-matching` | warn | all tiers | Prefer regex over exact string matching for errors |
328
331
  | `enforce-test-file-naming` | error | all tiers | Enforce `*.test.ts`, `*.component.test.ts`, `*.integration.test.ts` for Vitest tests |
329
332
  | `no-env-preservation-in-tests` | error | all tiers | Forbid preserving/restoring process.env (individual vars or entire env with `{ ...process.env }`) |
330
- | `require-env-setup-in-tests` | warn | unit, integration | Require beforeEach/afterEach in current describe or parent to handle env vars |
333
+ | `require-env-setup-in-tests` | warn | unit | Require beforeEach/afterEach in current describe or parent to initialize/delete env vars |
334
+ | `require-env-guard-in-integration-tests` | warn | integration | Require a `beforeAll` guard that checks required env vars are set before the suite runs (env vars come from `.env` files) |
331
335
  | `no-mocks-in-integration-tests` | error | integration | Forbid `vi.mock()`, `vi.spyOn()`, and `vi.fn()` in integration tests |
332
336
  | `no-skip-in-integration-tests` | error | integration | Forbid `it.skip()`, `it.skipIf()`, `describe.skip()`, `it.todo()`, etc. — integration tests must always run |
333
337
  | `no-env-vars-in-component-tests` | error | component | Forbid `process.env` access in component tests |
@@ -361,7 +365,8 @@ These rules apply across all Vitest tiers. Tier-specific rules (unit, component,
361
365
  | `no-mocks-in-integration-tests` | error | Forbid `vi.mock()`, `vi.spyOn()`, and `vi.fn()` in integration tests |
362
366
  | `no-skip-in-integration-tests` | error | Forbid `it.skip()`, `it.skipIf()`, `describe.skip()`, `it.todo()`, etc. — integration tests must always run |
363
367
  | `no-env-preservation-in-tests` | error | Forbid preserving/restoring process.env (individual vars or entire env with `{ ...process.env }`) |
364
- | `require-env-setup-in-tests` | warn | Require beforeEach/afterEach in current describe or parent to handle env vars |
368
+ | `no-env-delete-in-before-each` | error | Forbid `delete process.env.*` inside `beforeEach` env vars come from `.env` files, not test setup |
369
+ | `require-env-guard-in-integration-tests` | warn | Require a `beforeAll` guard that checks required env vars are set before the suite runs (env vars come from `.env` files) |
365
370
  | `require-describe-wrapper` | warn | Require test cases to be wrapped in describe() blocks |
366
371
  | `require-meaningful-descriptions` | warn | Require meaningful descriptions (min 10 chars for describe, 15 for it/test) |
367
372
  | `suggest-test-categorization` | warn | Suggest organizing tests into categories (Happy Path → Error → Edge Cases) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schafevormfenster/eslint-config",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -39,7 +39,7 @@
39
39
  "eslint-plugin-zod": "^1.4.0",
40
40
  "globals": "^16.5.0",
41
41
  "typescript-eslint": "^8.56.0",
42
- "@schafevormfenster/eslint-plugin": "0.0.18"
42
+ "@schafevormfenster/eslint-plugin": "0.0.20"
43
43
  },
44
44
  "engines": {
45
45
  "node": ">=22"