Skip to content

Commit ba37bbc

Browse files
committed
chore: fix lint
1 parent dc727e5 commit ba37bbc

File tree

2 files changed

+11
-3
lines changed
  • packages/svelte
    • src/compiler/phases
    • tests/runtime-runes/samples/custom-element-attributes

2 files changed

+11
-3
lines changed

packages/svelte/src/compiler/phases/nodes.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ export function is_element_node(node) {
2626
* @returns {boolean}
2727
*/
2828
export function is_custom_element_node(node) {
29-
return node.type === 'RegularElement' && (node.name.includes('-') || node.attributes.some((attr) => attr.type === 'Attribute' && attr.name === 'is'));
29+
return (
30+
node.type === 'RegularElement' &&
31+
(node.name.includes('-') ||
32+
node.attributes.some((attr) => attr.type === 'Attribute' && attr.name === 'is'))
33+
);
3034
}
3135

3236
/**

packages/svelte/tests/runtime-runes/samples/custom-element-attributes/_config.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ import { test } from '../../test';
33
export default test({
44
mode: ['client', 'server'],
55
async test({ assert, target }) {
6-
const my_element = /** @type HTMLElement & { object: { test: true }; } */ (target.querySelector('my-element'));
7-
const my_link = /** @type HTMLAnchorElement & { object: { test: true }; } */ (target.querySelector('a'));
6+
const my_element = /** @type HTMLElement & { object: { test: true }; } */ (
7+
target.querySelector('my-element')
8+
);
9+
const my_link = /** @type HTMLAnchorElement & { object: { test: true }; } */ (
10+
target.querySelector('a')
11+
);
812
assert.equal(my_element.getAttribute('string'), 'test');
913
assert.equal(my_element.hasAttribute('object'), false);
1014
assert.deepEqual(my_element.object, { test: true });

0 commit comments

Comments
 (0)