Skip to content

Commit ffd7c44

Browse files
committed
Fix docs script breaking on test files referencing jest.
1 parent 47567ec commit ffd7c44

File tree

9 files changed

+274
-125
lines changed

9 files changed

+274
-125
lines changed

docs/no-proxy-apis.md

Lines changed: 26 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -16,64 +16,27 @@ This rule is **off** by default.
1616

1717
### Invalid Examples
1818

19-
These snippets cause lint errors, and some can be auto-fixed.
19+
These snippets cause lint errors.
2020

2121
```js
22-
let el = <div className="greeting">Hello world!</div>;
23-
// after eslint --fix:
24-
let el = <div class="greeting">Hello world!</div>;
22+
let proxy = new Proxy(asdf, {});
2523

26-
let el = <div className={"greeting"}>Hello world!</div>;
27-
// after eslint --fix:
28-
let el = <div class={"greeting"}>Hello world!</div>;
24+
let proxy = Proxy.revocable(asdf, {});
2925

30-
let el = <div className="greeting" />;
31-
// after eslint --fix:
32-
let el = <div class="greeting" />;
26+
import {} from "solid-js/store";
3327

34-
let el = (
35-
<div many other attributes className="greeting">
36-
Hello world!
37-
</div>
38-
);
39-
// after eslint --fix:
40-
let el = (
41-
<div many other attributes class="greeting">
42-
Hello world!
43-
</div>
44-
);
45-
46-
let el = <PascalComponent className="greeting">Hello world!</PascalComponent>;
47-
// after eslint --fix:
48-
let el = <PascalComponent class="greeting">Hello world!</PascalComponent>;
28+
let el = <div {...maybeSignal()} />;
4929

50-
let el = <label htmlFor="id">Hello world!</label>;
51-
// after eslint --fix:
52-
let el = <label for="id">Hello world!</label>;
30+
let el = <div {...{ ...maybeSignal() }} />;
5331

54-
let el = <label htmlFor={"id"}>Hello world!</label>;
55-
// after eslint --fix:
56-
let el = <label for={"id"}>Hello world!</label>;
32+
let el = <div {...maybeProps.foo} />;
5733

58-
let el = (
59-
<label many other attributes htmlFor="id">
60-
Hello world!
61-
</label>
62-
);
63-
// after eslint --fix:
64-
let el = (
65-
<label many other attributes for="id">
66-
Hello world!
67-
</label>
68-
);
34+
let el = <div {...{ ...maybeProps.foo }} />;
6935

70-
let el = <PascalComponent htmlFor="id">Hello world!</PascalComponent>;
71-
// after eslint --fix:
72-
let el = <PascalComponent for="id">Hello world!</PascalComponent>;
36+
let merged = mergeProps(maybeSignal);
7337

74-
let el = <div key={item.id} />;
75-
// after eslint --fix:
76-
let el = <div />;
38+
let func = () => ({});
39+
let merged = mergeProps(func, props);
7740

7841
```
7942

@@ -82,33 +45,28 @@ let el = <div />;
8245
These snippets don't cause lint errors.
8346

8447
```js
85-
let el = <div>Hello world!</div>;
48+
let merged = mergeProps({}, props);
8649

87-
let el = <div class="greeting">Hello world!</div>;
50+
const obj = {};
51+
let merged = mergeProps(obj, props);
8852

89-
let el = <div class={"greeting"}>Hello world!</div>;
53+
let obj = {};
54+
let merged = mergeProps(obj, props);
9055

91-
let el = (
92-
<div many other attributes class="greeting">
93-
Hello world!
94-
</div>
56+
let merged = mergeProps(
57+
{
58+
get asdf() {
59+
signal();
60+
},
61+
},
62+
props
9563
);
9664

97-
let el = <label for="id">Hello world!</label>;
98-
99-
let el = <label for="id">Hello world!</label>;
100-
101-
let el = <label for={"id"}>Hello world!</label>;
102-
103-
let el = (
104-
<label many other attributes for="id">
105-
Hello world!
106-
</label>
107-
);
65+
let el = <div {...{ asdf: "asdf" }} />;
10866

109-
let el = <PascalComponent class="greeting" for="id" />;
67+
let el = <div {...asdf} />;
11068

111-
let el = <PascalComponent key={item.id} />;
69+
let obj = { Proxy: 1 };
11270

11371
```
11472
<!-- AUTO-GENERATED-CONTENT:END -->

0 commit comments

Comments
 (0)