Skip to content

Config options ​

Every option of edgefit.config.ts. For examples and explanations, see Configuration.

ts
import { defineConfig } from 'edgefit';

export default defineConfig({
  targets: ['workerd'],
  entry: 'src/index.ts',
  workerd: { compatibilityDate: '2026-04-01', compatibilityFlags: ['nodejs_compat'] },
  bun: { version: '1.4.2' },
  deno: { configFile: 'deno.json' },
  ignore: [{ package: 'chokidar', reason: 'dev server only' }],
  levels: { mocked: 'error', unknown: 'warning' },
  conditions: [],
});

Top level ​

OptionTypeDefaultDescription
targetsTargetKey[]['workerd']workerd, bun, deno, deno-deploy. Must not be empty
entrystringwrangler mainEntry point, relative to the root
ignoreIgnoreRule[][]Findings to leave out of the report
levelsPartial<Record<Category, Level>>see belowLevel per category: error, warning or off
conditionsstring[][]Extra export conditions, checked before the target's own
workerdWorkerdOptionsCloudflare Workers settings
bunBunOptionsBun settings
denoDenoOptionsSettings for deno and deno-deploy

ignore ​

FieldTypeDescription
packagestringPackage name. . means your own code
apistringAPI as shown in reports, such as node:fs.watch. A trailing * matches a prefix
reasonstringWhy. Not used by edgefit, but the next reader will thank you

Each rule needs package, api, or both.

levels ​

CategoryDefault
unsupportederror
mockederror
mismatchwarning
webwarning
unknownwarning

workerd ​

FieldTypeDefault
compatibilityDatestringwrangler compatibility_date, then the data's
compatibilityFlagsstring[]wrangler compatibility_flags, then the data's
wranglerConfigstring | falsewrangler.jsonc, wrangler.json or wrangler.toml in the root. false skips it

bun ​

FieldTypeDefault
versionstringpackageManager: "bun@x", then .bun-version

deno ​

FieldTypeDefault
configFilestring | falsedeno.json, then deno.jsonc in the root. false skips it

Validation ​

The config is validated when it is loaded. Unknown targets, unknown categories, invalid levels and ignore rules without package or api are rejected with exit code 2 and a message naming the problem.

Released under the MIT License.