Skip to content

Add a test-oriented strict preset #1

@sethlivingston

Description

@sethlivingston

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions