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-08 20:08:27 +00:00
|
|
|
"plugins": ["typescript", "import", "unicorn", "vue"],
|
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",
|
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
|
|
|
"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"]
|
|
|
|
|
}]
|
|
|
|
|
}],
|
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-09 06:16:07 +00:00
|
|
|
"no-empty-function": "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
|
|
|
"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",
|
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",
|
|
|
|
|
"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",
|
|
|
|
|
"vue/define-emits-declaration": "error",
|
|
|
|
|
"vue/define-props-destructuring": "error",
|
|
|
|
|
"vue/require-typed-ref": "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": [
|
|
|
|
|
{
|
|
|
|
|
"files": ["**/*.test.ts", "**/*.test.tsx"],
|
|
|
|
|
"rules": {
|
|
|
|
|
"typescript/no-explicit-any": "off",
|
|
|
|
|
"typescript/no-non-null-assertion": "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
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"files": ["**/kiwi/kiwi-schema/**"],
|
|
|
|
|
"rules": {
|
|
|
|
|
"typescript/no-explicit-any": "off",
|
|
|
|
|
"typescript/no-non-null-assertion": "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
|
|
|
}
|
|
|
|
|
],
|
2026-02-28 05:10:09 +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
|
|
|
}
|