core-utils
    Preparing search index...

    Module @clipboard-health/eslint-plugin - v2.17.3

    @clipboard-health/eslint-plugin

    Clipboard's ESLint plugin.

    The rule implementations are shared with @clipboard-health/oxlint-plugin, so ESLint and Oxlint consumers execute the same behavior. This compatibility package remains available for repositories that have not migrated to Oxlint yet.

    Note

    Take a look at our eslint-config which contains this plugin. In most cases you can just use the eslint-config instead of directly installing this plugin.

    npm install -D @clipboard-health/eslint-plugin
    

    Then, modify your .eslintrc.js file to configure individual rules in this plugin:

    module.exports = {
    plugins: ["@clipboard-health"],
    overrides: [
    {
    files: ["**/*.controller.ts", "**/*.controllers.ts"],
    rules: {
    "@clipboard-health/enforce-contract-in-controllers": "error",
    },
    },
    ],
    root: true,
    };

    require-contract-fixture-construction requires MSW and Playwright response fixtures to be constructed through response schemas imported from @clipboard-health/contract-* packages. It also checks exported fixtures in testUtils/mocks modules and rejects fixtures mutated after they were parsed.

    It recognizes these response schemas:

    • exports named *ResponseSchema;
    • a ts-rest route's response map, contract.x.responses[status];
    • an oRPC procedure's output schema, contract.x["~orpc"].outputSchema.

    Prefer the contractFixtures preset from @clipboard-health/oxlint-config. Repositories migrating an existing fixture backlog should enable the preset's warning baseline, then add local error-level overrides for each migrated directory.

    See package.json scripts for a list of commands.

    rules