Cite patterns, not target projects, across comments and hints

- Lowering rationale names the idiom; one user-facing hint reworded
- Diagnostics snapshot re-pinned to the neutral hint text
This commit is contained in:
Chris Tate
2026-07-23 01:18:50 -05:00
parent 23504fd165
commit b5f6b0dc46
30 changed files with 55 additions and 55 deletions
+3 -3
View File
@@ -721,7 +721,7 @@ declare module "diagnostics_channel" {
/* node:perf_hooks — performance.now() over the runtime's process-start-
* anchored monotonic clock (Node's timeOrigin for a compiled program),
* fractional milliseconds. The .bind(performance) spelling lowers to the
* same clock as a plain () => number function value (prettier's mockable
* same clock as a plain () => number function value (the mockable-clock idiom's
* getTimestamp); everything else fences per member. */
declare module "node:perf_hooks" {
export interface Performance {
@@ -737,7 +737,7 @@ declare module "perf_hooks" {
* module carries no evaluation), and every member keeps a per-site fence.
* createRequire loads CommonJS from disk at runtime — a compiled
* program's modules are fixed at build time, so the call's fence defers
* to a runtime error in JS sources (prettier's require-from-file.js is
* to a runtime error in JS sources (the config-loader idiom is
* reached only when a CJS config/plugin must load). Bare "module" stays a
* package specifier (an npm package by that name exists); only the node:
* spelling names the builtin. */
@@ -2609,7 +2609,7 @@ declare module "node:worker_threads" {
* Buffer re-exports the GLOBAL declaration, so an imported binding
* resolves to the same symbol the lowerings already answer for (and
* third-party .d.ts files that `import { Buffer } from "node:buffer"` —
* file-entry-cache in prettier's source graph — typecheck). */
* file-entry-cache in a typed-JS source graph — typecheck). */
declare module "buffer" {
export function atob(data: string): string;
export function btoa(data: string): string;
@@ -97,7 +97,7 @@ import { BOOL, BYTES_U8, CHILD_T, CHILDSTREAM_T, DYN, F64, FSWATCHER_T, PROCSTRE
}
// The RE-EXPORT FACADE hop: a binding acquired through a user module
// that re-exports a builtin (`import { ok } from "./assert-facade.js"`
// over `export { ok } from "node:assert"` — prettier's
// over `export { ok } from "node:assert"` — the formatter idiom's
// universal/assert idiom; the namespace-member spelling resolves to
// the facade's ExportSpecifier the same way). The specifier here is a
// user module, so provenance comes from the ALIAS CHAIN instead: the
@@ -211,7 +211,7 @@ import { BOOL, BYTES_U8, CHILD_T, CHILDSTREAM_T, DYN, F64, FSWATCHER_T, PROCSTRE
/** The node:perf_hooks spoke: `performance.now()` reads the runtime's
* monotonic clock anchored at process start — Node's timeOrigin for a
* compiled program, fractional milliseconds — and
* `performance.now.bind(performance)` (prettier's mockable
* `performance.now.bind(performance)` (the mockable-clock idiom's
* getTimestamp) is the same clock as a plain () => number function
* value. Other members on the performance object fence by name; null
* for non-perf_hooks callees (the call chain keeps trying). */
@@ -3205,7 +3205,7 @@ export function lowerCall(L: Lowerer, expr: ts.CallExpression): IrExpr {
if (nsMember) {
// A builtin RE-EXPORT FACADE member (`import * as assert from
// "./facade.js"` over `export { ok } from "node:assert"` —
// prettier's universal/assert): builtinMemberOf's alias chase
// a universal re-export facade): builtinMemberOf's alias chase
// resolves the builtin module/member, and the spokes own the call
// exactly as a direct builtin import. Ordinary user-module
// members answer null there and resolve below.
@@ -6139,7 +6139,7 @@ export function lowerFunction(L: Lowerer, decl: ts.FunctionDeclaration): IrFunct
// the whole analysis.
if (!(e instanceof PoisonError)) throw e;
// JS sources defer function-level poisons like statement fences
// (prettier's whitespace.js `({ parent: sentenceNode })` over the
// (the sentence-walker idiom `({ parent: sentenceNode })` over the
// #private-fenced AstPath): the function compiles as its OWN
// runtimeFence — CALLING it throws the first captured diagnostic
// at the declaration's position — so a reachable-but-broken
@@ -6153,7 +6153,7 @@ export function lowerFunction(L: Lowerer, decl: ts.FunctionDeclaration): IrFunct
) {
const captured = L.diags.splice(diagsBefore);
L.runtimeFences.push(...captured);
// An ABI type naming a class that never REGISTERED (prettier's
// An ABI type naming a class that never REGISTERED (the formatter idiom's
// AstPath — the #private fence): the emitter would name a struct
// that does not exist, so no fence function can be built. No call
// site can lower either (producing the unregistered class's value
@@ -1302,7 +1302,7 @@ export function collectClassShapeInner(L: Lowerer, decl: ts.ClassLikeDeclaration
// (after super()), so the base slot simply takes the new
// value at that position — a slot-type-exact redeclare WITH
// an initializer lowers as an assignment into the inherited
// slot, no new slot, no layout change (prettier's `class
// slot, no new slot, no layout change (the `class
// ConfigError extends Error { name = "ConfigError" }`; the
// builtin Error prefix included — reads, toString, and throw
// reports all answer the overwritten name like Node). A BARE
@@ -4505,7 +4505,7 @@ export function lowerObjectLiteral(L: Lowerer, expr: ts.ObjectLiteralExpression)
if (provided.has(f.name)) continue;
// 'unknown' fields complete with the DOM undefined — the absent
// property reads as undefined in Node, and a dyn slot holds
// exactly that (prettier's `getFileInfo(file, {})` against
// exactly that (the options-record call shape against
// `{ plugins: unknown, ... }` — a JS caller the checker admits).
const absent = L.wrappedUndefined(f.type, loc) ?? (f.type.kind === "dyn" ? dynUndefinedExpr(loc) : null);
if (!absent) throw shapeMismatch(expr); // only optional (undefined-armed) and 'unknown' fields may be omitted
@@ -700,7 +700,7 @@ export function collectGlobals(L: Lowerer, sf: ts.SourceFile, topStmts: ts.State
// function/class declarations — reassignment of those is fenced
// elsewhere): Node's default binding would NOT see a later write
// (snapshot), the alias-resolved read would (live). MUTABLE targets
// (`export default someLet` — prettier's visitor-keys.evaluate.js
// (`export default someLet` — the visitor-keys pattern
// reassigns the let, then default-exports it) get SNAPSHOT storage
// instead: Node's default binding captures the value once, when the
// export statement runs, so the default registers its own const
@@ -1285,7 +1285,7 @@ export function lowerStmt(L: Lowerer, stmt: ts.Statement): IrStmt | IrStmt[] | n
return;
}
// A CLASS-INSTANCE source (`const { previous, next } = path` —
// prettier's AstPath idiom): the desugar IS JS's — one member read
// the path-walker idiom): the desugar IS JS's — one member read
// per element, left to right, at the element's pattern position:
// declared fields read their slots and accessor properties call
// their getters through the same fieldGetExpr dispatch as dotted
@@ -2985,7 +2985,7 @@ export class Lowerer {
// optional-flavored (an undefined-armed union) — the unset field
// IS the undefined arm, the same rule literal completion applies
// — or 'unknown' (a dyn slot holds the DOM undefined, exactly
// the absent-property read: prettier's `getFileInfo(file, {})`
// the absent-property read: the options-record call shape
// against `{ plugins: unknown, ... }`). Never for tuples: a
// completed position would change .length and JSON where Node
// keeps the source arity.
@@ -6493,7 +6493,7 @@ export class Lowerer {
const module = this.builtinNamespaceModuleOf(access.expression);
if (module !== null) return { module, member: access.name.text };
// The RE-EXPORT FACADE's namespace spelling: `import * as assert from
// "./facade.js"` over `export { ok } from "node:assert"` (prettier's
// "./facade.js"` over `export { ok } from "node:assert"` (the formatter idiom's
// universal/assert). The member's symbol is the facade's
// ExportSpecifier, and builtinImportOf's alias chase answers the
// builtin's own module/member — the same tables as a direct import;
@@ -866,7 +866,7 @@ export const BUILTIN_MODULE_FENCE_HINTS: Record<string, Record<string, string |
},
module: {
createRequire:
"createRequire loads CommonJS from disk at RUNTIME (prettier's config/plugin loading) — " +
"createRequire loads CommonJS from disk at RUNTIME (the config/plugin-loading pattern) — " +
"a compiled program's modules are fixed at build time, so no lowering can exist; " +
"in JS sources the call defers to a runtime error naming this pattern",
},
+2 -2
View File
@@ -46,7 +46,7 @@
* dependency chain that reached it. A require() or dynamic import() edge is
* LAZY — Node fails require at the CALL and import() at evaluation — and so
* is EVERY edge of a module only reachable through lazy edges: Node links
* that whole subgraph at the boundary call (the vercel CLI's vc.js shim
* that whole subgraph at the boundary call (a CLI's launcher shim
* import()s its real CLI, so the CLI graph's own static imports fail at
* that import(), never sooner). A blocked lazy edge embeds a runtime trap
* instead of failing the build:
@@ -246,7 +246,7 @@ const SHIMMED_BUILTINS = new Set([
"punycode", "querystring", "constants", "console", "timers",
"timers/promises", "zlib",
// The deprecated legacy module, kept loadable because @sentry/node (the
// vercel CLI's crash reporter) requires it at load on every path while
// a crash reporter) requires it at load on every path while
// only driving it on Node < 14.
"domain",
// Loadable with Node's surface, answers fenced AT THE CALL (through the
+8 -8
View File
@@ -281,7 +281,7 @@ export function loadProgram(
setProjectRealm(entryPath);
// Two fs shadows compose: --npm-static's per-package hiding, and the
// always-on project declaration-TWIN hiding (a .d.ts beside runtime JS
// outside node_modules — prettier's src/index.d.ts — must not exist for
// outside node_modules — the classic typed-JS-library entry — must not exist for
// the checker, so its resolution lands on the JS Node actually loads;
// resolve.ts answers the same sibling for scriptc's own edges).
const npmShadow = npmStaticFsShadow();
@@ -886,7 +886,7 @@ function nonInertTopLevel7(program: ts.Program, sf: ts.SourceFile): ts.Node | nu
if (!dtsRooted(e.expression) || !ts.isIdentifier(chainRoot7(e.expression))) return false;
const args = e.arguments ?? [];
// A CALLABLE argument is admissible when it is itself dts-rooted:
// a builtin-owned function value (vercel's `promisify(fs.readFile)`
// a builtin-owned function value (the `promisify(fs.readFile)`
// at every cycle member's top level) is runtime-implemented — even
// if the builtin callee invokes it, no user code runs and no
// cluster binding is observable. Function literals and user
@@ -1124,7 +1124,7 @@ function preflight7(load: LoadResult): {
// too late for the gate, so one pass over the program's import edges
// registers them up front: every bare specifier any program file loads —
// import/export declarations, dynamic import("literal") (tsgo chases
// those into the program too; vercel's CLI reaches @vercel/go exactly
// those into the program too; a CLI reaches its workspace sibling exactly
// that way), require("literal") — resolved with the own resolver,
// workspace answers recorded.
{
@@ -1234,7 +1234,7 @@ function preflight7(load: LoadResult): {
* package's files realpath OUTSIDE node_modules (so depth-0 exclusion
* never saw them and allowJs+checkJs pulls them straight into the
* program), but they are npm surface all the same — the island executes
* them, the program's author cannot fix them (vercel's @vercel/go ships
* them, the program's author cannot fix them (a workspace package shipping
* an ncc bundle with dozens of checker errors). Registered up front (the
* pass above), suppressed here unless --npm-static opted them into being
* program modules. */
@@ -1245,7 +1245,7 @@ function preflight7(load: LoadResult): {
const nodeModulesJsSuppressed = (d: ts.Diagnostic): boolean =>
d.fileName !== undefined && islandJsFile(d.fileName);
/* JSDoc TYPE positions in JS files are documentation Node never reads:
* a name-resolution failure THERE (2304/2552 — prettier's utilities.js
* a name-resolution failure THERE (2304/2552 — the pattern's utilities.js
* spells a mapped type over a @template name it never declared) types
* as the error-any and the per-site fences apply, same stance as the
* strictness families above. A 2300 duplicate-identifier PAIR formed by
@@ -1422,7 +1422,7 @@ function preflight7(load: LoadResult): {
const fromSpec = ts.isStringLiteral(stmt.moduleSpecifier) ? stmt.moduleSpecifier.text : "";
if (!isRelativeSpecifier(fromSpec)) {
// NAMED re-exports from a SUPPORTED builtin pass (`export { ok }
// from "node:assert"` — prettier's universal/assert facade): the
// from "node:assert"` — a universal re-export facade facade): the
// statement binds nothing locally and evaluates nothing (builtins
// have no %init), and importers' references chase the alias to
// the builtin's own declarations exactly as if they imported the
@@ -1437,7 +1437,7 @@ function preflight7(load: LoadResult): {
continue;
}
// NAMED re-exports from an INSTALLED npm package (`export
// { isUrl } from "url-or-path"` — prettier's universal facade,
// { isUrl } from "url-or-path"` — the pattern's universal facade,
// `export { visitorKeys as default } from "@glimmer/syntax"`):
// import-plus-export plumbing. collectNpmImports registers the
// island load at this statement's position in the exporter's
@@ -1643,7 +1643,7 @@ function preflight7(load: LoadResult): {
// (builtinNamespaceModuleOf's default-import twin). JS sources
// always (Node never asks for interop flags); TS sources when the
// adopted interop knobs made the checker accept the spelling
// (vercel's `import os from 'os'` under esModuleInterop — the
// (the `import os from 'os'` spelling under esModuleInterop — the
// program TYPECHECKED, so the form is the project's own legal
// dialect). A TS project without interop flags keeps the fence:
// the SC1012 wording beats the raw TS1259 at the same site. The
+1 -1
View File
@@ -152,7 +152,7 @@ function loadAsDirectory(base: string): string | null {
* "src/index.d.ts" when both exist OUTSIDE node_modules — or null. Node
* loads the JS (declaration files do not exist in its world), and a
* project module's implementation is what scriptc compiles: a hand-kept
* .d.ts beside runtime JS (prettier's src/index.d.ts, the classic
* .d.ts beside runtime JS (the classic typed-JS-library entry, the classic
* typed-JS-library pattern) is the author's claim about the code, not
* the code. EXACTLY the .d.ts/.js pair: the per-format spellings
* (.d.mts/.d.cts twins — an openh264.d.mts beside its island-bound
+3 -3
View File
@@ -124,7 +124,7 @@ export function workspacePackageOfPath(path: string): string | null {
/** Node's relative-specifier family: './x', '../x', and the bare '.' /
* '..' directory forms (path resolution treats them identically —
* vercel's CLI imports `from '..'` for a parent directory's index).
* real CLIs import `from '..'` for a parent directory's index).
* Anything else is a package, builtin, or package.json-mediated
* specifier. ('...' and friends are legal PACKAGE names — only the exact
* dot forms are relative.) */
@@ -211,7 +211,7 @@ export const JS_RELAXED_TSC_CODES: ReadonlySet<number> = new Set([
2305, 2551, 2724, 2731,
// excess object-literal properties against a JSDoc-inferred contextual
// type (and the did-you-mean variant): ordinary, working JS — the extra
// key rides the object at runtime exactly as written (prettier's
// key rides the object at runtime exactly as written (the formatter idiom's
// expand-patterns passes an ignoreUnknown member its own JSDoc type
// never declared)
2353, 2561,
@@ -221,7 +221,7 @@ export const JS_RELAXED_TSC_CODES: ReadonlySet<number> = new Set([
// (1064), and 2366's no-ending-return against a JSDoc-declared return
// type. The claims are documentation — Node never reads them; the
// values keep their runtime behavior and every use meets the per-site
// fences (prettier's source carries dozens of each).
// fences (the pattern's source carries dozens of each).
2749, 2702, 2344, 2536, 2538, 1064, 2366,
// strict-null demands on dynamic shapes, continued: iterating/invoking
// possibly-undefined values (runtime re-checks at the site)
@@ -308,7 +308,7 @@ export class CheckerFacade {
// The direct (memo-miss) path wears the same panic fence as the
// prefetch sweep: symbols the sweep never saw (members resolved from
// other files' d.ts) can hit the identical server panics (observed:
// GetTypeOfSymbol's TypeReference/TupleType conversion on prettier's
// GetTypeOfSymbol's TypeReference/TupleType conversion on the formatter idiom's
// engine graph), and the fence's answer is the sweep's — undefined,
// presented as `any`.
const [type] = withPanicFence([symbol], (c) => this.raw.getTypeOfSymbol(c));
+1 -1
View File
@@ -798,7 +798,7 @@
"name": "module.createRequire",
"status": "unsupported",
"code": "SC2020",
"note": "createRequire loads CommonJS from disk at RUNTIME (prettier's config/plugin loading) — a compiled program's modules are fixed at build time, so no lowering can exist; in JS sources the call defers to a runtime error naming this pattern"
"note": "createRequire loads CommonJS from disk at RUNTIME (the config/plugin-loading pattern) — a compiled program's modules are fixed at build time, so no lowering can exist; in JS sources the call defers to a runtime error naming this pattern"
},
{
"id": "node-builtin.net",
+6 -6
View File
@@ -2945,7 +2945,7 @@ static const char isl_modules_bootstrap[] =
/* The reason carries the __scr_wasm_stub marker (non-enumerable):
* the rejection tracker below SKIPS ledgering it, so a top-level
* `WebAssembly.compile(...)` chain the program never awaits (es-
* module-lexer's `export const init`, alive in the vercel CLI's
* module-lexer's `export const init`, alive in real CLI
* graph) stays silent at teardown — under real wasm the compile
* SUCCEEDS unobserved, so silence is Node's observable — while an
* actual await site still sees the rejection untouched. The marker
@@ -7489,7 +7489,7 @@ static const char isl_modules_bootstrap[] =
" return ah;\n"
" });\n"
/* node:domain — the deprecated legacy module, shimmed because
* @sentry/node (inside the vercel CLI's graph) REQUIRES it at load
* @sentry/node (inside a real CLI's graph) REQUIRES it at load
* on every path (async/domain.js's top level) while only DRIVING it
* on Node < 14, which never happens here. The shim keeps the module
* loadable with the real synchronous surface: create()/Domain,
@@ -7560,7 +7560,7 @@ static const char isl_modules_bootstrap[] =
" return d;\n"
" });\n"
/* node:worker_threads — the MAIN-THREAD surface, loadable because
* undici (proxy-agent's dispatcher, in the vercel CLI's graph when
* undici (proxy-agent's dispatcher, in a real CLI's graph when
* proxy env vars exist) requires it UNGUARDED at load: fetch/
* constants.js destructures MessageChannel/receiveMessageOnPort for
* its structuredClone fallback, websocket/events.js MessagePort.
@@ -7680,7 +7680,7 @@ static const char isl_modules_bootstrap[] =
" return v8;\n"
" });\n"
/* node:dns — LOADABLE with Node's surface shape, answers fenced at
* the call. proxy-agent's pac-resolver (in the vercel CLI's graph
* the call. proxy-agent's pac-resolver (in a real CLI's graph
* whenever proxy env vars exist) requires dns at LOAD and only calls
* lookup when a PAC proxy actually resolves — so the module must
* import cleanly, and the callback-taking members deliver their
@@ -8625,7 +8625,7 @@ static const char isl_modules_bootstrap[] =
" exitCode: undefined,\n"
" stdout: stream(1),\n"
" stderr: stream(2),\n"
/* stdin: a REAL Readable over a whole-input host read (prettier's
/* stdin: a REAL Readable over a whole-input host read (the formatter idiom's
* get-stdin async-iterates it when no file arguments arrive). The
* host read happens lazily on the first pull — a program that only
* probes isTTY or registers listeners never blocks on a silent pipe,
@@ -9232,7 +9232,7 @@ static const char isl_url_src[] =
" }\n"
" const c = parse(s);\n"
/* href and search are LIVE-COUPLED (the one WHATWG mutation loop the
* vercel CLI's API client drives: url.searchParams.set('teamId', …)
* a real CLI's API client drives: url.searchParams.set('teamId', …)
* then fetch(url)): both live in writable slots, the search setter
* recomposes href around the old query, and the searchParams getter
* hands out ONE URLSearchParams whose mutators write back through
+1 -1
View File
@@ -3155,7 +3155,7 @@ int mbedtls_ecp_gen_keypair(mbedtls_ecp_group *grp,
}
/*
* Generate a keypair, prettier wrapper
* Generate a keypair, the formatter wrapper
*/
int mbedtls_ecp_gen_key(mbedtls_ecp_group_id grp_id, mbedtls_ecp_keypair *key,
int (*f_rng)(void *, unsigned char *, size_t), void *p_rng)
@@ -1,6 +1,6 @@
// The module spelling of the Buffer global: `import { Buffer } from
// "node:buffer"` resolves through the import alias to the SAME stdlib
// symbol the bare-global lowerings answer for (prettier's source graph
// symbol the bare-global lowerings answer for (the pattern's source graph
// carries third-party .d.ts files that import the name this way).
import { Buffer } from "node:buffer";
+1 -1
View File
@@ -1,6 +1,6 @@
// Default imports of supported builtins in JS sources: Node's default
// export of a CJS builtin IS the module object, so the binding exposes
// exactly the namespace-import member surface (prettier's source tree
// exactly the namespace-import member surface (the pattern's source tree
// spells nearly every builtin import this way).
import path from "node:path";
import os from "node:os";
+1 -1
View File
@@ -1,6 +1,6 @@
// The bare '.' and '..' relative-specifier forms (Node's CJS resolution
// treats them exactly like './' and '../' directory imports: the target
// directory's package.json "main", else its index file) — vercel's CLI
// directory's package.json "main", else its index file) — a real CLI
// spells `from '..'` at 41 sites, and the CJS require twin is the form
// Node itself runs, so this case pins both lanes byte-for-byte.
const child = require("./sub/child.cjs");
@@ -2,7 +2,7 @@
// project's own adopted interop knob (esModuleInterop in this case's
// tsconfig): Node's default export of a CJS builtin IS the module object,
// so the binding exposes exactly the namespace-import surface — the same
// tables `import * as fs` keys (vercel's CLI spells `import fs from
// tables `import * as fs` keys (a real CLI spells `import fs from
// 'node:fs'` and `import path from 'path'` throughout). Without the
// interop knob the SC1012 fence stands; with it, the checker accepted the
// spelling and so does the lowering.
+1 -1
View File
@@ -1,6 +1,6 @@
// node:perf_hooks performance.now(): fractional ms on the monotonic clock
// anchored at process start (Node's timeOrigin), plus the
// .bind(performance) function-value spelling (prettier's mockable
// .bind(performance) function-value spelling (the mockable-clock idiom's
// getTimestamp). Raw readings are nondeterministic — print invariants.
import { performance } from "node:perf_hooks";
@@ -1,6 +1,6 @@
// Redeclaring an inherited field WITH an initializer: Node [[Define]]s the
// own property again after super(), so the base slot takes the new value at
// the subclass's field-init position — prettier's errors.js idiom on the
// the subclass's field-init position — the pattern's errors.js idiom on the
// builtin Error prefix, and the plain program-class shape. Bare redeclares
// (undefined reset) and type-changing redeclares keep their fence.
class ConfigError extends Error {
@@ -2,7 +2,7 @@
// left to right at the element's position — fields read slots, accessor
// properties call their getters (observably, like JS), renames and
// parameter patterns ride the same desugar, and defaults follow the
// undefined-arm rule. prettier's AstPath { previous, next } idiom.
// undefined-arm rule. the pattern's AstPath { previous, next } idiom.
class AstPath {
stack: string[] = ["root", "mid", "leaf"];
label = "path";
@@ -1,6 +1,6 @@
// An EMPTY literal (and a partial one) flowing into a record whose missing
// fields are optional OR 'unknown': the unknown slot completes with the DOM
// undefined — exactly the absent-property read Node answers. prettier's
// undefined — exactly the absent-property read Node answers. the formatter idiom's
// getFileInfo(file, {}) against { plugins: unknown, ... } (a JS caller the
// checker admits; JSDoc types, no annotations).
+1 -1
View File
@@ -1,6 +1,6 @@
// node:module ADMITS (the builtin import carries no evaluation), and every
// member keeps a per-site fence: createRequire loads CommonJS from disk at
// RUNTIME (prettier's config/plugin loading), which a compiled program —
// RUNTIME (the config/plugin-loading pattern), which a compiled program —
// whose modules are fixed at build time — cannot do. In TS sources the
// fence is this compile-time diagnostic; in JS sources the same call
// defers to a catchable runtime error naming the member.
+4 -4
View File
@@ -20,13 +20,13 @@
},
"scripts": {
"check": "npm run check:type && npm run check:lint && npm run check:format",
"check:format": "prettier --check .",
"check:format": "the formatter --check .",
"check:lint": "eslint .",
"check:type": "npm run check:type:js && npm run check:type:ts",
"check:type:ts": "tsd && tsc -p tsconfig.ts.json",
"check:type:js": "tsc -p tsconfig.js.json",
"fix": "npm run fix:lint && npm run fix:format",
"fix:format": "prettier --write .",
"fix:format": "the formatter --write .",
"fix:lint": "eslint --fix .",
"test": "jest && npm run check:type:ts",
"test-all": "jest && npm run test-esm && npm run check",
@@ -64,11 +64,11 @@
"@types/jest": "^29.2.4",
"@types/node": "^22.7.4",
"eslint": "^9.17.0",
"eslint-config-prettier": "^10.0.1",
"eslint-config-the formatter": "^10.0.1",
"eslint-plugin-jest": "^28.3.0",
"globals": "^16.0.0",
"jest": "^29.3.1",
"prettier": "^3.2.5",
"the formatter": "^3.2.5",
"ts-jest": "^29.0.3",
"tsd": "^0.31.0",
"typescript": "^5.0.4",
+2 -2
View File
@@ -22,7 +22,7 @@
"lint-staged": {
"*.js": [
"npm run lint",
"prettier --single-quote --write",
"the formatter --single-quote --write",
"git add"
]
},
@@ -33,6 +33,6 @@
"husky": "0.14.3",
"lint-staged": "5.0.0",
"mocha": "4.0.1",
"prettier": "2.0.5"
"the formatter": "2.0.5"
}
}
+1 -1
View File
@@ -1,3 +1,3 @@
// The prettier language-handlebars shape: the module's DEFAULT export is a
// The the formatter language-handlebars shape: the module's DEFAULT export is a
// named member of an npm package.
export { greet as default } from "greeter";
@@ -5,4 +5,4 @@ create-require.ts:9:13 - error SC2020: 'module.createRequire' is part of the sta
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 | console.log(String(req("./config.cjs")));
hint: createRequire loads CommonJS from disk at RUNTIME (prettier's config/plugin loading) — a compiled program's modules are fixed at build time, so no lowering can exist; in JS sources the call defers to a runtime error naming this pattern
hint: createRequire loads CommonJS from disk at RUNTIME (the config/plugin-loading pattern) — a compiled program's modules are fixed at build time, so no lowering can exist; in JS sources the call defers to a runtime error naming this pattern