Guillaume Gomez
397ad826b0
Add "no-dupe-else-if" eslint rule
2022-05-29 21:42:24 +02:00
Guillaume Gomez
9f79a03ca5
Add "no-dup-args" eslint rule
2022-05-29 21:40:16 +02:00
Guillaume Gomez
4bb728da79
Add "no-debugger" eslint rule
2022-05-29 21:39:44 +02:00
Guillaume Gomez
6b4191f5e0
Add "no-const-assign" eslint rule
2022-05-29 21:38:52 +02:00
Guillaume Gomez
334f12c28e
Add "eqeqeq" eslint rule
2022-05-27 22:30:19 +02:00
Guillaume Gomez
3741a88ad7
Add "no-unused-vars" eslint rule
2022-05-27 22:22:22 +02:00
Guillaume Gomez
b7d6a429b5
Add "arrow-parens" eslint rule
2022-05-27 22:21:41 +02:00
Guillaume Gomez
d932610bab
Rollup merge of #97394 - GuillaumeGomez:more-eslint-rules, r=notriddle
...
Add more eslint rules
This PR adds more eslint rules. Here are the explanations for each of them:
* [space-infix-ops](https://eslint.org/docs/rules/space-infix-ops )
* [space-before-function-paren](https://eslint.org/docs/rules/space-before-function-paren )
* [space-before-blocks](https://eslint.org/docs/rules/space-before-blocks )
* [comma-dangle](https://eslint.org/docs/rules/comma-dangle )
* [comma-style](https://eslint.org/docs/rules/comma-style )
* [max-len](https://eslint.org/docs/rules/max-len )
* [eol-last](https://eslint.org/docs/rules/eol-last )
r? `@notriddle`
2022-05-26 00:32:11 +02:00
Guillaume Gomez
02b630f566
Rollup merge of #97317 - GuillaumeGomez:gui-settings-text-click, r=jsha
...
Allow to click on setting text
You can test it [here](https://rustdoc.crud.net/imperio/gui-settings-text-click/doc/foo/index.html ).
This PR allows to click on the text alongside the toggle to change it.
r? `@jsha`
2022-05-26 00:32:09 +02:00
Guillaume Gomez
bb29d5d6e0
Add new eslint rule "eol-last"
2022-05-25 13:58:42 +02:00
Guillaume Gomez
36d3c7e3c6
Add new eslint rule "max-len"
2022-05-25 13:58:14 +02:00
Guillaume Gomez
33245e0bb3
Add new eslint rule "comma-style"
2022-05-25 13:57:08 +02:00
Guillaume Gomez
4dbc6764cf
Add new eslint rule "comma-dangle"
2022-05-25 13:56:27 +02:00
Guillaume Gomez
c5e3954887
Add new eslint rule "space-before-blocks"
2022-05-25 13:55:54 +02:00
Guillaume Gomez
6c7156d488
Add new eslint rule "space-before-function-paren"
2022-05-25 13:55:09 +02:00
Guillaume Gomez
231b47b2b9
Add eslint rule "space-infix-ops"
2022-05-25 13:53:19 +02:00
Guillaume Gomez
6920361959
Remove unused brush image
2022-05-24 15:55:01 +02:00
Guillaume Gomez
1ebf0d9c72
Allow to click on toggle text to update it
2022-05-24 15:40:50 +02:00
Guillaume Gomez
399299fba2
Add new eslint rule to prevent whitespace before function call paren
2022-05-22 22:29:44 +02:00
Guillaume Gomez
116c5a25e7
Add eslint key-spacing check
2022-05-20 20:27:35 +02:00
Guillaume Gomez
b036fd378b
Add eslint arrow-spacing check
2022-05-20 20:27:34 +02:00
Guillaume Gomez
8fe333abd0
Add new lint to enforce whitespace after keywords
2022-05-19 17:19:22 +02:00
Guillaume Gomez
72496d88d3
Move some DOM generation into the HTML settings file directly
2022-05-18 11:40:15 +02:00
Yuki Okushi
b8dd27079c
Rollup merge of #97113 - GuillaumeGomez:search-ui-fixes, r=notriddle
...
Search GUI fixes
The first fix is about the duplicated "in":

The second fix is about the `<select>` broken style:


You can test it [here](https://rustdoc.crud.net/imperio/search-ui-fixes/doc/foo/index.html?search=test ).
r? `@notriddle`
2022-05-18 07:41:00 +09:00
Jacob Hoffman-Andrews
453979462a
rustdoc: make search.js a module
...
Previously, search.js relied on the DOM and the `window` object. It can now be
loaded in the absence of the DOM, for instance by Node. The same is true of
search-index.js.
This allows removing a lot of code from src/tools/rustdoc-js/tester.js that
tried to parse search.js and extract specific functions that were needed for
testing.
2022-05-17 09:26:18 -07:00
Guillaume Gomez
0f8b3f4cae
Fix display of search crate filter select
2022-05-17 14:20:34 +02:00
Guillaume Gomez
d765b73a01
Fix duplicated "in" in the search result text
2022-05-17 13:15:49 +02:00
Guillaume Gomez
5d84c0c569
Add new eslint rule about brace style
2022-05-15 13:59:51 +02:00
Guillaume Gomez
e8762757c3
Remove theme picker button
2022-05-14 17:21:52 +02:00
Guillaume Gomez
5e01ba36c9
Improve settings menu display
2022-05-14 17:21:52 +02:00
Michael Howell
d3fd6bfd30
rustdoc: fix GUI crash when searching for magic JS property values
2022-05-12 14:15:31 -07:00
Matthias Krüger
231cd0fd7d
Rollup merge of #96939 - GuillaumeGomez:settings-css, r=notriddle
...
Fix settings page CSS
In https://github.com/rust-lang/rust/pull/96741 , I moved the CSS loading outside of `settings.js`. The result was that on the settings page, there isn't the settings CSS anymore:

I also used this opportunity to remove unused CSS rules (we don't have `<select>` elements anymore in the settings).
cc `@jsha`
r? `@notriddle`
2022-05-12 16:41:04 +02:00
Guillaume Gomez
92482cabaa
Remove unused CSS settings rules
2022-05-11 11:27:13 +02:00
Yuki Okushi
95b2d37a39
Rollup merge of #96900 - GuillaumeGomez:fix-js-error, r=notriddle
...
Fix js error
On the source code pages, we get a JS error:

It's fixed in the first commit. The second one is removing an unused CSS rule and the third one is a little cleanup of a GUI test.
cc ``@jsha``
r? ``@notriddle``
2022-05-11 13:16:33 +09:00
Yuki Okushi
d34915f691
Rollup merge of #96879 - notriddle:notriddle/search-ranking, r=GuillaumeGomez
...
rustdoc: search result ranking fix
# Before

# After

2022-05-11 00:09:35 +09:00
Guillaume Gomez
f9fc7ef097
Remove unused CSS rule
2022-05-10 16:40:32 +02:00
Guillaume Gomez
f82b3a16d5
Fix JS error in source code pages
2022-05-10 16:40:14 +02:00
Michael Howell
360d6e4b7d
rustdoc: search result ranking fix
2022-05-09 11:49:05 -07:00
Michael Howell
521d2c3d3c
Remove unused param from search.js::checkPath
2022-05-08 22:19:40 -07:00
Guillaume Gomez
1e93165b05
Enforce no trailing spaces with eslint
2022-05-08 14:08:33 +02:00
Guillaume Gomez
b7e5116375
Enforce linebreak style in js source code
2022-05-08 14:07:25 +02:00
Guillaume Gomez
14897180ae
Enforce quote rule for JS source code
2022-05-07 20:50:55 +02:00
Folyd
a8ede1248d
Change eslint rules from configuration comments to configuration files
2022-05-07 11:47:30 +08:00
Guillaume Gomez
bcfb95afd3
Rollup merge of #96754 - notriddle:notriddle/impl-dups, r=GuillaumeGomez
...
rustdoc: ensure HTML/JS side implementors don't have dups
Fixes #94641
Rendered:
- https://notriddle.com/notriddle-rustdoc-test/impl-dups/std/iter/trait.Iterator.html
- https://notriddle.com/notriddle-rustdoc-test/impl-dups/core/iter/trait.Iterator.html
2022-05-06 20:05:43 +02:00
Guillaume Gomez
93b86d69b6
Rollup merge of #96748 - GuillaumeGomez:reexports-in-search, r=notriddle
...
Fixes reexports in search
Fixes #96681 .
At some point we stopped reexporting items in search so this PR fixes it.
It also adds a regression test.
r? ```@notriddle```
2022-05-06 20:05:41 +02:00
Guillaume Gomez
fcb0bce25c
Rollup merge of #96590 - notriddle:notriddle/tab-bar-fn-search, r=GuillaumeGomez,jsha
...
rustdoc: when running a function-signature search, tweak the tab bar
# Before

# After

2022-05-06 20:05:38 +02:00
Guillaume Gomez
279dee5374
Fix reexports missing from the search index
2022-05-06 13:52:21 +02:00
Michael Goulet
7cdad77536
Rollup merge of #96741 - GuillaumeGomez:improve-settings-loading-strategy, r=jsha
...
Improve settings loading strategy
I learned about this thanks to ```@jsha``` who suggested this approach:
It improves the settings loading strategy by loading CSS and JS at the same time to prevent the style to be applied afterwards on slow connections.
r? ```@jsha```
2022-05-05 19:34:25 -07:00
Michael Goulet
292eefe753
Rollup merge of #96704 - GuillaumeGomez:rotation-animation, r=jsha
...
Add rotation animation on settings button when loading
As discussed, I added an animation when the settings JS file is loading (I voluntarily made the timeout at the end of the `settings.js` super long so we can see what the animation looks like):
https://user-images.githubusercontent.com/3050060/166693243-816a08b7-5e39-4142-acd3-686ad9950d8e.mp4
r? ````@jsha````
2022-05-05 19:34:24 -07:00
Michael Howell
20010d7597
rustdoc: ensure HTML/JS side implementors don't have dups
2022-05-05 17:45:33 -07:00