Skip to content

Commit b7c0503

Browse files
Copilotmattcosta7
andcommitted
Fix linting issues - use longform method syntax for string literal keys
Co-authored-by: mattcosta7 <8616962+mattcosta7@users.noreply.github.com>
1 parent 01e688a commit b7c0503

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/rules/prefer-observers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default {
5858
},
5959

6060
// Check addEventListener calls
61-
['CallExpression[callee.property.name="addEventListener"]'](node) {
61+
['CallExpression[callee.property.name="addEventListener"]']: function (node) {
6262
const [name] = node.arguments
6363
if (name.type !== 'Literal') return
6464
if (!(name.value in observerMap)) return
@@ -76,7 +76,7 @@ export default {
7676
},
7777

7878
// Check ResizeObserver.observe() calls
79-
['CallExpression[callee.property.name="observe"]'](node) {
79+
['CallExpression[callee.property.name="observe"]']: function (node) {
8080
// Check if this is a ResizeObserver instance
8181
const callee = node.callee
8282
if (!callee.object) return

0 commit comments

Comments
 (0)