Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 827aaf9

Browse files
armano2mysticatea
authored andcommitted
Fix: ensure that executeOnVueComponent is called after object instead of before. (fixes #173)(#175)
1 parent 1c827b3 commit 827aaf9

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

‎lib/utils/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ module.exports = {
457457
}
458458

459459
return {
460-
ObjectExpression (node) {
460+
'ObjectExpression:exit' (node) {
461461
if (!componentComments.some(el => el.loc.end.line === node.loc.start.line - 1) || isDuplicateNode(node)) return
462462
cb(node)
463463
},

‎tests/lib/rules/return-in-computed-property.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,25 @@ ruleTester.run('return-in-computed-property', rule, {
237237
message: 'Expected to return a value in "foo" computed property.',
238238
line: 4
239239
}]
240+
},
241+
{
242+
filename: 'test.js',
243+
code: `
244+
// @vue/component
245+
export default {
246+
computed: {
247+
my_FALSE_test() {
248+
let aa = 2;
249+
this.my_id = aa;
250+
}
251+
}
252+
}
253+
`,
254+
parserOptions,
255+
errors: [{
256+
message: 'Expected to return a value in "my_FALSE_test" computed property.',
257+
line: 5
258+
}]
240259
}
241260
]
242261
})

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /