Repository: ota-meshi/eslint-plugin-regexp (ts)

Issue:
`no-useless-lazy` doesn't handle negated lookarounds correctly
**Description**
I just noticed that `no-useless-lazy` didn't report `/\b\w+?\b/` even though the lazy modifier is useless because the quantifier is effectively possessive.

![image](https://user-images.githubusercontent.com/20878432/134643916-03e50bc5-8783-403f-a562-30e44f8784dc.png)


```js
/* ✗ BAD */
var foo = /f\w+?(?=\W)/; // correct
var foo = /f\w+?\b/;     // false negative
var foo = /f\w+?(?!\w)/; // false negative
var foo = /f\w+?$/;      // false negative
```

Pull request description:
Fix `no-useless-lazy` false negative
This fixes #334.

![image](https://user-images.githubusercontent.com/20878432/134643976-128ce079-69bf-4b93-8109-1baefa8a0041.png)


Patch:
diff --git a/lib/rules/no-useless-lazy.ts b/lib/rules/no-useless-lazy.ts
index 1987a67..ed2f26d 100644
--- a/lib/rules/no-useless-lazy.ts
+++ b/lib/rules/no-useless-lazy.ts
@@ -102,10 +102,7 @@ export default createRule("no-useless-lazy", {
                             matchingDir,
                             flags,
                         )
-                        if (
-                            !after.edge &&
-                            firstChar.char.isDisjointWith(after.char)
-                        ) {
+                        if (firstChar.char.isDisjointWith(after.char)) {
                             context.report({
                                 node,
                                 loc: getLazyLoc(regexpContext, qNode),


Test patch:
diff --git a/tests/lib/rules/no-useless-lazy.ts b/tests/lib/rules/no-useless-lazy.ts
index 58e35c6..3fbf3ec 100644
--- a/tests/lib/rules/no-useless-lazy.ts
+++ b/tests/lib/rules/no-useless-lazy.ts
@@ -82,5 +82,26 @@ tester.run("no-useless-lazy", rule as any, {
             output: `/(?:a|cd)+(?:b+|zzz)/`,
             errors: [{ messageId: "possessive" }],
         },
+
+        {
+            code: String.raw`/\b\w+?(?=\W)/`,
+            output: String.raw`/\b\w+(?=\W)/`,
+            errors: [{ messageId: "possessive" }],
+        },
+        {
+            code: String.raw`/\b\w+?(?!\w)/`,
+            output: String.raw`/\b\w+(?!\w)/`,
+            errors: [{ messageId: "possessive" }],
+        },
+        {
+            code: String.raw`/\b\w+?\b/`,
+            output: String.raw`/\b\w+\b/`,
+            errors: [{ messageId: "possessive" }],
+        },
+        {
+            code: String.raw`/\b\w+?$/`,
+            output: String.raw`/\b\w+$/`,
+            errors: [{ messageId: "possessive" }],
+        },
     ],
 })