University of Peradeniya crestSCS Documentation
University of Peradeniya crestSCS Documentation
Department website

Start here

Repository handbookRepository overviewDevelopment

System design

ArchitectureAuthentication and authorizationPublic dataAPI contractsSchemas
UI system

Applications

Department Web applicationPeople applicationProjects applicationPortal application

Services

API serviceGitHub App serviceMailer service

Shared packages

Schemas packageUI packageTypeScript configuration packageESLint configuration package
Shared package internals
Tooling package internalsTypeScript presetsESLint presets

Development workflow

Testing and verificationDependency managementDocumentation authoringUI quality assurance

Operations

Continuous integrationEnvironment variablesOperationsSecurityTroubleshooting

Reference

Route referenceGlossary
Shared package internalsTooling package internals

Base, Next.js, Worker, TypeScript resolver, and Tailwind settings plus the rules for local overrides and verification.

ESLint presets

The ESLint package exposes flat-config arrays for base, Next.js, and Worker policy plus helpers that bind resolution and Tailwind analysis to the consuming workspace.

Preset composition

ExportMain responsibility
baseimport sorting, unused imports, console policy, Prettier
nextNext TypeScript and Core Web Vitals, base, Tailwind correctness
workertyped TypeScript, Worker globals, imports, promises, security
project helpersworkspace TSConfig resolver and Tailwind CSS entry point

Base treats unused imports as errors, intentionally ignored underscore-prefixed values as allowed, other unused values and explicit any as warnings, and non-approved console calls as warnings. Prettier is last so formatting rules do not conflict with the formatter.

The Next preset enables eslint-plugin-better-tailwindcss correctness and enforces canonical classes. Each application supplies its own cwd and global CSS entry point so Tailwind v4 tokens and scanned classes resolve in the right workspace. Shared UI disables unknown-class checking because its semantic utilities are supplied by consumers; it does not disable conflicting or canonical-class checks.

The Worker preset uses type-aware rules for source, including unresolved imports, floating promises, misused promises, and consistent type imports. It provides browser and Worker globals; Bun or Node services add their own globals locally. security/detect-object-injection is disabled because it produces unusable noise for ordinary typed property access, while the rest of the security plugin is registered for explicit rules in the preset or a consumer.

Local overrides

Local configuration may add generated-file ignores, runtime globals, test-only non-type-aware files, a Tailwind entry point, or a narrow documented framework exception. It must not copy central rules or disable a rule across product code to avoid fixing violations.

Config tests assert exported policy and inspect representative Web, Projects, UI, and GitHub App consumers. After changing a preset, run the config package's test and typecheck plus lint in representative Next.js, UI, Worker, Bun service, and test workspaces.

TypeScript presets

The shared compiler preset hierarchy, intended consumers, local configuration responsibilities, and verification impact.

Testing and verification

Test layers, workspace gates, repository-wide checks, CI parity, and evidence required before completion.

On this page

ESLint presetsPreset compositionLocal overrides