eslint-plugin-unicorn icon indicating copy to clipboard operation
eslint-plugin-unicorn copied to clipboard

Add `prefer-map-has` rule

Open axetroy opened this issue 1 year ago • 4 comments

Close #1329

axetroy avatar Jul 30 '24 06:07 axetroy

https://github.com/sindresorhus/eslint-plugin-unicorn/pull/2414#discussion_r1696783852 was not resolved.

sindresorhus avatar Jul 30 '24 21:07 sindresorhus

https://github.com/sindresorhus/eslint-plugin-unicorn/pull/2414/commits/4e05b9b2b97fd739743ef404d2f0454534a74564 ?

sindresorhus avatar Jul 31 '24 11:07 sindresorhus

This is not related to this pull request and should be done in a separate pull request: https://github.com/sindresorhus/eslint-plugin-unicorn/pull/2414/files#r1696698356

sindresorhus avatar Jul 31 '24 11:07 sindresorhus

4e05b9b ?

I did update but CI failed

  package › Every rule has a doc with the appropriate content

  test/package.mjs:134

   133:     if (!RULES_WITHOUT_PASS_FAIL_SECTIONS.has(ruleName)) {              
   134:       t.true(documentContents.includes('## Pass'), `${ruleName} include…
   135:       t.true(documentContents.includes('## Fail'), `${ruleName} include…

  prefer-map-has includes '## Pass' examples section

  Value is not `true`:

  false

  › file://test/package.mjs:134:10

axetroy avatar Aug 01 '24 01:08 axetroy

Close since it will bring unexpected false positives.

axetroy avatar Sep 01 '24 07:09 axetroy