Skip to content

Commit 19fc3df

Browse files
committed
[Fix] no-cycle: create must *always* return an object, even if there’s no listeners
1 parent ee15fa4 commit 19fc3df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rules/no-cycle.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module.exports = {
2222

2323
create: function (context) {
2424
const myPath = context.getFilename()
25-
if (myPath === '<text>') return // can't cycle-check a non-file
25+
if (myPath === '<text>') return {} // can't cycle-check a non-file
2626

2727
const options = context.options[0] || {}
2828
const maxDepth = options.maxDepth || Infinity

0 commit comments

Comments
 (0)