dillon1000/react

Commit

Fixtures from ESLint rule

Incorporates the fixtures from eslint-plugin-react-hooks using a script, so that 
we can easily update them in the future. For each fixture we run the compiler 
with and without hooks validation first so that we know if the fixture is 
expected to pass — we have some false positives and false negatives that i can 
work through. For example we accidentally think that `userFetch()` is a hook, 
oops. Fixtures that should pass but error, or that should error but pass, are 
marked as `todo.<name>` or `todo.error.<name>`. 

While i was here i added the ability to have fixtures in subdirectories for 
grouping purposes.
Browse files
Changed paths66 files
First-parent comparison
M compiler/forget/scripts/build-react-hooks-fixures.js ModifiedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.rules-of-hooks-1dd104f3e579.expect.md →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.invalid-rules-of-hooks-1b9527f967f3.expect.md RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.rules-of-hooks-1dd104f3e579.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.invalid-rules-of-hooks-1b9527f967f3.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.rules-of-hooks-70d37bc6dabc.expect.md →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.invalid-rules-of-hooks-2aabd222fc6a.expect.md RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.rules-of-hooks-70d37bc6dabc.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.invalid-rules-of-hooks-2aabd222fc6a.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.rules-of-hooks-3d95dc7a5f98.expect.md →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.invalid-rules-of-hooks-49d341e5d68f.expect.md RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.rules-of-hooks-3d95dc7a5f98.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.invalid-rules-of-hooks-49d341e5d68f.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.rules-of-hooks-bfa72d1b8135.expect.md →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.invalid-rules-of-hooks-79128a755612.expect.md RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.rules-of-hooks-bfa72d1b8135.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.invalid-rules-of-hooks-79128a755612.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.rules-of-hooks-ec94ef9d80df.expect.md →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.invalid-rules-of-hooks-9718e30b856c.expect.md RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.rules-of-hooks-92708a08b920.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.invalid-rules-of-hooks-9718e30b856c.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.rules-of-hooks-99ca80f8b0b6.expect.md →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.invalid-rules-of-hooks-9bf17c174134.expect.md RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.rules-of-hooks-99ca80f8b0b6.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.invalid-rules-of-hooks-9bf17c174134.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.rules-of-hooks-62bded832974.expect.md →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.invalid-rules-of-hooks-b4dcda3d60ed.expect.md RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.rules-of-hooks-62bded832974.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.invalid-rules-of-hooks-b4dcda3d60ed.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.rules-of-hooks-fc7007852fe0.expect.md →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.invalid-rules-of-hooks-c906cace44e9.expect.md RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.rules-of-hooks-fc7007852fe0.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.invalid-rules-of-hooks-c906cace44e9.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.rules-of-hooks-baf61a179e4c.expect.md →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.invalid-rules-of-hooks-d740d54e9c21.expect.md RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.rules-of-hooks-baf61a179e4c.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.invalid-rules-of-hooks-d740d54e9c21.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.rules-of-hooks-2e9963324591.expect.md →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.invalid-rules-of-hooks-d85c144bdf40.expect.md RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.rules-of-hooks-2e9963324591.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.invalid-rules-of-hooks-d85c144bdf40.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.rules-of-hooks-e70a6f5d6d4b.expect.md →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.invalid-rules-of-hooks-ea7c2fb545a9.expect.md RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.rules-of-hooks-e70a6f5d6d4b.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.invalid-rules-of-hooks-ea7c2fb545a9.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.rules-of-hooks-92708a08b920.expect.md →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.invalid-rules-of-hooks-f3d6c5e9c83d.expect.md RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.rules-of-hooks-ec94ef9d80df.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.invalid-rules-of-hooks-f3d6c5e9c83d.js RenamedA compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.invalid-rules-of-hooks-f69800950ff0.expect.md AddedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.rules-of-hooks-dba5889e4ba6.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/error.invalid-rules-of-hooks-f69800950ff0.js RenamedA compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/rules-of-hooks-c5d1f3143c4c.expect.md AddedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.rules-of-hooks-f7b5986699ca.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/rules-of-hooks-c5d1f3143c4c.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.rules-of-hooks-279ac76f53af.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.bail.rules-of-hooks-279ac76f53af.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.rules-of-hooks-27c18dc8dad2.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.bail.rules-of-hooks-27c18dc8dad2.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.rules-of-hooks-28a78701970c.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.bail.rules-of-hooks-28a78701970c.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.rules-of-hooks-3d692676194b.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.bail.rules-of-hooks-3d692676194b.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.rules-of-hooks-6949b255e7eb.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.bail.rules-of-hooks-6949b255e7eb.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.rules-of-hooks-69521d94fa03.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.bail.rules-of-hooks-69521d94fa03.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.rules-of-hooks-8503ca76d6f8.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.bail.rules-of-hooks-8503ca76d6f8.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.rules-of-hooks-93dc5d5e538a.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.bail.rules-of-hooks-93dc5d5e538a.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.rules-of-hooks-d0935abedc42.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.bail.rules-of-hooks-d0935abedc42.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.rules-of-hooks-e0a5db3ae21e.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.bail.rules-of-hooks-e0a5db3ae21e.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.rules-of-hooks-e29c874aa913.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.bail.rules-of-hooks-e29c874aa913.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.rules-of-hooks-e9f9bac89f8f.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.bail.rules-of-hooks-e9f9bac89f8f.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.rules-of-hooks-fadd52c1e460.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.bail.rules-of-hooks-fadd52c1e460.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.rules-of-hooks-92503f581023.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.invalid-rules-of-hooks-0a1dbff27ba0.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.rules-of-hooks-b4af90990150.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.invalid-rules-of-hooks-0de1224ce64b.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.rules-of-hooks-880ce4a7e686.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.invalid-rules-of-hooks-191029ac48c8.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.rules-of-hooks-f486864c4bec.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.invalid-rules-of-hooks-206e2811c87c.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.rules-of-hooks-c277f25e7c03.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.invalid-rules-of-hooks-28a7111f56a7.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.rules-of-hooks-7451860cd46f.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.invalid-rules-of-hooks-2c51251df67a.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.rules-of-hooks-251e67613de1.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.invalid-rules-of-hooks-368024110a58.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.rules-of-hooks-310a4e022130.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.invalid-rules-of-hooks-449a37146a83.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.rules-of-hooks-429b3b1a8ee4.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.invalid-rules-of-hooks-5a7ac9a6e8fa.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.rules-of-hooks-1a1e29f21a79.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.invalid-rules-of-hooks-76a74b4666e9.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.rules-of-hooks-de96bb13ad47.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.invalid-rules-of-hooks-8303403b8e4c.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.rules-of-hooks-cdcb36730551.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.invalid-rules-of-hooks-8566f9a360e2.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.rules-of-hooks-42576e5c5613.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.invalid-rules-of-hooks-99b5c750d1d1.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.rules-of-hooks-be9bff592ca0.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.invalid-rules-of-hooks-9c79feec4b9b.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.rules-of-hooks-4d1a9ed4d44a.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.invalid-rules-of-hooks-a0058f0b446d.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.rules-of-hooks-0a42415d4990.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.invalid-rules-of-hooks-a63fd4f9dcc0.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.rules-of-hooks-c0069d062d50.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.invalid-rules-of-hooks-acb56658fe7e.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.rules-of-hooks-3d8726664cf7.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.invalid-rules-of-hooks-c59788ef5676.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.rules-of-hooks-60e23f3caf5b.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.invalid-rules-of-hooks-d842d36db450.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.rules-of-hooks-52cd6055b4fb.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.invalid-rules-of-hooks-d952b82c2597.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.rules-of-hooks-fbe12b5ccfce.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.invalid-rules-of-hooks-ddeca9708b63.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.rules-of-hooks-112dd48477e6.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.invalid-rules-of-hooks-e675f0a672d8.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.rules-of-hooks-e803203d651b.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.invalid-rules-of-hooks-e69ffce323c3.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.rules-of-hooks-7bcc5c5c0416.js →compiler/forget/src/__tests__/fixtures/compiler/rules-of-hooks/todo.error.invalid-rules-of-hooks-f6f37b63b2d4.js Renamed
Patch

Files changed

Rendering syntax-highlighted changes…