Skip to content

Commit

Permalink
add a test to cover the case of an empty eslint-disable
Browse files Browse the repository at this point in the history
  • Loading branch information
mansona committed Oct 3, 2024
1 parent 4fd6001 commit 97391ef
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/list.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,17 @@ let b = () => {};
'no-unused-vars': ['index.js'],
});
});

it('should not report rule-less eslint-disable', async function () {
const result = await listFiles({
'index.js': `
/* eslint-disable */
let unused = 'face';
let b = () => {};
`,
});

expect(result).to.deep.equal({});
});
});

0 comments on commit 97391ef

Please sign in to comment.