From 97391efea86f5bd6d74e8e38bdaf637317484a42 Mon Sep 17 00:00:00 2001 From: Chris Manson Date: Thu, 3 Oct 2024 13:01:39 +0100 Subject: [PATCH] add a test to cover the case of an empty eslint-disable --- test/list.mjs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/list.mjs b/test/list.mjs index d6cd37e..abcff2b 100644 --- a/test/list.mjs +++ b/test/list.mjs @@ -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({}); + }); });