Augur

augur-config

Shared ESLint, Prettier, TypeScript and Lighthouse CI presets, and the augur-doctor site check.

@simpleapps-com/augur-config

Tooling presets so every Augur site starts from the same baseline, and augur-doctor, which scores a site against the platform standard.

pnpm add -D @simpleapps-com/augur-config

Optional peer dependencies, for the presets you use: eslint 9, prettier 3, typescript 5 and @lhci/cli 0.14. The ESLint and Prettier plugins the presets load come with the package. Every export: API Reference.

ESLint

// eslint.config.mjs
import augurNext from "@simpleapps-com/augur-config/eslint/next";

export default [
  ...augurNext,
  // site-specific overrides only
];
Preset Files Rules
eslint **/*.{ts,tsx} @typescript-eslint recommended, react-hooks recommended, the shared rules
eslint/next **/*.{ts,tsx,js,jsx} The same plus @next/next recommended and Core Web Vitals, and @typescript-eslint/no-deprecated as a warning

Shared rules: no-unused-vars errors except _-prefixed names, no-explicit-any warns, and complexity 15, max-depth 4 and max-nested-callbacks 3 warn. Both ignore dist/, node_modules/, .turbo/ and .next/. They are flat configs: a site still on .eslintrc* moves to eslint.config.mjs.

Prettier

// prettier.config.mjs
export { default } from "@simpleapps-com/augur-config/prettier/next";

Both presets use semicolons, double quotes, trailing commas, a print width of 100, 2-space indent and Tailwind class sorting. prettier/next also sorts and groups imports: react, third-party packages, @/components, @/hooks, @/lib, then relative imports.

TypeScript

{ "extends": "@simpleapps-com/augur-config/tsconfig/next" }
Preset Extends Adds
tsconfig/base n/a strict, ES2022 target and lib, ESNext modules, bundler resolution, isolatedModules, noUncheckedIndexedAccess, resolveJsonModule, noEmit
tsconfig/react base jsx: react-jsx, DOM libs
tsconfig/react-native base jsx: react-jsx, no DOM libs
tsconfig/next react allowJs, incremental, ES2017 target, the next plugin

Lighthouse CI

// lighthouserc.js
import { lighthousePreset } from "@simpleapps-com/augur-config/lighthouse";

export default lighthousePreset({
  urls: ["/", "/products", "/cart"],
  startServerCommand: "pnpm start",
  assertions: { "largest-contentful-paint": ["error", { maxNumericValue: 3000 }] },
});

Defaults: baseUrl http://localhost:3000, 3 runs per URL, the desktop preset, lighthouse:recommended plus defaultAssertions (FCP 2 s, LCP 2.5 s, CLS 0.1, TBT 300 ms and Speed Index 3 s as warnings; a title, meta description and good status code required; PWA checks off), and upload to temporary public storage. Your assertions, collect and upload are merged over them.

augur-doctor

pnpm augur-doctor            # the current directory
pnpm augur-doctor ./sites/example-site

It prints a scorecard grouped as below and exits 1 when any check fails (or the folder has no package.json). The score counts passes out of the scored checks; a failing run ends with a link to the migration runbook.

Status Meaning
PASS Matches the platform standard
FAIL Needs migrating; the detail says what to change
WARN Not critical, but recommended
SUGGEST Optional best practice
SKIP Doesn't apply to this site
Group Check Passes when
Site architecture site-config lib/augur-config.ts (or src/lib/, config/) calls defineSite()
server-site lib/augur-site.ts calls createServerSite()
actions lib/augur-actions.ts re-exports site.actions, or the site uses the proxy instead
site-hooks lib/augur.ts sets up augur-hooks (AugurHooksProvider)
ssr-options lib/augur-options.ts exports prefetch options
Config alignment tsconfig tsconfig.json extends augur-config/tsconfig/next
eslint eslint.config.mjs imports augur-config/eslint
eslint-deprecated @typescript-eslint/no-deprecated is warn or error
prettier prettier.config.mjs imports augur-config/prettier
knip knip is a dev dependency and has a config file
tailwind tailwindcss is ^4
icons react-icons is used, not @heroicons/react or lucide-react
Next.js config next-external serverExternalPackages doesn't list augur-server
next-ioredis ioredis is in serverExternalPackages when the site uses it
next-headers headers() sets HSTS, X-Content-Type-Options and Permissions-Policy
next-optimize experimental.optimizePackageImports is set
next-strict reactStrictMode is set
Testing, quality contract-tests __tests__/sdk-contracts/ (or sdk-contract.test.ts) exists
quality-script A quality script runs typecheck, lint and test
pre-commit lefthook has a pre-commit section and lint-staged is configured (else SUGGEST)
Proxy adoption proxy-local-hooks lib/augur.ts has no local useQuery wrappers (else SUGGEST)
proxy-server-query The site fetches through createServerQueryProxy, createAugurOptions or useAugurOptions
query-client-scope No new QueryClient( at module scope in the provider and query files
query-gc-time No gcTime there other than Infinity, resolveGcTime(…) or 0
api-version @simpleapps-com/augur-api is 2026.3.7 or later
Package versions augur-version-latest Each installed augur package is on its own latest release
Patterns no-wrapper No class AugurClient or extends AugurAPI wrapper
auth auth.ts uses createAuthConfig, site.auth or createServerSite
image-loader next.config lists agr.media for images

The packages release independently, so there is no same-version check: each package is compared with its own latest. To catch up, set the versions in package.json and run pnpm install, not pnpm update (see the runbook).