Skip to content

Commit

Permalink
chore: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Saul-Mirone committed Sep 3, 2024
1 parent cfd80f7 commit 4c0048f
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion e2e/src/lit/components/Hashes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class Hashes extends ShallowLitElement {
override render() {
const spec = this.widgetViewContext.value?.spec
const level = spec?.level ?? 0
const hashes = Array(level).fill('#').join('')
const hashes = new Array(level).fill('#').join('')
return html`<span class="hash">${hashes}</span>`
}
}
Expand Down
2 changes: 1 addition & 1 deletion e2e/src/react/components/Hashes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useWidgetViewContext } from '@prosemirror-adapter/react'
export function Hashes() {
const { spec } = useWidgetViewContext()
const level = spec?.level
const hashes = Array(level || 0).fill('#').join('')
const hashes = new Array(level || 0).fill('#').join('')

return <span style={{ color: 'blue', marginRight: 6 }}>{hashes}</span>
}
11 changes: 6 additions & 5 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,25 @@ export default antfu(
{
stylistic: true,
markdown: false,
typescript: {
tsconfigPath: 'tsconfig.json',
},
ignores: [
'.idea',
'**/lib',
'**/.svelte-kit',
'CHANGELOG.md',
'vite.config.ts',
'**/shim.d.ts',
],
overrides: {
typescript: {
typescript: {
overrides: {
'ts/no-unsafe-assignment': 'off',
'ts/no-unsafe-member-access': 'off',
'ts/no-unsafe-argument': 'off',
'ts/no-unsafe-call': 'off',
'ts/no-unsafe-return': 'off',
'ts/unbound-method': 'off',
'ts/ban-types': 'off',
'ts/strict-boolean-expressions': 'off',
'unicorn/no-new-array': 'off',
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion examples/lit/src/components/Hashes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class Hashes extends ShallowLitElement {
override render() {
const spec = this.widgetViewContext.value?.spec
const level = spec?.level ?? 0
const hashes = Array(level).fill('#').join('')
const hashes = new Array(level).fill('#').join('')
return html`<span class="hash">${hashes}</span>`
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/react/components/Hashes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useWidgetViewContext } from '@prosemirror-adapter/react'
export function Hashes() {
const { spec } = useWidgetViewContext()
const level = spec?.level
const hashes = Array(level || 0).fill('#').join('')
const hashes = new Array(level || 0).fill('#').join('')

return <span style={{ color: 'blue', marginRight: 6 }}>{hashes}</span>
}
3 changes: 2 additions & 1 deletion packages/lit/src/nodeView/LitNodeView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ export class LitNodeView extends CoreNodeView<LitNodeViewComponent> implements L
&& element instanceof HTMLElement
&& this.contentDOM
&& element.firstChild !== this.contentDOM
)
) {
element.appendChild(this.contentDOM)
}
},
view: this.view,
getPos: this.getPos,
Expand Down
3 changes: 2 additions & 1 deletion packages/svelte/src/nodeView/SvelteNodeView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ export class SvelteNodeView extends CoreNodeView<SvelteNodeViewComponent> implem
&& element instanceof HTMLElement
&& this.contentDOM
&& element.firstChild !== this.contentDOM
)
) {
element.appendChild(this.contentDOM)
}
},
view: this.view,
getPos: this.getPos,
Expand Down
3 changes: 2 additions & 1 deletion packages/vue/src/nodeView/VueNodeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ export class VueNodeView extends CoreNodeView<VueNodeViewComponent> implements V
&& element instanceof HTMLElement
&& this.contentDOM
&& element.firstChild !== this.contentDOM
)
) {
element.appendChild(this.contentDOM)
}
},
view: this.view,
getPos: this.getPos,
Expand Down

0 comments on commit 4c0048f

Please sign in to comment.