Skip to content

Commit 788e94d

Browse files
committed
bump parser and fix
1 parent f293e23 commit 788e94d

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

packages/eslint-plugin-svelte/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"postcss-load-config": "^3.1.4",
6666
"postcss-safe-parser": "^7.0.0",
6767
"semver": "^7.6.3",
68-
"svelte-eslint-parser": "^1.0.0-next.12"
68+
"svelte-eslint-parser": "^1.0.0-next.13"
6969
},
7070
"devDependencies": {
7171
"@babel/core": "^7.26.0",

packages/eslint-plugin-svelte/src/rules/require-store-reactive-access.ts

+12-4
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,18 @@ export default createRule('require-store-reactive-access', {
7676
if (node.key.name.name !== 'this' && canAcceptStoreAttributeElement(node.parent.parent)) {
7777
return;
7878
}
79-
// Check for <input bind:value={store} />
80-
verifyExpression(node.expression, {
81-
disableFix: node.shorthand
82-
});
79+
if (node.expression?.type === 'SvelteFunctionBindingsExpression') {
80+
for (const expr of node.expression.expressions) {
81+
verifyExpression(expr, {
82+
disableFix: node.shorthand
83+
});
84+
}
85+
} else {
86+
// Check for <input bind:value={store} />
87+
verifyExpression(node.expression, {
88+
disableFix: node.shorthand
89+
});
90+
}
8391
} else if (node.kind === 'Class') {
8492
// Check for <div class:foo={store} />
8593
verifyExpression(node.expression, {

0 commit comments

Comments
 (0)