* refactor(domain): consolidate canonical ordering and digest helpers (#624) * refactor(domain): consolidate canonical ordering and digest helpers Single owner for code-point ordering (domain/canonicalOrdering.ts) and canonical JSON digests (domain/comparisonSemantics.ts). Delete all local compareCodePoints/compareText/digestCanonical duplicates and migrate every importer. No re-export shims. * fix(ci): allow slower real browser startup * chore(config): remove dead eslint, dedupe scripts, cacheable turbo tasks Delete eslint.config.js (oxlint is the linter), drop lint:dead alias, pin smol-toml, fold jscpd/scan:todos into check:pr, make test:run cacheable, align oxlint ignores. * fix(config): hash all test inputs for cached runs
136 lines
3.4 KiB
JSON
136 lines
3.4 KiB
JSON
{
|
|
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
"plugins": ["typescript", "import", "unicorn", "oxc"],
|
|
"rules": {
|
|
"complexity": ["warn", 20],
|
|
"max-depth": ["warn", 4],
|
|
"max-lines": [
|
|
"warn",
|
|
{ "max": 500, "skipBlankLines": true, "skipComments": true }
|
|
],
|
|
"max-lines-per-function": [
|
|
"warn",
|
|
{ "max": 100, "skipBlankLines": true, "skipComments": true }
|
|
],
|
|
"max-params": ["warn", 4],
|
|
"no-var": "warn",
|
|
"no-var-requires": "error"
|
|
},
|
|
"overrides": [
|
|
{
|
|
"files": [
|
|
"src/{contracts,domain,server}/**/*.ts",
|
|
"src/application/**/*.ts"
|
|
],
|
|
"excludeFiles": ["src/application/runtime.ts"],
|
|
"rules": {
|
|
"no-restricted-imports": [
|
|
"error",
|
|
{
|
|
"patterns": [
|
|
{
|
|
"group": ["**/ghidra/**", "**/hopper/**"],
|
|
"message": "Deep-provider imports belong behind adapters or in the application composition root."
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"files": ["tests/**/*.ts", "src/**/*.test.ts", "src/**/*.fixture.ts"],
|
|
"rules": {
|
|
"max-lines": "off",
|
|
"max-lines-per-function": [
|
|
"error",
|
|
{ "max": 150, "skipBlankLines": true, "skipComments": true }
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"files": ["src/domain/**/*.{fixture,test}.ts"],
|
|
"rules": {
|
|
"no-restricted-imports": [
|
|
"error",
|
|
{
|
|
"patterns": [
|
|
{
|
|
"group": [
|
|
"**/application/**",
|
|
"**/server/**",
|
|
"**/process/**",
|
|
"**/browser/**",
|
|
"**/ghidra/**",
|
|
"**/hopper/**",
|
|
"**/replay/**",
|
|
"**/cli.*",
|
|
"**/main.*"
|
|
],
|
|
"message": "Domain tests may import only their owning domain and inward dependencies."
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"files": ["src/application/**/*.test.ts"],
|
|
"rules": {
|
|
"no-restricted-imports": [
|
|
"error",
|
|
{
|
|
"patterns": [
|
|
{
|
|
"group": ["**/server/**", "**/cli.*", "**/main.*"],
|
|
"message": "Service tests must use application ports rather than CLI or MCP entrypoints."
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"files": ["tests/composition/**/*.test.ts"],
|
|
"rules": {
|
|
"no-restricted-imports": [
|
|
"error",
|
|
{
|
|
"patterns": [
|
|
{
|
|
"group": [
|
|
"**/server/**",
|
|
"**/cli.*",
|
|
"**/main.*",
|
|
"node:child_process",
|
|
"node:net",
|
|
"node:http",
|
|
"node:https",
|
|
"ws",
|
|
"playwright"
|
|
],
|
|
"message": "Composition tests may wire provider-neutral sessions but must not invoke CLI, MCP, process, network, or browser boundaries."
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"env": {
|
|
"node": true,
|
|
"es2023": true
|
|
},
|
|
"ignorePatterns": [
|
|
"dist",
|
|
"build",
|
|
"node_modules",
|
|
"docs/api",
|
|
"coverage",
|
|
".turbo",
|
|
".cache",
|
|
".codex",
|
|
".devin",
|
|
".factory"
|
|
]
|
|
}
|