Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
e974f88
refactor: migrate withDefaults to reactive destructured props
DrJKL Feb 7, 2026
cd70d7a
feat: add vue/define-props-destructuring lint rule as warning
DrJKL Feb 7, 2026
0bff3fe
feat: migrate all defineProps to reactive destructured pattern
DrJKL Feb 7, 2026
aaf33ce
chore: enable oxlint rule vitest/consistent-vitest-vi
DrJKL Feb 7, 2026
74dbad2
chore: enable oxlint rule vitest/prefer-describe-function-title
DrJKL Feb 7, 2026
832b34c
chore: enable oxlint rule unicorn/throw-new-error
DrJKL Feb 7, 2026
826f4b1
chore: enable oxlint rule unicorn/prefer-string-trim-start-end
DrJKL Feb 7, 2026
d012682
chore: enable oxlint rule unicorn/prefer-optional-catch-binding
DrJKL Feb 7, 2026
febc195
chore: enable oxlint rule unicorn/catch-error-name
DrJKL Feb 7, 2026
bb6ad22
chore: enable oxlint rule unicorn/no-instanceof-array
DrJKL Feb 7, 2026
4e9dc97
chore: enable oxlint rule unicorn/prefer-array-flat-map
DrJKL Feb 7, 2026
2d20de7
chore: enable oxlint rule unicorn/no-length-as-slice-end
DrJKL Feb 7, 2026
6a420f2
chore: enable oxlint rule unicorn/prefer-regexp-test
DrJKL Feb 7, 2026
7821b69
chore: enable oxlint rule unicorn/prefer-string-replace-all
DrJKL Feb 7, 2026
a516c1c
chore: enable oxlint rule unicorn/prefer-string-slice
DrJKL Feb 7, 2026
e981c38
chore: enable oxlint rule unicorn/prefer-type-error
DrJKL Feb 7, 2026
8fe2ed3
chore: enable oxlint rule unicorn/prefer-prototype-methods
DrJKL Feb 7, 2026
a98d01b
chore: enable oxlint rule unicorn/prefer-math-min-max
DrJKL Feb 7, 2026
4c5e213
chore: enable oxlint rule unicorn/no-useless-undefined
DrJKL Feb 7, 2026
af48fae
chore: enable oxlint rule unicorn/prefer-query-selector
DrJKL Feb 7, 2026
27a5701
chore: enable oxlint rule unicorn/prefer-spread
DrJKL Feb 7, 2026
933fc35
chore: enable oxlint rule unicorn/prefer-classlist-toggle
DrJKL Feb 7, 2026
25a25ef
chore: enable oxlint rule typescript/prefer-ts-expect-error
DrJKL Feb 7, 2026
9f525bb
chore: enable oxlint rule unicorn/no-negation-in-equality-check
DrJKL Feb 7, 2026
8c38d8a
chore: enable oxlint rule eslint/eqeqeq
DrJKL Feb 7, 2026
e6ec331
chore: enable oxlint rule eslint/no-useless-constructor
DrJKL Feb 7, 2026
0d27434
chore: enable oxlint rule eslint/no-var
DrJKL Feb 7, 2026
8d53bbf
chore: enable oxlint rule eslint/prefer-const
DrJKL Feb 7, 2026
53fa5c2
chore: enable oxlint rule eslint/prefer-object-spread
DrJKL Feb 7, 2026
19bcbce
chore: enable oxlint rule eslint/prefer-object-has-own
DrJKL Feb 7, 2026
7741a9b
chore: enable oxlint rule eslint/yoda
DrJKL Feb 7, 2026
37f8b73
chore: enable oxlint rule eslint/operator-assignment
DrJKL Feb 7, 2026
2269275
chore: enable oxlint rule eslint/no-unneeded-ternary
DrJKL Feb 7, 2026
0b1c221
chore: enable oxlint rule vitest/hoisted-apis-on-top
DrJKL Feb 7, 2026
ac5c84b
chore: enable oxlint rule vitest/no-conditional-tests
DrJKL Feb 7, 2026
4fc40e0
chore: enable oxlint rule unicorn/error-message
DrJKL Feb 7, 2026
aa7e59d
chore: enable oxlint rule unicorn/no-abusive-eslint-disable
DrJKL Feb 7, 2026
cd3b1c5
chore: enable oxlint rule unicorn/no-this-assignment
DrJKL Feb 7, 2026
82b8346
chore: enable oxlint rule unicorn/no-useless-switch-case
DrJKL Feb 7, 2026
deb9603
chore: enable oxlint rule unicorn/no-useless-collection-argument
DrJKL Feb 7, 2026
a3cef10
chore: enable oxlint rule eslint/no-useless-call
DrJKL Feb 7, 2026
5540d22
chore: enable oxlint rule eslint/no-throw-literal
DrJKL Feb 7, 2026
82b4be3
chore: enable oxlint rule eslint/no-useless-concat
DrJKL Feb 7, 2026
cc0bdf2
chore: enable oxlint rule eslint/preserve-caught-error
DrJKL Feb 7, 2026
b56a028
chore: enable oxlint rule eslint/no-new-func
DrJKL Feb 7, 2026
e60a475
chore: enable oxlint rule eslint/no-return-assign
DrJKL Feb 7, 2026
99bc407
chore: enable oxlint rule eslint/prefer-rest-params
DrJKL Feb 7, 2026
7c18a5a
chore: enable oxlint rule eslint/prefer-spread
DrJKL Feb 7, 2026
5f3fd7f
chore: enable oxlint rule vitest/consistent-each-for
DrJKL Feb 7, 2026
a4df681
chore: enable oxlint rule vitest/consistent-test-filename
DrJKL Feb 7, 2026
94523de
chore: enable oxlint rule vitest/warn-todo
DrJKL Feb 7, 2026
6210814
chore: enable oxlint rule unicorn/no-typeof-undefined
DrJKL Feb 7, 2026
c03cd17
chore: enable oxlint rule unicorn/no-lonely-if
DrJKL Feb 7, 2026
f998fc0
chore: enable oxlint rule unicorn/no-immediate-mutation
DrJKL Feb 7, 2026
4aa40a5
chore: enable oxlint rule unicorn/prefer-add-event-listener
DrJKL Feb 7, 2026
eb883c5
chore: enable oxlint rule unicorn/prefer-array-find
DrJKL Feb 7, 2026
00aa420
chore: enable oxlint rule eslint/no-else-return
DrJKL Feb 7, 2026
f7b5006
chore: enable oxlint rule import/first
DrJKL Feb 7, 2026
ee1d61b
chore: enable oxlint rule prefer-template
DrJKL Feb 7, 2026
8160632
chore: enable oxlint rule promise/no-nesting
DrJKL Feb 7, 2026
d02dfca
chore: enable oxlint rule promise/prefer-catch
DrJKL Feb 7, 2026
fd78ec3
chore: enable oxlint rule promise/param-names
DrJKL Feb 7, 2026
ea0e6b9
chore: enable oxlint rule typescript/prefer-nullish-coalescing
DrJKL Feb 7, 2026
620ad24
chore: enable oxlint rule typescript/prefer-optional-chain
DrJKL Feb 7, 2026
e0090a5
chore: enable oxlint rule unicorn/consistent-function-scoping
DrJKL Feb 7, 2026
924db2b
chore: enable oxlint rule unicorn/no-array-for-each
DrJKL Feb 7, 2026
31a1e14
chore: enable oxlint rule unicorn/prefer-set-has
DrJKL Feb 7, 2026
f13a88a
chore: enable oxlint rule eslint/func-style
DrJKL Feb 7, 2026
20b1600
chore: enable oxlint rule eslint/no-param-reassign
DrJKL Feb 7, 2026
a2fdb2f
chore: enable oxlint rule eslint/prefer-destructuring
DrJKL Feb 7, 2026
0aec287
chore: enable oxlint rule promise/prefer-await-to-then
DrJKL Feb 7, 2026
05c5d08
chore: enable oxlint rule promise/prefer-await-to-callbacks
DrJKL Feb 7, 2026
06b96b1
chore: promote 0-violation guardrail rules from warn to error
DrJKL Feb 7, 2026
d9e9d68
chore: disable high-violation rules pending incremental cleanup
DrJKL Feb 7, 2026
8376db4
fix: use oxlint-disable-next-line instead of eslint-disable-next-line
DrJKL Feb 7, 2026
0edd5b1
Merge issues
DrJKL Feb 7, 2026
f2d5c41
Merge branch 'main' into drjkl/I-have-a-ruler-and-I-know-how-to-use-it
DrJKL Feb 8, 2026
e00e284
fix: exclude JSONC files from strict JSON validation
DrJKL Feb 8, 2026
da43303
Fix merge issue.
DrJKL Feb 8, 2026
58d82b7
fix: use Vue useId() instead of Math.random() for NodeSearchBox inputId
DrJKL Feb 8, 2026
6db9411
fix: misc cleanups and small fixes
DrJKL Feb 8, 2026
6465c48
fix: forward class prop via cn() in Select and SelectValue wrappers
DrJKL Feb 8, 2026
ae8940c
fix: use defineAsyncComponent for Preview3d, clean up RAF state in mi…
DrJKL Feb 8, 2026
6ae2bc0
fix: handle floating promise in DropZone onDragDrop call
DrJKL Feb 8, 2026
8ff385f
feat: wrap async Preview3d component in Suspense boundary
DrJKL Feb 8, 2026
25cc481
Merge branch 'main' into drjkl/I-have-a-ruler-and-I-know-how-to-use-it
DrJKL Feb 8, 2026
7ad9173
Merge branch 'main' into drjkl/I-have-a-ruler-and-I-know-how-to-use-it
DrJKL Feb 8, 2026
c4c6507
Merge remote-tracking branch 'origin/main' into drjkl/I-have-a-ruler-…
DrJKL Feb 9, 2026
2ed5618
fix: move import above vi.mock() calls to satisfy import/first rule
DrJKL Feb 9, 2026
a13d28c
Merge branch 'main' into drjkl/I-have-a-ruler-and-I-know-how-to-use-it
DrJKL Feb 10, 2026
6a1dcf8
Merge branch 'main' into drjkl/I-have-a-ruler-and-I-know-how-to-use-it
DrJKL Feb 10, 2026
21445f1
deps: Update oxfmt and oxlint
DrJKL Feb 10, 2026
18f3877
fix: resolve new oxlint violations after upgrade
DrJKL Feb 10, 2026
53013d0
fix: use component __name for describe() labels in Vue component tests
DrJKL Feb 11, 2026
cdd8105
Merge branch 'main' into drjkl/I-have-a-ruler-and-I-know-how-to-use-it
DrJKL Feb 11, 2026
0a5af96
fix: replace props.* references with destructured prop variables
DrJKL Feb 11, 2026
b92fa9e
Merge remote-tracking branch 'origin/main' into drjkl/I-have-a-ruler-…
DrJKL Feb 11, 2026
2fc88ab
Merge remote-tracking branch 'origin/main' into drjkl/I-have-a-ruler-…
DrJKL Feb 11, 2026
1c48d41
fix: resolve lint errors and document describe naming convention
DrJKL Feb 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
132 changes: 131 additions & 1 deletion .oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,50 @@
"eslint",
"import",
"oxc",
"promise",
"typescript",
"unicorn",
"vitest",
"vue"
],
"rules": {
"no-async-promise-executor": "off",
"no-else-return": [
"error",
{
"allowElseIf": false
}
],
"no-console": [
"error",
{
"allow": ["warn", "error"]
}
],
"no-control-regex": "off",
"eqeqeq": [
"error",
"always",
{
"null": "ignore"
}
],
"func-style": [
"error",
"declaration",
{
"allowArrowFunctions": true
}
],
"no-eval": "off",
"no-new-func": "error",
// TODO: Enable and fix 104 violations
"no-param-reassign": "off",
"no-redeclare": "error",
"no-return-assign": ["error", "always"],
"no-throw-literal": "error",
"no-useless-constructor": "error",
"no-var": "error",
"no-restricted-imports": [
"error",
{
Expand Down Expand Up @@ -64,15 +92,66 @@
]
}
],
"no-unneeded-ternary": [
"error",
{
"defaultAssignment": false
}
],
"no-useless-call": "error",
"no-useless-concat": "error",
"prefer-const": "error",
// TODO: Enable and fix 581 violations
"prefer-destructuring": "off",
"prefer-object-has-own": "error",
"prefer-object-spread": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "error",
"promise/no-nesting": "error",
"promise/param-names": "error",
// TODO: Enable and fix 76 violations
"promise/prefer-await-to-callbacks": "off",
// TODO: Enable and fix 91 violations
"promise/prefer-await-to-then": "off",
"promise/prefer-catch": "error",
"preserve-caught-error": "error",
"yoda": [
"error",
"never",
{
"exceptRange": true
}
],
"no-self-assign": "allow",
"no-unused-expressions": "off",
"no-unused-private-class-members": "off",
"no-useless-rename": "off",
"operator-assignment": ["error", "always"],
"import/default": "error",
"import/export": "error",
"import/first": ["error", "absolute-first"],
"import/namespace": "error",
"import/no-duplicates": "error",
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
"vitest/consistent-each-for": [
"error",
{
"test": "for",
"describe": "for"
}
],
"vitest/consistent-test-filename": [
"error",
{
"pattern": ".*\\.test\\.ts$"
}
],
"vitest/consistent-vitest-vi": "error",
"vitest/warn-todo": "warn",
"vitest/hoisted-apis-on-top": "error",
"vitest/no-conditional-tests": "error",
"vitest/prefer-describe-function-title": "error",
"jest/expect-expect": "off",
"jest/no-conditional-expect": "off",
"jest/no-disabled-tests": "off",
Expand All @@ -82,11 +161,55 @@
"typescript/no-unnecessary-parameter-property-assignment": "off",
"typescript/no-unsafe-declaration-merging": "off",
"typescript/no-unused-vars": "off",
"unicorn/catch-error-name": [
"error",
{
"ignore": ["^error\\w+$"]
}
],
// TODO: Enable and fix 147 violations
"unicorn/consistent-function-scoping": "off",
"unicorn/error-message": "error",
"unicorn/no-abusive-eslint-disable": "error",
// TODO: Enable and fix 165 violations
"unicorn/no-array-for-each": "off",
"unicorn/no-immediate-mutation": "error",
"unicorn/no-instanceof-array": "error",
"unicorn/no-length-as-slice-end": "error",
"unicorn/no-lonely-if": "error",
"unicorn/no-negation-in-equality-check": "error",
"unicorn/no-typeof-undefined": "error",
"unicorn/prefer-math-min-max": "error",
"unicorn/prefer-array-flat-map": "error",
"unicorn/no-empty-file": "off",
"unicorn/no-new-array": "off",
"unicorn/prefer-add-event-listener": "error",
"unicorn/prefer-array-find": "error",
"unicorn/no-useless-undefined": [
"error",
{
"checkArguments": false,
"checkArrowFunctionBody": false
}
],
"unicorn/prefer-classlist-toggle": "error",
"unicorn/no-single-promise-in-promise-methods": "off",
"unicorn/no-this-assignment": "error",
"unicorn/no-useless-collection-argument": "error",
"unicorn/no-useless-switch-case": "error",
"unicorn/no-useless-fallback-in-spread": "off",
"unicorn/no-useless-spread": "off",
"unicorn/prefer-optional-catch-binding": "error",
"unicorn/prefer-prototype-methods": "error",
"unicorn/prefer-query-selector": "error",
"unicorn/prefer-spread": "error",
"unicorn/prefer-regexp-test": "error",
"unicorn/prefer-set-has": "error",
"unicorn/prefer-string-replace-all": "error",
"unicorn/prefer-string-slice": "error",
"unicorn/prefer-string-trim-start-end": "error",
"unicorn/prefer-type-error": "error",
"unicorn/throw-new-error": "error",
"typescript/await-thenable": "off",
"typescript/no-base-to-string": "off",
"typescript/no-duplicate-type-constituents": "off",
Expand All @@ -96,6 +219,12 @@
"typescript/restrict-template-expressions": "off",
"typescript/unbound-method": "off",
"typescript/no-floating-promises": "error",
// TODO: Enable and fix 372 violations (use { "ignoreConditionalTests": true })
"typescript/prefer-nullish-coalescing": "off",
// TODO: Enable and fix violations
"typescript/prefer-optional-chain": "off",
"typescript/prefer-ts-expect-error": "error",
"vue/define-props-destructuring": "error",
"vue/no-import-compiler-macros": "error",
"vue/no-dupe-keys": "error"
},
Expand All @@ -114,7 +243,8 @@
"no-control-regex": "error",
"no-useless-rename": "error",
"no-unused-private-class-members": "error",
"unicorn/no-empty-file": "error"
"unicorn/no-empty-file": "error",
"vitest/consistent-test-filename": "off"
}
}
]
Expand Down
14 changes: 13 additions & 1 deletion docs/testing/component-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ This guide covers patterns and examples for testing Vue components in the ComfyU
6. [Asynchronous Component Testing](#asynchronous-component-testing)
7. [Working with Vue Reactivity](#working-with-vue-reactivity)

## Describe Block Naming

Use `Component.__name ?? 'ComponentName'` for the top-level `describe` title. This passes the function reference (satisfying the `prefer-describe-function-title` lint rule) while providing a readable fallback:

```typescript
import MyComponent from './MyComponent.vue'

describe(MyComponent.__name ?? 'MyComponent', () => {
// ...
})
```

## Basic Component Testing

Basic approach to testing a component's rendering and structure:
Expand All @@ -21,7 +33,7 @@ Basic approach to testing a component's rendering and structure:
import { mount } from '@vue/test-utils'
import SidebarIcon from './SidebarIcon.vue'

describe('SidebarIcon', () => {
describe(SidebarIcon.__name ?? 'SidebarIcon', () => {
const exampleProps = {
icon: 'pi pi-cog',
selected: false
Expand Down
4 changes: 4 additions & 0 deletions eslint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ export default defineConfig([
'import-x/no-useless-path-segments': 'error',
'import-x/no-relative-packages': 'error',
'unused-imports/no-unused-imports': 'error',
'vue/return-in-computed-property': [
'error',
{ treatUndefinedAsUnspecified: false }
],
'vue/no-v-html': 'off',
// Prohibit dark-theme: and dark: prefixes
'vue/no-restricted-class': ['error', '/^dark(-theme)?:/'],
Expand Down
Loading