Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

Fix using "group" option without a "testGenerator" #220

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.exports = {

return ESLint.create(tree, {
testGenerator: this.options.testGenerator || this._testGenerator,
group: (this.options.group !== false) ? type : undefined,
group: (this.options.testGenerator && this.options.group !== false) ? type : undefined,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this does not work if the test generator is detected automatically by this._testGenerator.

I guess the logic should be:

use group: type if:

and otherwise set the group option to undefined

extensions: this.options.extensions,

options: {
Expand Down