Add oxlint, oxfmt, typescript-go
- oxlint with react, react-hooks, typescript, import, unicorn plugins
- oxfmt (no trailing commas, single quotes, sorted imports)
- tsgo (typescript-go native preview) for fast typechecking
- Fix all lint warnings: non-null assertions, unused expressions, stale closures
- Scripts: lint, format, typecheck, check
2026-02-27 12:52:04 +00:00
|
|
|
{
|
|
|
|
|
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
2026-03-15 10:15:31 +00:00
|
|
|
"plugins": [
|
|
|
|
|
"typescript",
|
|
|
|
|
"import",
|
|
|
|
|
"unicorn",
|
|
|
|
|
"vue"
|
|
|
|
|
],
|
|
|
|
|
"jsPlugins": [
|
|
|
|
|
"./lint/plugin.js"
|
|
|
|
|
],
|
Add oxlint, oxfmt, typescript-go
- oxlint with react, react-hooks, typescript, import, unicorn plugins
- oxfmt (no trailing commas, single quotes, sorted imports)
- tsgo (typescript-go native preview) for fast typechecking
- Fix all lint warnings: non-null assertions, unused expressions, stale closures
- Scripts: lint, format, typecheck, check
2026-02-27 12:52:04 +00:00
|
|
|
"env": {
|
|
|
|
|
"browser": true,
|
|
|
|
|
"es2024": true
|
|
|
|
|
},
|
|
|
|
|
"rules": {
|
|
|
|
|
"no-unused-vars": "warn",
|
|
|
|
|
"no-console": "off",
|
2026-03-15 10:15:31 +00:00
|
|
|
"no-restricted-imports": [
|
|
|
|
|
"error",
|
|
|
|
|
{
|
|
|
|
|
"paths": [
|
|
|
|
|
{
|
|
|
|
|
"name": "@/types",
|
|
|
|
|
"message": "Import types directly from @open-pencil/core."
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"patterns": [
|
|
|
|
|
{
|
|
|
|
|
"group": [
|
|
|
|
|
"@/engine/*"
|
|
|
|
|
],
|
|
|
|
|
"message": "Import from @open-pencil/core unless the module adds platform-specific logic.",
|
|
|
|
|
"allowImportNames": [
|
|
|
|
|
"loadFont",
|
|
|
|
|
"listFamilies",
|
|
|
|
|
"preloadFonts"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"group": [
|
|
|
|
|
"../../packages/*",
|
|
|
|
|
"../../../packages/*"
|
|
|
|
|
],
|
|
|
|
|
"message": "Use the workspace package name (e.g. @open-pencil/core) instead of relative paths to packages/."
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
],
|
2026-03-09 06:16:07 +00:00
|
|
|
"no-empty-function": "error",
|
2026-03-15 10:15:31 +00:00
|
|
|
"max-lines": [
|
|
|
|
|
"warn",
|
|
|
|
|
{
|
|
|
|
|
"max": 600
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"complexity": [
|
|
|
|
|
"error",
|
|
|
|
|
{
|
|
|
|
|
"max": 20
|
|
|
|
|
}
|
|
|
|
|
],
|
Add oxlint, oxfmt, typescript-go
- oxlint with react, react-hooks, typescript, import, unicorn plugins
- oxfmt (no trailing commas, single quotes, sorted imports)
- tsgo (typescript-go native preview) for fast typechecking
- Fix all lint warnings: non-null assertions, unused expressions, stale closures
- Scripts: lint, format, typecheck, check
2026-02-27 12:52:04 +00:00
|
|
|
"typescript/no-explicit-any": "warn",
|
|
|
|
|
"typescript/no-non-null-assertion": "warn",
|
2026-03-08 20:04:44 +00:00
|
|
|
"typescript/no-floating-promises": "error",
|
Harden oxlint: consistent-type-imports, no-duplicates, no-misused-promises, prefer-optional-chain
Add 6 new lint rules: typescript/consistent-type-imports,
typescript/no-unnecessary-type-assertion, typescript/prefer-optional-chain,
typescript/no-misused-promises, import/no-duplicates, import/no-mutable-exports.
Ban @/types shim via no-restricted-imports.
Fix all violations: replace inline import() annotations with proper
type imports, merge duplicate module imports, add void to fire-and-forget
promises, convert && chains to optional chaining.
2026-03-09 06:05:04 +00:00
|
|
|
"typescript/no-misused-promises": "error",
|
|
|
|
|
"typescript/consistent-type-imports": "error",
|
2026-03-09 06:16:07 +00:00
|
|
|
"typescript/consistent-return": "error",
|
|
|
|
|
"typescript/no-unnecessary-condition": "error",
|
Harden oxlint: consistent-type-imports, no-duplicates, no-misused-promises, prefer-optional-chain
Add 6 new lint rules: typescript/consistent-type-imports,
typescript/no-unnecessary-type-assertion, typescript/prefer-optional-chain,
typescript/no-misused-promises, import/no-duplicates, import/no-mutable-exports.
Ban @/types shim via no-restricted-imports.
Fix all violations: replace inline import() annotations with proper
type imports, merge duplicate module imports, add void to fire-and-forget
promises, convert && chains to optional chaining.
2026-03-09 06:05:04 +00:00
|
|
|
"typescript/no-unnecessary-type-assertion": "error",
|
2026-03-09 06:16:07 +00:00
|
|
|
"typescript/no-unnecessary-type-parameters": "error",
|
2026-03-09 07:05:18 +00:00
|
|
|
"typescript/no-unnecessary-boolean-literal-compare": "error",
|
|
|
|
|
"typescript/no-unnecessary-template-expression": "error",
|
|
|
|
|
"typescript/no-unnecessary-type-arguments": "error",
|
Harden oxlint: consistent-type-imports, no-duplicates, no-misused-promises, prefer-optional-chain
Add 6 new lint rules: typescript/consistent-type-imports,
typescript/no-unnecessary-type-assertion, typescript/prefer-optional-chain,
typescript/no-misused-promises, import/no-duplicates, import/no-mutable-exports.
Ban @/types shim via no-restricted-imports.
Fix all violations: replace inline import() annotations with proper
type imports, merge duplicate module imports, add void to fire-and-forget
promises, convert && chains to optional chaining.
2026-03-09 06:05:04 +00:00
|
|
|
"typescript/prefer-optional-chain": "error",
|
2026-03-09 06:16:07 +00:00
|
|
|
"typescript/prefer-for-of": "error",
|
Add oxlint, oxfmt, typescript-go
- oxlint with react, react-hooks, typescript, import, unicorn plugins
- oxfmt (no trailing commas, single quotes, sorted imports)
- tsgo (typescript-go native preview) for fast typechecking
- Fix all lint warnings: non-null assertions, unused expressions, stale closures
- Scripts: lint, format, typecheck, check
2026-02-27 12:52:04 +00:00
|
|
|
"import/no-cycle": "error",
|
|
|
|
|
"import/no-self-import": "error",
|
Harden oxlint: consistent-type-imports, no-duplicates, no-misused-promises, prefer-optional-chain
Add 6 new lint rules: typescript/consistent-type-imports,
typescript/no-unnecessary-type-assertion, typescript/prefer-optional-chain,
typescript/no-misused-promises, import/no-duplicates, import/no-mutable-exports.
Ban @/types shim via no-restricted-imports.
Fix all violations: replace inline import() annotations with proper
type imports, merge duplicate module imports, add void to fire-and-forget
promises, convert && chains to optional chaining.
2026-03-09 06:05:04 +00:00
|
|
|
"import/no-duplicates": "error",
|
|
|
|
|
"import/no-mutable-exports": "error",
|
Add oxlint, oxfmt, typescript-go
- oxlint with react, react-hooks, typescript, import, unicorn plugins
- oxfmt (no trailing commas, single quotes, sorted imports)
- tsgo (typescript-go native preview) for fast typechecking
- Fix all lint warnings: non-null assertions, unused expressions, stale closures
- Scripts: lint, format, typecheck, check
2026-02-27 12:52:04 +00:00
|
|
|
"unicorn/no-instanceof-array": "error",
|
2026-03-08 20:08:27 +00:00
|
|
|
"unicorn/no-typeof-undefined": "error",
|
2026-03-09 06:16:07 +00:00
|
|
|
"unicorn/no-nested-ternary": "error",
|
2026-03-09 07:05:18 +00:00
|
|
|
"unicorn/no-useless-fallback-in-spread": "error",
|
|
|
|
|
"unicorn/no-length-as-slice-end": "error",
|
|
|
|
|
"unicorn/no-unnecessary-await": "error",
|
|
|
|
|
"unicorn/prefer-string-starts-ends-with": "error",
|
2026-03-09 06:16:07 +00:00
|
|
|
"unicorn/consistent-existence-index-check": "error",
|
2026-03-08 20:08:27 +00:00
|
|
|
"vue/no-arrow-functions-in-watch": "error",
|
|
|
|
|
"vue/no-deprecated-destroyed-lifecycle": "error",
|
|
|
|
|
"vue/no-export-in-script-setup": "error",
|
|
|
|
|
"vue/no-lifecycle-after-await": "error",
|
|
|
|
|
"vue/no-import-compiler-macros": "error",
|
|
|
|
|
"vue/prefer-import-from-vue": "error",
|
|
|
|
|
"vue/valid-define-emits": "error",
|
|
|
|
|
"vue/valid-define-props": "error",
|
|
|
|
|
"vue/no-required-prop-with-default": "error",
|
2026-03-09 06:20:01 +00:00
|
|
|
"vue/no-multiple-slot-args": "error",
|
2026-03-08 20:08:27 +00:00
|
|
|
"vue/define-emits-declaration": "error",
|
|
|
|
|
"vue/define-props-destructuring": "error",
|
2026-03-09 06:41:28 +00:00
|
|
|
"vue/require-typed-ref": "error",
|
2026-03-15 10:15:31 +00:00
|
|
|
"open-pencil/no-inline-named-types": [
|
|
|
|
|
"error",
|
|
|
|
|
{
|
|
|
|
|
"Vector": "x:number,y:number",
|
|
|
|
|
"Color": "a:number,b:number,g:number,r:number",
|
|
|
|
|
"GUID": "localID:number,sessionID:number",
|
|
|
|
|
"Rect": "height:number,width:number,x:number,y:number",
|
|
|
|
|
"Matrix": "m00:number,m01:number,m02:number,m10:number,m11:number,m12:number"
|
|
|
|
|
}
|
|
|
|
|
],
|
2026-03-09 06:41:28 +00:00
|
|
|
"open-pencil/no-structuredclone-scene-arrays": "error",
|
2026-03-09 07:05:18 +00:00
|
|
|
"open-pencil/no-math-random": "error",
|
Lint CLI code: no-raw-console-format rule, fix all violations
Add no-raw-console-format lint rule for CLI commands — bans template
literals and string concatenation in console.log, forcing use of
agentfmt helpers (bold, dim, kv, entity, fmtTree, fmtList, etc.).
Extend lint target to include packages/cli/src/.
Fix all 22 lint errors in CLI code:
- Replace string concatenation with agentfmt (clusters, typography, variables)
- Mark optional CLI args as required: false (citty type accuracy)
- Remove unnecessary type assertions and optional chains
- Merge duplicate @open-pencil/core imports in headless.ts
- Extract exportViaApp/exportFromFile to reduce export.ts complexity
- Remove unused imports (formatType, printError)
- void runMain() for floating promise
2026-03-09 09:54:53 +00:00
|
|
|
"open-pencil/no-hand-rolled-color": "error",
|
2026-03-13 07:03:12 +00:00
|
|
|
"open-pencil/no-raw-console-format": "off",
|
|
|
|
|
"open-pencil/no-silent-catch": "error"
|
Add oxlint, oxfmt, typescript-go
- oxlint with react, react-hooks, typescript, import, unicorn plugins
- oxfmt (no trailing commas, single quotes, sorted imports)
- tsgo (typescript-go native preview) for fast typechecking
- Fix all lint warnings: non-null assertions, unused expressions, stale closures
- Scripts: lint, format, typecheck, check
2026-02-27 12:52:04 +00:00
|
|
|
},
|
|
|
|
|
"overrides": [
|
|
|
|
|
{
|
2026-03-15 10:15:31 +00:00
|
|
|
"files": [
|
|
|
|
|
"**/*.test.ts",
|
|
|
|
|
"**/*.test.tsx"
|
|
|
|
|
],
|
Add oxlint, oxfmt, typescript-go
- oxlint with react, react-hooks, typescript, import, unicorn plugins
- oxfmt (no trailing commas, single quotes, sorted imports)
- tsgo (typescript-go native preview) for fast typechecking
- Fix all lint warnings: non-null assertions, unused expressions, stale closures
- Scripts: lint, format, typecheck, check
2026-02-27 12:52:04 +00:00
|
|
|
"rules": {
|
|
|
|
|
"typescript/no-explicit-any": "off",
|
2026-03-13 07:03:12 +00:00
|
|
|
"typescript/no-non-null-assertion": "off",
|
|
|
|
|
"open-pencil/no-silent-catch": "off"
|
Add oxlint, oxfmt, typescript-go
- oxlint with react, react-hooks, typescript, import, unicorn plugins
- oxfmt (no trailing commas, single quotes, sorted imports)
- tsgo (typescript-go native preview) for fast typechecking
- Fix all lint warnings: non-null assertions, unused expressions, stale closures
- Scripts: lint, format, typecheck, check
2026-02-27 12:52:04 +00:00
|
|
|
}
|
Fix all lint, typecheck, and formatting issues
- 0 lint warnings (was 66), 0 type errors (was 30+)
- Add typed interfaces for Paint.stops/transform, Effect.blendMode,
NodeChange.strokeCap/strokeJoin/dashPattern in kiwi codec
- Add CompiledSchema.encodePaint/encodeNodeChange methods
- Remove all no-explicit-any: use Window declaration merging for
queryLocalFonts, showOpenFilePicker, showSaveFilePicker
- Remove all non-null assertions: add guards, use ?. operator,
?? fallbacks throughout
- Add SceneGraph.copyProp typed helper for instance sync
- Suppress kiwi-schema lint warnings via oxlint override
- Remove unused imports, variables, parameters
- Use proper CanvasKit StrokeCap/StrokeJoin enums in renderer
- Run oxfmt with import sorting
2026-02-28 19:57:33 +00:00
|
|
|
},
|
2026-03-12 10:07:43 +00:00
|
|
|
{
|
2026-03-15 10:15:31 +00:00
|
|
|
"files": [
|
|
|
|
|
"**/tools/ai-adapter.ts"
|
|
|
|
|
],
|
2026-03-12 10:07:43 +00:00
|
|
|
"rules": {
|
|
|
|
|
"typescript/no-explicit-any": "off"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
2026-03-15 10:15:31 +00:00
|
|
|
"files": [
|
|
|
|
|
"**/render/render-jsx.ts"
|
|
|
|
|
],
|
2026-03-12 10:07:43 +00:00
|
|
|
"rules": {
|
|
|
|
|
"typescript/no-implied-eval": "off"
|
|
|
|
|
}
|
|
|
|
|
},
|
Fix all lint, typecheck, and formatting issues
- 0 lint warnings (was 66), 0 type errors (was 30+)
- Add typed interfaces for Paint.stops/transform, Effect.blendMode,
NodeChange.strokeCap/strokeJoin/dashPattern in kiwi codec
- Add CompiledSchema.encodePaint/encodeNodeChange methods
- Remove all no-explicit-any: use Window declaration merging for
queryLocalFonts, showOpenFilePicker, showSaveFilePicker
- Remove all non-null assertions: add guards, use ?. operator,
?? fallbacks throughout
- Add SceneGraph.copyProp typed helper for instance sync
- Suppress kiwi-schema lint warnings via oxlint override
- Remove unused imports, variables, parameters
- Use proper CanvasKit StrokeCap/StrokeJoin enums in renderer
- Run oxfmt with import sorting
2026-02-28 19:57:33 +00:00
|
|
|
{
|
2026-03-15 10:15:31 +00:00
|
|
|
"files": [
|
|
|
|
|
"**/kiwi/kiwi-schema/**"
|
|
|
|
|
],
|
Fix all lint, typecheck, and formatting issues
- 0 lint warnings (was 66), 0 type errors (was 30+)
- Add typed interfaces for Paint.stops/transform, Effect.blendMode,
NodeChange.strokeCap/strokeJoin/dashPattern in kiwi codec
- Add CompiledSchema.encodePaint/encodeNodeChange methods
- Remove all no-explicit-any: use Window declaration merging for
queryLocalFonts, showOpenFilePicker, showSaveFilePicker
- Remove all non-null assertions: add guards, use ?. operator,
?? fallbacks throughout
- Add SceneGraph.copyProp typed helper for instance sync
- Suppress kiwi-schema lint warnings via oxlint override
- Remove unused imports, variables, parameters
- Use proper CanvasKit StrokeCap/StrokeJoin enums in renderer
- Run oxfmt with import sorting
2026-02-28 19:57:33 +00:00
|
|
|
"rules": {
|
|
|
|
|
"typescript/no-explicit-any": "off",
|
2026-03-09 10:18:08 +00:00
|
|
|
"typescript/no-non-null-assertion": "off",
|
2026-03-12 10:07:43 +00:00
|
|
|
"typescript/no-implied-eval": "off",
|
2026-03-09 10:18:08 +00:00
|
|
|
"typescript/prefer-for-of": "off",
|
|
|
|
|
"typescript/prefer-optional-chain": "off",
|
|
|
|
|
"typescript/consistent-type-imports": "off",
|
|
|
|
|
"typescript/no-unnecessary-condition": "off",
|
|
|
|
|
"import/no-mutable-exports": "off",
|
|
|
|
|
"complexity": "off"
|
Fix all lint, typecheck, and formatting issues
- 0 lint warnings (was 66), 0 type errors (was 30+)
- Add typed interfaces for Paint.stops/transform, Effect.blendMode,
NodeChange.strokeCap/strokeJoin/dashPattern in kiwi codec
- Add CompiledSchema.encodePaint/encodeNodeChange methods
- Remove all no-explicit-any: use Window declaration merging for
queryLocalFonts, showOpenFilePicker, showSaveFilePicker
- Remove all non-null assertions: add guards, use ?. operator,
?? fallbacks throughout
- Add SceneGraph.copyProp typed helper for instance sync
- Suppress kiwi-schema lint warnings via oxlint override
- Remove unused imports, variables, parameters
- Use proper CanvasKit StrokeCap/StrokeJoin enums in renderer
- Run oxfmt with import sorting
2026-02-28 19:57:33 +00:00
|
|
|
}
|
2026-03-09 07:11:11 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"files": [
|
|
|
|
|
"src/stores/editor.ts",
|
|
|
|
|
"src/composables/use-canvas-input.ts",
|
|
|
|
|
"src/demo.ts"
|
|
|
|
|
],
|
|
|
|
|
"rules": {
|
|
|
|
|
"max-lines": "off"
|
|
|
|
|
}
|
Lint CLI code: no-raw-console-format rule, fix all violations
Add no-raw-console-format lint rule for CLI commands — bans template
literals and string concatenation in console.log, forcing use of
agentfmt helpers (bold, dim, kv, entity, fmtTree, fmtList, etc.).
Extend lint target to include packages/cli/src/.
Fix all 22 lint errors in CLI code:
- Replace string concatenation with agentfmt (clusters, typography, variables)
- Mark optional CLI args as required: false (citty type accuracy)
- Remove unnecessary type assertions and optional chains
- Merge duplicate @open-pencil/core imports in headless.ts
- Extract exportViaApp/exportFromFile to reduce export.ts complexity
- Remove unused imports (formatType, printError)
- void runMain() for floating promise
2026-03-09 09:54:53 +00:00
|
|
|
},
|
|
|
|
|
{
|
2026-03-15 10:15:31 +00:00
|
|
|
"files": [
|
|
|
|
|
"packages/cli/src/commands/**"
|
|
|
|
|
],
|
Lint CLI code: no-raw-console-format rule, fix all violations
Add no-raw-console-format lint rule for CLI commands — bans template
literals and string concatenation in console.log, forcing use of
agentfmt helpers (bold, dim, kv, entity, fmtTree, fmtList, etc.).
Extend lint target to include packages/cli/src/.
Fix all 22 lint errors in CLI code:
- Replace string concatenation with agentfmt (clusters, typography, variables)
- Mark optional CLI args as required: false (citty type accuracy)
- Remove unnecessary type assertions and optional chains
- Merge duplicate @open-pencil/core imports in headless.ts
- Extract exportViaApp/exportFromFile to reduce export.ts complexity
- Remove unused imports (formatType, printError)
- void runMain() for floating promise
2026-03-09 09:54:53 +00:00
|
|
|
"rules": {
|
|
|
|
|
"open-pencil/no-raw-console-format": "error"
|
|
|
|
|
}
|
Add oxlint, oxfmt, typescript-go
- oxlint with react, react-hooks, typescript, import, unicorn plugins
- oxfmt (no trailing commas, single quotes, sorted imports)
- tsgo (typescript-go native preview) for fast typechecking
- Fix all lint warnings: non-null assertions, unused expressions, stale closures
- Scripts: lint, format, typecheck, check
2026-02-27 12:52:04 +00:00
|
|
|
}
|
|
|
|
|
],
|
2026-03-15 10:15:31 +00:00
|
|
|
"ignorePatterns": [
|
|
|
|
|
"node_modules",
|
|
|
|
|
"dist",
|
|
|
|
|
"desktop",
|
|
|
|
|
"*.config.*"
|
|
|
|
|
]
|
Add oxlint, oxfmt, typescript-go
- oxlint with react, react-hooks, typescript, import, unicorn plugins
- oxfmt (no trailing commas, single quotes, sorted imports)
- tsgo (typescript-go native preview) for fast typechecking
- Fix all lint warnings: non-null assertions, unused expressions, stale closures
- Scripts: lint, format, typecheck, check
2026-02-27 12:52:04 +00:00
|
|
|
}
|