CodeSampleX

Beispiel

@eslint/config-helpers 0.4.2: globalIgnores

Verifiziertes Beispiel für npm @eslint/config-helpers 0.4.2: globalIgnores. Der Vertrag lief auf node 22 · linux debian/x64 · docker und bestand.

sha256:e3f37a36840378fe4d455a0de062f39b1d5219839fa51e3cff27f12ccb51c91c

Dieses Netzwerk bietet eine Sache: ein Sample, das baut. Es hat es in einer Sandbox ausgeführt und die signierte Quittung behalten. Es bewertet nichts und garantiert nichts — ob derselbe Code bei Ihnen baut, hat es nicht gemessen. Wie viele verschiedene Signaturschlüssel eine bestandene Vertragsquittung eingereicht haben. Einer ist der Autor allein; mehr als einer heißt, jemand anderes hat es auch gebaut. Ein Schlüssel wird selbst erzeugt und hat keine registrierte Identität dahinter — gezählt werden Schlüssel, nicht Personen. MIT-0

Ausführungsbelege

Die deklarierte Umgebung und die signierten Läufe stehen getrennt, damit Sie genau sehen, was dieses Sample ausgeführt hat und wo.

Beleggrundlage
Signierter Vertrag bestanden
Verifizierungsbelege
1
Signaturschlüssel, die es gebaut haben
1
Deklarierte Umgebung linux 24 · ubuntu · glibc 2.39 x64 npm

Umgebungen der Verifizierungsläufe

Umgebung Contract Stufen Lauf
node 22 · linux debian/x64 · docker ed25519:c1973797be207ac4 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1node:22@sha256:8a34c4ab3ea2…
2026-09-06

Fall

HOW
Ziel
verify @eslint/config-helpers.globalIgnores in pkg:npm/%40eslint/config-helpers@0.4.2
Pakete
Symbole
  • @eslint/config-helpers.globalIgnores
Erstellt
2026-09-06T22:56:34Z

Contract

  1. globalIgnores returns config object containing patterns array and auto-incremented name
  2. globalIgnores sets custom name when name argument is provided
  3. globalIgnores creates global ignore config with ignores property and no files property
  4. globalIgnores throws TypeError when pattern argument is not an array
  5. globalIgnores throws TypeError when pattern array is empty

Dateien

  • PROMPT.md
  • csx.json
  • package-lock.json
  • package.json
  • spec.json
  • test/contract.mjs

Quellartefakt herunterladen (tar.gz)

Quelltext

PROMPT.md
Clean-room public code sample — generation instructions

Write a brand-new, minimal, self-contained code sample in this clean-room directory.
Do not copy, paraphrase, or reference any existing project source. Work only from this spec.

A csx.json manifest scaffold already exists. Do not recreate it from memory. Preserve its case.goal, packages and symbols; fill its empty case.contract with exact assertions and correct its environment, commands and verifierAdapter for the files you generate.

Goal: verify @eslint/config-helpers.globalIgnores in pkg:npm/%40eslint/config-helpers@0.4.2
Kind: HOW

Use EXACTLY these public packages and versions:
  - pkg:npm/%40eslint/config-helpers@0.4.2
Demonstrate these symbols/APIs:
  - @eslint/config-helpers.globalIgnores

Rules:
  - One focused purpose; the smallest project that proves the goal.
  - Include a contract test (test/contract.*) that runs OFFLINE and exits 0 exactly when the goal behavior works.
  - Pin every dependency with a lockfile so resolution is reproducible.
  - No secrets, credentials, or tokens. No real URLs (only example.com or localhost). No absolute paths.
  - No personal names, emails, company names, or project identifiers of any kind.
  - No binaries and no generated output (node_modules, dist, target, venv, .git, .env).
  - Keep it under 200 files and 256KB packed.
csx.json
{"case":{"caseId":"case:sha256:ec50ee384b4d7e0e6163272b743b68e303ba2ae6fe19b93b1443f857333e4508","contract":["globalIgnores returns config object containing patterns array and auto-incremented name","globalIgnores sets custom name when name argument is provided","globalIgnores creates global ignore config with ignores property and no files property","globalIgnores throws TypeError when pattern argument is not an array","globalIgnores throws TypeError when pattern array is empty"],"goal":"verify @eslint/config-helpers.globalIgnores in pkg:npm/%40eslint/config-helpers@0.4.2","kind":"HOW","packages":["pkg:npm/%40eslint/config-helpers@0.4.2"],"schemaVersion":1,"symbols":["@eslint/config-helpers.globalIgnores"]},"contractCommand":["node","test/contract.mjs"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"npm","libc":"glibc","libcVersion":"2.39","os":"linux","osVersionBucket":"24","packageManager":"npm","schemaVersion":1},"license":"MIT-0","packages":["pkg:npm/%40eslint/config-helpers@0.4.2"],"schemaVersion":1,"subject":"pkg:npm/%40eslint/config-helpers@0.4.2","symbols":["@eslint/config-helpers.globalIgnores"],"verifierAdapter":"node-typescript@1"}
package-lock.json
{
  "name": "sample-eslint-config-helpers-global-ignores",
  "version": "1.0.0",
  "lockfileVersion": 3,
  "requires": true,
  "packages": {
    "": {
      "name": "sample-eslint-config-helpers-global-ignores",
      "version": "1.0.0",
      "license": "MIT-0",
      "dependencies": {
        "@eslint/config-helpers": "0.4.2"
      }
    },
    "node_modules/@eslint/config-helpers": {
      "version": "0.4.2",
      "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz",
      "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==",
      "license": "Apache-2.0",
      "dependencies": {
        "@eslint/core": "^0.17.0"
      },
      "engines": {
        "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
      }
    },
    "node_modules/@eslint/core": {
      "version": "0.17.0",
      "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz",
      "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==",
      "license": "Apache-2.0",
      "dependencies": {
        "@types/json-schema": "^7.0.15"
      },
      "engines": {
        "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
      }
    },
    "node_modules/@types/json-schema": {
      "version": "7.0.15",
      "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
      "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
      "license": "MIT"
    }
  }
}
package.json
{
  "name": "sample-eslint-config-helpers-global-ignores",
  "version": "1.0.0",
  "private": true,
  "license": "MIT-0",
  "dependencies": {
    "@eslint/config-helpers": "0.4.2"
  }
}
spec.json
{
  "schemaVersion": 1,
  "goal": "verify @eslint/config-helpers.globalIgnores in pkg:npm/%40eslint/config-helpers@0.4.2",
  "kind": "HOW",
  "packages": [
    "pkg:npm/%40eslint/config-helpers@0.4.2"
  ],
  "symbols": [
    "@eslint/config-helpers.globalIgnores"
  ]
}
test/contract.mjs
import assert from "node:assert/strict";
import { globalIgnores } from "@eslint/config-helpers";

// 1. globalIgnores returns config object containing patterns array and auto-incremented name
const config1 = globalIgnores(["dist/**", "build/**"]);
assert.deepEqual(config1.ignores, ["dist/**", "build/**"]);
assert.match(config1.name, /^globalIgnores \d+$/);

// 2. globalIgnores sets custom name when name argument is provided
const config2 = globalIgnores(["temp/**", "*.log"], "custom-ignores");
assert.deepEqual(config2.ignores, ["temp/**", "*.log"]);
assert.equal(config2.name, "custom-ignores");

// 3. globalIgnores creates global ignore config with ignores property and no files property
assert.equal("files" in config1, false);
assert.equal("files" in config2, false);
assert.deepEqual(Object.keys(config2).sort(), ["ignores", "name"]);

// 4. globalIgnores throws TypeError when pattern argument is not an array
assert.throws(() => globalIgnores("not-an-array"), {
  name: "TypeError",
  message: "ignorePatterns must be an array"
});
assert.throws(() => globalIgnores(null), {
  name: "TypeError",
  message: "ignorePatterns must be an array"
});
assert.throws(() => globalIgnores(undefined), {
  name: "TypeError",
  message: "ignorePatterns must be an array"
});

// 5. globalIgnores throws TypeError when pattern array is empty
assert.throws(() => globalIgnores([]), {
  name: "TypeError",
  message: "ignorePatterns must contain at least one pattern"
});

Ursprungs-Seeder

anonym