Skip to content

Commit 634914a

Browse files
authored
Breaking: Updating several dependencies
algoliasearch, ejs,express, highlight, hint, lodash and moments. removing request
2 parents ba78342 + 8a18e5c commit 634914a

File tree

24 files changed

+1526
-1811
lines changed

24 files changed

+1526
-1811
lines changed

docs/about/faq/index.html

-5
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@ <h2 id=is-there-a-plugin-for-my-favorite-editor>Is there a plugin for my favorit
3535
currently available. It utilizes the <a target="_blank" href="https://microsoft.github.io/language-server-protocol/" >Language Server Protocol</a>
3636
which makes it suitable for porting to other editors if there’s
3737
community interest.</p>
38-
<h2 id=is-there-an-online-service>Is there an online service?<a href="#is-there-an-online-service" class="headerlink" title="Is there an online service?"></a></h2><p>Yes! You can scan an online website in <a href="https://webhint.io/scanner/" >here</a>.</p>
39-
<p>If you have any feedback on the results page, please open an
40-
issue in the <a target="_blank" href="https://github.com/webhintio/webhint.io/issues/new" >website repository</a>. If the issue is
41-
related to the results themselves, then open an issue in the <a target="_blank" href="https://github.com/webhintio/hint/issues/new" >webhint
42-
repository</a>.</p>
4338
<h2 id=what-is-the-logo>What is the logo?<a href="#what-is-the-logo" class="headerlink" title="What is the logo?"></a></h2><p>Our logo is Nellie the narwhal. Narwhals are not only <a target="_blank" href="https://www.youtube.com/watch?v=ykwqXuMPsoc" >awesome</a> but have one of the best sonars in the animal kingdom.</p>
4439
<p><a target="_blank" href="http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0162069" >Narwhal echolocation beams may be the most directional of any
4540
species</a>.</p>

docs/docs/contributor-guide/getting-started/events/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
&#125;;
1717

1818
<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-keyword">class</span> <span class="hljs-title class_">CSSParser</span> <span class="hljs-keyword">extends</span> <span class="hljs-title class_ inherited__">Parser</span>&lt;<span class="hljs-title class_">StyleEvents</span>&gt; &#123;
19-
<span class="hljs-keyword">public</span> <span class="hljs-title function_">constructor</span>(<span class="hljs-params">engine: Engine&lt;StyleEvents&gt;</span>) &#123;
19+
<span class="hljs-keyword">public</span> <span class="hljs-title function_">constructor</span>(<span class="hljs-params"><span class="hljs-attr">engine</span>: <span class="hljs-title class_">Engine</span>&lt;<span class="hljs-title class_">StyleEvents</span>&gt;</span>) &#123;
2020
<span class="hljs-variable language_">super</span>(engine, <span class="hljs-string">&#x27;css&#x27;</span>);
2121
<span class="hljs-comment">// ...</span>
2222
&#125;

docs/docs/contributor-guide/guides/create-custom-hint/index.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ <h2 id=how-do-we-write-the-hint>How do we write the hint?<a href="#how-do-we-wri
9393
<span class="hljs-attr">scope</span>: <span class="hljs-title class_">HintScope</span>.<span class="hljs-property">any</span>
9494
&#125;
9595

96-
<span class="hljs-keyword">public</span> <span class="hljs-title function_">constructor</span>(<span class="hljs-params">context: HintContext</span>) &#123;
96+
<span class="hljs-keyword">public</span> <span class="hljs-title function_">constructor</span>(<span class="hljs-params"><span class="hljs-attr">context</span>: <span class="hljs-title class_">HintContext</span></span>) &#123;
9797
<span class="hljs-keyword">const</span> stringToBeIncluded = <span class="hljs-string">`(c) webhint`</span>;
98-
<span class="hljs-keyword">const</span> <span class="hljs-title function_">validateFooter</span> = (<span class="hljs-params">elementFound: ElementFound</span>) =&gt; &#123;
98+
<span class="hljs-keyword">const</span> <span class="hljs-title function_">validateFooter</span> = (<span class="hljs-params"><span class="hljs-attr">elementFound</span>: <span class="hljs-title class_">ElementFound</span></span>) =&gt; &#123;
9999
<span class="hljs-keyword">const</span> &#123; element, resource &#125; = elementFound;
100100
<span class="hljs-keyword">const</span> footerHTML = element.<span class="hljs-property">outerHTML</span>;
101101

@@ -150,15 +150,15 @@ <h2 id=how-do-we-config-the-hint>How do we config the hint?<a href="#how-do-we-c
150150
<span class="hljs-attr">scope</span>: <span class="hljs-title class_">HintScope</span>.<span class="hljs-property">any</span>
151151
&#125;
152152

153-
<span class="hljs-keyword">public</span> <span class="hljs-title function_">constructor</span>(<span class="hljs-params">context: HintContext</span>) &#123;
153+
<span class="hljs-keyword">public</span> <span class="hljs-title function_">constructor</span>(<span class="hljs-params"><span class="hljs-attr">context</span>: <span class="hljs-title class_">HintContext</span></span>) &#123;
154154
<span class="hljs-keyword">let</span> stringToBeIncluded;
155155

156156
<span class="hljs-keyword">const</span> <span class="hljs-title function_">loadHintConfigs</span> = (<span class="hljs-params"></span>) =&gt; &#123;
157157
<span class="hljs-comment">// Load Config options.</span>
158158
stringToBeIncluded = (context.<span class="hljs-property">hintOptions</span> &amp;&amp; context.<span class="hljs-property">hintOptions</span>.<span class="hljs-property">stringToBeIncluded</span>) || <span class="hljs-string">`(c) webhint`</span>;
159159
&#125;;
160160

161-
<span class="hljs-keyword">const</span> <span class="hljs-title function_">validateFooter</span> = <span class="hljs-keyword">async</span> (<span class="hljs-params">elementFound: ElementFound</span>) =&gt; &#123; <span class="hljs-comment">/* ... */</span> &#125;;
161+
<span class="hljs-keyword">const</span> <span class="hljs-title function_">validateFooter</span> = <span class="hljs-keyword">async</span> (<span class="hljs-params"><span class="hljs-attr">elementFound</span>: <span class="hljs-title class_">ElementFound</span></span>) =&gt; &#123; <span class="hljs-comment">/* ... */</span> &#125;;
162162

163163
<span class="hljs-title function_">loadHintConfigs</span>();
164164

docs/docs/contributor-guide/how-to/common-hint-scenarios/index.html

+9-9
Original file line numberDiff line numberDiff line change
@@ -36,25 +36,25 @@ <h2 id=evaluate-javascript-in-the-page-context>Evaluate JavaScript in the page c
3636
return true;
3737
&#125;())`</span>;
3838

39-
context.evaluate(script);</pre></td></tr></table></figure><figure class="highlight js"><table><tr><td class="code"><pre><span class="hljs-keyword">const</span> script =
39+
context.<span class="hljs-title function_">evaluate</span>(script);</pre></td></tr></table></figure><figure class="highlight js"><table><tr><td class="code"><pre><span class="hljs-keyword">const</span> script =
4040
<span class="hljs-string">`(function() &#123;
4141
return Promise.resolve(true);
4242
&#125;())`</span>;
4343

44-
context.evaluate(script);</pre></td></tr></table></figure><p>The following does not:</p>
44+
context.<span class="hljs-title function_">evaluate</span>(script);</pre></td></tr></table></figure><p>The following does not:</p>
4545
<figure class="highlight js"><table><tr><td class="code"><pre><span class="hljs-keyword">const</span> script = <span class="hljs-string">`return true;`</span>;
4646

47-
context.evaluate(script);</pre></td></tr></table></figure><figure class="highlight js"><table><tr><td class="code"><pre><span class="hljs-keyword">const</span> script = <span class="hljs-string">`return Promise.resolve(true);`</span>;
47+
context.<span class="hljs-title function_">evaluate</span>(script);</pre></td></tr></table></figure><figure class="highlight js"><table><tr><td class="code"><pre><span class="hljs-keyword">const</span> script = <span class="hljs-string">`return Promise.resolve(true);`</span>;
4848

49-
context.evaluate(script);</pre></td></tr></table></figure><h2 id=ignore-connectors>Ignore connectors<a href="#ignore-connectors" class="headerlink" title="Ignore connectors"></a></h2><p>If your hint does not work properly with certain connectors you can
49+
context.<span class="hljs-title function_">evaluate</span>(script);</pre></td></tr></table></figure><h2 id=ignore-connectors>Ignore connectors<a href="#ignore-connectors" class="headerlink" title="Ignore connectors"></a></h2><p>If your hint does not work properly with certain connectors you can
5050
use the property <code>ignoreConnectors</code> so it is not run when they are used.</p>
5151
<figure class="highlight ts"><table><tr><td class="code"><pre><span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-keyword">class</span> <span class="hljs-title class_">MyHint</span> <span class="hljs-keyword">implements</span> <span class="hljs-title class_">IHint</span> &#123;
5252
<span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">readonly</span> <span class="hljs-attr">meta</span>: <span class="hljs-title class_">HintMetadata</span> = &#123;
5353
<span class="hljs-attr">id</span>: <span class="hljs-string">&#x27;my-hint&#x27;</span>,
5454
<span class="hljs-attr">ignoredConnectors</span>: [<span class="hljs-string">&#x27;jsdom&#x27;</span>]
5555
&#125;
5656

57-
<span class="hljs-keyword">public</span> <span class="hljs-title function_">constructor</span>(<span class="hljs-params">context: HintContext</span>) &#123;
57+
<span class="hljs-keyword">public</span> <span class="hljs-title function_">constructor</span>(<span class="hljs-params"><span class="hljs-attr">context</span>: <span class="hljs-title class_">HintContext</span></span>) &#123;
5858
<span class="hljs-comment">// Your code here</span>
5959
&#125;
6060
&#125;</pre></td></tr></table></figure><h2 id=interact-with-other-services>Interact with other services<a href="#interact-with-other-services" class="headerlink" title="Interact with other services"></a></h2><p>You can develop a hint that integrates with other services. <code>webhint</code>
@@ -67,11 +67,11 @@ <h2 id=evaluate-javascript-in-the-page-context>Evaluate JavaScript in the page c
6767
<figure class="highlight ts"><table><tr><td class="code"><pre><span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-keyword">class</span> <span class="hljs-title class_">MyHint</span> <span class="hljs-keyword">implements</span> <span class="hljs-title class_">IHint</span> &#123;
6868
<span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">readonly</span> <span class="hljs-attr">meta</span>: <span class="hljs-title class_">HintMetadata</span> = &#123; <span class="hljs-attr">id</span>: <span class="hljs-string">&#x27;my-hint&#x27;</span> &#125;
6969

70-
<span class="hljs-keyword">public</span> <span class="hljs-title function_">constructor</span>(<span class="hljs-params">context: HintContext</span>) &#123;
70+
<span class="hljs-keyword">public</span> <span class="hljs-title function_">constructor</span>(<span class="hljs-params"><span class="hljs-attr">context</span>: <span class="hljs-title class_">HintContext</span></span>) &#123;
7171
<span class="hljs-comment">/** The promise that represents the connection to the online service. */</span>
7272
<span class="hljs-keyword">let</span> <span class="hljs-attr">promise</span>: <span class="hljs-title class_">Promise</span>&lt;<span class="hljs-built_in">any</span>&gt;;
7373

74-
<span class="hljs-keyword">const</span> <span class="hljs-title function_">start</span> = (<span class="hljs-params">data: ScanStartEvent</span>) =&gt; &#123;
74+
<span class="hljs-keyword">const</span> <span class="hljs-title function_">start</span> = (<span class="hljs-params"><span class="hljs-attr">data</span>: <span class="hljs-title class_">ScanStartEvent</span></span>) =&gt; &#123;
7575
<span class="hljs-comment">// Initialize promise to service here but do not return it.</span>
7676
promise = <span class="hljs-keyword">new</span> <span class="hljs-title class_">MyService</span>();
7777
&#125;;
@@ -114,12 +114,12 @@ <h2 id=validate-javascript>Validate JavaScript<a href="#validate-javascript" cla
114114
<span class="hljs-attr">worksWithLocalFiles</span>: <span class="hljs-literal">true</span>
115115
&#125;
116116

117-
<span class="hljs-keyword">public</span> <span class="hljs-title function_">constructor</span>(<span class="hljs-params">context: HintContext</span>) &#123;
117+
<span class="hljs-keyword">public</span> <span class="hljs-title function_">constructor</span>(<span class="hljs-params"><span class="hljs-attr">context</span>: <span class="hljs-title class_">HintContext</span></span>) &#123;
118118
<span class="hljs-keyword">let</span> validPromise;
119119
<span class="hljs-keyword">const</span> errorsOnly = context.<span class="hljs-property">hintOptions</span> &amp;&amp; context.<span class="hljs-property">hintOptions</span>[<span class="hljs-string">&#x27;errors-only&#x27;</span>] || <span class="hljs-literal">false</span>;
120120
<span class="hljs-keyword">let</span> html;
121121

122-
<span class="hljs-keyword">const</span> <span class="hljs-title function_">onParseJavascript</span> = (<span class="hljs-params">scriptParse: ScriptParse</span>) =&gt; &#123;
122+
<span class="hljs-keyword">const</span> <span class="hljs-title function_">onParseJavascript</span> = (<span class="hljs-params"><span class="hljs-attr">scriptParse</span>: <span class="hljs-title class_">ScriptParse</span></span>) =&gt; &#123;
123123
<span class="hljs-keyword">const</span> results = linter.<span class="hljs-title function_">verify</span>(scriptParse.<span class="hljs-property">sourceCode</span>, &#123; <span class="hljs-attr">hints</span>: &#123; <span class="hljs-attr">semi</span>: <span class="hljs-number">2</span> &#125; &#125;);
124124

125125
<span class="hljs-keyword">for</span> (<span class="hljs-keyword">const</span> result <span class="hljs-keyword">of</span> results) &#123;

docs/docs/contributor-guide/how-to/connector/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ <h2 id=develop-a-full-connector>Develop a “full” connector<a href="#develop-
6464
<span class="hljs-comment">/** Download an external resource using ` customHeaders` if needed. */</span>
6565
<span class="hljs-title function_">fetchContent</span>(<span class="hljs-attr">target</span>: <span class="hljs-variable constant_">URL</span> | <span class="hljs-built_in">string</span>, customHeaders?: <span class="hljs-built_in">object</span>): <span class="hljs-title class_">Promise</span>&lt;<span class="hljs-title class_">NetworkData</span>&gt;;
6666
<span class="hljs-comment">/** Evaluates the given JavaScript `code` asynchronously in the target. */</span>
67-
evaluate(<span class="hljs-attr">code</span>: <span class="hljs-built_in">string</span>): <span class="hljs-title class_">Promise</span>&lt;<span class="hljs-built_in">any</span>&gt;;
67+
<span class="hljs-title function_">evaluate</span>(<span class="hljs-attr">code</span>: <span class="hljs-built_in">string</span>): <span class="hljs-title class_">Promise</span>&lt;<span class="hljs-built_in">any</span>&gt;;
6868
<span class="hljs-comment">/** Finds all the nodes that match the given query. */</span>
6969
<span class="hljs-title function_">querySelectorAll</span>(<span class="hljs-attr">query</span>: <span class="hljs-built_in">string</span>): <span class="hljs-title class_">HTMLElement</span>[];
7070
&#125;</pre></td></tr></table></figure><h2 id=how-to-test-a-full-connector>How to test a “full” connector<a href="#how-to-test-a-full-connector" class="headerlink" title="How to test a “full” connector"></a></h2><p>To make sure your connector is a “full” connector, it has to pass the

docs/docs/contributor-guide/how-to/hint/index.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ <h2 id=how-hints-work>How hints work<a href="#how-hints-work" class="headerlink"
4747
<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-keyword">class</span> <span class="hljs-title class_">MyNewHint</span> <span class="hljs-keyword">implements</span> <span class="hljs-title class_">IHint</span> &#123;
4848
<span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">readonly</span> <span class="hljs-attr">meta</span>: <span class="hljs-title class_">HintMetadata</span> = &#123;&#125;
4949

50-
<span class="hljs-keyword">public</span> <span class="hljs-title function_">constructor</span>(<span class="hljs-params">context: HintContext</span>) &#123;
50+
<span class="hljs-keyword">public</span> <span class="hljs-title function_">constructor</span>(<span class="hljs-params"><span class="hljs-attr">context</span>: <span class="hljs-title class_">HintContext</span></span>) &#123;
5151
<span class="hljs-comment">// Your code here.</span>
5252

53-
<span class="hljs-keyword">const</span> <span class="hljs-title function_">validateFetchEnd</span> = (<span class="hljs-params">fetchEnd: FetchEnd</span>) =&gt; &#123;
53+
<span class="hljs-keyword">const</span> <span class="hljs-title function_">validateFetchEnd</span> = (<span class="hljs-params"><span class="hljs-attr">fetchEnd</span>: <span class="hljs-title class_">FetchEnd</span></span>) =&gt; &#123;
5454
<span class="hljs-comment">// Code to validate the hint on the event fetch::end.</span>
5555
&#125;;
5656

57-
<span class="hljs-keyword">const</span> <span class="hljs-title function_">validateElement</span> = (<span class="hljs-params">element: ElementFound</span>) =&gt; &#123;
57+
<span class="hljs-keyword">const</span> <span class="hljs-title function_">validateElement</span> = (<span class="hljs-params"><span class="hljs-attr">element</span>: <span class="hljs-title class_">ElementFound</span></span>) =&gt; &#123;
5858
<span class="hljs-comment">// Code to validate the hint on the event element::element-type.</span>
5959
&#125;;
6060

docs/docs/contributor-guide/how-to/parser/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-keyword">class</span> <span class="hljs-title class_">CustomParser</span> <span class="hljs-keyword">extends</span> <span class="hljs-title class_ inherited__">Parser</span> &#123;
1111

12-
<span class="hljs-keyword">public</span> <span class="hljs-title function_">constructor</span>(<span class="hljs-params">engine: Engine</span>) &#123;
12+
<span class="hljs-keyword">public</span> <span class="hljs-title function_">constructor</span>(<span class="hljs-params"><span class="hljs-attr">engine</span>: <span class="hljs-title class_">Engine</span></span>) &#123;
1313
<span class="hljs-variable language_">super</span>(engine, <span class="hljs-string">&#x27;&lt;parser_name&gt;&#x27;</span>);
1414

1515
<span class="hljs-comment">/*
@@ -19,7 +19,7 @@
1919
<span class="hljs-variable language_">this</span>.<span class="hljs-property">engine</span>.<span class="hljs-title function_">on</span>(<span class="hljs-string">&#x27;fetch::end::resource&#x27;</span>, <span class="hljs-variable language_">this</span>.<span class="hljs-property">onFetchEnd</span>);
2020
&#125;
2121

22-
<span class="hljs-keyword">public</span> <span class="hljs-keyword">async</span> <span class="hljs-title function_">onFetchEnd</span>(<span class="hljs-params">data: FetchEnd</span>) &#123;
22+
<span class="hljs-keyword">public</span> <span class="hljs-keyword">async</span> <span class="hljs-title function_">onFetchEnd</span>(<span class="hljs-params"><span class="hljs-attr">data</span>: <span class="hljs-title class_">FetchEnd</span></span>) &#123;
2323
<span class="hljs-comment">/*
2424
* Your magic to detect if the parser understands the content here
2525
* You probably want to check the contentType first

docs/docs/user-guide/concepts/formatters/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<ul>
2929
<li><p><a target="_blank" href="https://npmjs.com/package/@hint/formatter-json" ><code>@hint/formatter-json</code></a> does a <code>JSON.stringify()</code> of
3030
the results. Output is not user friendly:</p>
31-
<p><img src="/static/images/json-output-2bb9d2f869.png" alt="Example output for the json formatter"></p>
31+
<p><img src="/static/images/json-output-6f15a72cc8.png" alt="Example output for the json formatter"></p>
3232
</li>
3333
<li><p><a target="_blank" href="https://npmjs.com/package/@hint/formatter-stylish" ><code>@hint/formatter-stylish</code></a> prints the results in
3434
table format indicating the resource, line, and column:</p>

0 commit comments

Comments
 (0)