Summary
Add a test-friendly preset alongside the current strict preset so test code can stay readable without fighting ceremony-heavy rules intended for production/library code.
Context
While integrating @sethlivingston/eslint-plugin-typescript-narrows into oneway-http, the current strict preset worked well for library code but pushed test files toward extra ceremony with limited payoff.
The main pain points were:
@typescript-eslint/prefer-readonly-parameter-types
@typescript-eslint/explicit-function-return-type
- possibly
@typescript-eslint/require-await depending on the intended opinion for tests
Proposal
Add a new preset, for example:
configs.test
- or
configs.strictTest
This preset should start from the current strict base and relax rules that create friction in Vitest/Jest-style test code.
Acceptance criteria
- A documented test-oriented preset exists.
- It is intended for
**/*.test.ts, **/*.spec.ts, and related helper files.
- It relaxes the most ceremony-heavy rules for tests while keeping the important safety/value rules.
- The README shows how to compose the strict preset for source files and the test preset for test files.
Summary
Add a test-friendly preset alongside the current strict preset so test code can stay readable without fighting ceremony-heavy rules intended for production/library code.
Context
While integrating
@sethlivingston/eslint-plugin-typescript-narrowsintooneway-http, the current strict preset worked well for library code but pushed test files toward extra ceremony with limited payoff.The main pain points were:
@typescript-eslint/prefer-readonly-parameter-types@typescript-eslint/explicit-function-return-type@typescript-eslint/require-awaitdepending on the intended opinion for testsProposal
Add a new preset, for example:
configs.testconfigs.strictTestThis preset should start from the current strict base and relax rules that create friction in Vitest/Jest-style test code.
Acceptance criteria
**/*.test.ts,**/*.spec.ts, and related helper files.