-
-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
258 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,250 @@ | ||
<!---{ | ||
"title": "@@@", | ||
"linkLabelHTML": "Release: version 3.0", | ||
"description": "@@@", | ||
"navTitle": "Release 3.0", | ||
"blogAuthor": "Matthew \"strager\" Glazar", | ||
"blogDate": "2023-12-30T18:20:00-05:00" | ||
}---> | ||
|
||
<!DOCTYPE html> | ||
<!-- Copyright (C) 2020 Matthew "strager" Glazar --> | ||
<!-- See end of file for extended copyright information. --> | ||
<html> | ||
<head> | ||
<%- await include("../../common-head.ejs.html") %> <%- await | ||
include("../blog-head.ejs.html") %> | ||
<link href="../../main.css" rel="stylesheet" /> | ||
</head> | ||
<body> | ||
<% function callsToAction() { %> | ||
<ul class="install-options"> | ||
<li> | ||
<a href="../../install/" | ||
><qljs-icon name="vscode" size="19" /> <qljs-icon name="neovim" size="19" /> <qljs-icon name="sublime-text" size="19" /> <qljs-icon name="emacs" size="19" /> install | ||
quick-lint-js</a | ||
> | ||
</li> | ||
<li> | ||
<a href="https://github.com/quick-lint/quick-lint-js" | ||
><qljs-icon name="github" size="19" /> code on GitHub</a | ||
> | ||
</li> | ||
</ul> | ||
<% } %> | ||
|
||
<header><%- await include("../../common-nav.ejs.html") %></header> | ||
|
||
<main> | ||
<h1><%= meta.title %></h1> | ||
<p><qljs-date datetime="<%= meta.blogDate %>" /></p> | ||
|
||
@@@ | ||
|
||
<%- callsToAction() %> | ||
|
||
|
||
<p>How does quick-lint-js compare to ESLint? See for yourself:</p> | ||
|
||
<!-- @@@ s/ESLint/TypeScript/g --> | ||
<!-- @@@ show logos in comparison --> | ||
|
||
<!-- @@@ Copyright (c) Tiny Technologies, Inc. All rights reserved. | ||
License: LGPL-2.1-only --> | ||
<div class="eslint-comparison"> | ||
<figure style="grid-area: eslint"> | ||
<figcaption>TypeScript</figcaption> | ||
<div class="example"> | ||
<pre><code class="javascript">const trimArg = <<mark data-code="2304" data-message="Cannot find name 'T'." data-severity="error"><mark data-code="17008" data-message="JSX element 'T' has no corresponding closing tag." data-severity="error">T</mark></mark>>(fn: (a: T) =<mark data-code="1382" data-message="Unexpected token. Did you mean `{'>'}` or `&gt;`?" data-severity="error">></mark> boolean) =<mark data-code="1382" data-message="Unexpected token. Did you mean `{'>'}` or `&gt;`?" data-severity="error">></mark> { | ||
<mark data-code="1109" data-message="Expression expected." data-severity="error">return</mark> (arg1: any, arg2: T) =<mark data-code="1382" data-message="Unexpected token. Did you mean `{'>'}` or `&gt;`?" data-severity="error">></mark> { | ||
<mark data-code="1109" data-message="Expression expected." data-severity="error">return</mark> fn(arg2); | ||
<mark data-code="1381" data-message="Unexpected token. Did you mean `{'}'}` or `&rbrace;`?" data-severity="error">}</mark>; | ||
<mark data-code="1381" data-message="Unexpected token. Did you mean `{'}'}` or `&rbrace;`?" data-severity="error">}</mark><mark data-code="1005" data-message="'</' expected." data-severity="error">;</mark></code></pre> | ||
<p> | ||
Cannot find name 'T'. (2304)<br> | ||
JSX element 'T' has no corresponding closing tag. (17008)<br> | ||
Unexpected token. Did you mean `{'>'}` or `&gt;`? (1382)<br> | ||
Unexpected token. Did you mean `{'>'}` or `&gt;`? (1382)<br> | ||
Expression expected. (1109)<br> | ||
Unexpected token. Did you mean `{'>'}` or `&gt;`? (1382)<br> | ||
Expression expected. (1109)<br> | ||
Unexpected token. Did you mean `{'}'}` or `&rbrace;`? (1381)<br> | ||
Unexpected token. Did you mean `{'}'}` or `&rbrace;`? (1381)<br> | ||
'</' expected. (1005)</p> | ||
</div> | ||
</figure> | ||
<figure style="grid-area: qljs"> | ||
<figcaption>quick-lint-js</figcaption> | ||
<div class="example"> | ||
<pre><code class="javascript">const trimArg = <T<mark data-code="E0285" data-message="generic arrow function needs ',' here in TSX" data-severity="error"></mark>>(fn: (a: T) => boolean) => { | ||
return (arg1: any, arg2: T) => { | ||
return fn(arg2); | ||
}; | ||
};</code></pre> | ||
<p> | ||
generic arrow function needs ',' here in TSX [<a | ||
href="../../errors/E0285/" | ||
>E0285</a | ||
>] | ||
</p> | ||
</div> | ||
</figure> | ||
</div> | ||
|
||
<!-- @@@ copyright Copyright Elasticsearch B.V. --> | ||
<div class="eslint-comparison"> | ||
<figure style="grid-area: eslint"> | ||
<figcaption>TypeScript</figcaption> | ||
<div class="example"> | ||
<pre><code class="javascript">export function Spacer() { | ||
return | ||
<mark data-code="7027" data-message="Unreachable code detected." data-severity="error"><mark data-code="2657" data-message="JSX expressions must have one parent element." data-severity="error"><EuiSpacer size="xs" /> | ||
<EuiHorizontalRule margin="none" /> | ||
<EuiSpacer size="xs" /></mark></mark> | ||
}</code></pre> | ||
<p>Unreachable code detected. (7027)<br> | ||
JSX expressions must have one parent element. (2657)</p> | ||
</div> | ||
</figure> | ||
<figure style="grid-area: qljs"> | ||
<figcaption>quick-lint-js</figcaption> | ||
<div class="example"> | ||
<pre><code class="javascript">export function Spacer() { | ||
<mark data-code="E0179" data-message="return statement returns nothing (undefined)" data-severity="warning">return</mark> | ||
<mark data-code="E0189" data-message="missing '<>' and '</>' to enclose multiple children" data-severity="erro"></mark><EuiSpacer size="xs" /> | ||
<EuiHorizontalRule margin="none" /> | ||
<EuiSpacer size="xs" /> | ||
}</code></pre> | ||
<p> | ||
return statement returns nothing (undefined) [<a | ||
href="../../errors/E0179/" | ||
>E0179</a | ||
>]<br> | ||
missing '<>' and '</>' to enclose multiple children [<a | ||
href="../../errors/E0189/" | ||
>E0189</a | ||
>] | ||
</p> | ||
</div> | ||
</figure> | ||
</div> | ||
|
||
<!-- @@@ copyright Copyright Elasticsearch B.V. --> | ||
<div class="eslint-comparison"> | ||
<figure style="grid-area: eslint"> | ||
<figcaption>TypeScript</figcaption> | ||
<div class="example"> | ||
<pre><code class="javascript">it('matches on the first word', await (<mark data-code="1109" data-message="Expression expected." data-severity="error">)</mark> <mark data-code="1005" data-message="',' expected." data-severity="error">=></mark> { | ||
await <mark data-code="1005" data-message="':' expected." data-severity="error">table</mark>.searchForItemWithName('Hello')<mark data-code="1005" data-message="',' expected." data-severity="error">;</mark> | ||
await <mark data-code="1005" data-message="':' expected." data-severity="error">table</mark>.expectItemsCount('visualize', 1)<mark data-code="1005" data-message="',' expected." data-severity="error">;</mark> | ||
});</code></pre> | ||
<p> | ||
Expression expected. (1109)<br> | ||
',' expected. (1005)<br> | ||
':' expected. (1005)<br> | ||
',' expected. (1005)<br> | ||
':' expected. (1005)<br> | ||
',' expected. (1005) | ||
</p> | ||
</div> | ||
</figure> | ||
<figure style="grid-area: qljs"> | ||
<figcaption>quick-lint-js</figcaption> | ||
<div class="example"> | ||
<pre><code class="javascript">it('matches on the first word', <mark data-code="E0178" data-message="'await' cannot be followed by an arrow function; use 'async' instead" data-severity="error">await</mark> () => { | ||
await table.searchForItemWithName('Hello'); | ||
await table.expectItemsCount('visualize', 1); | ||
});</code></pre> | ||
<p> | ||
'await' cannot be followed by an arrow function; use 'async' | ||
instead [<a href="../../errors/E0178/">E0178</a>] | ||
</p> | ||
</div> | ||
</figure> | ||
</div> | ||
|
||
<!-- @@@ <T>expr in .tsx --> | ||
<!-- @@@ <T>()=>{} in .tsx --> | ||
<!-- @@@ <Foo/> in .ts --> | ||
|
||
<div class="eslint-comparison"> | ||
<figure style="grid-area: eslint"> | ||
<figcaption>ESLint</figcaption> | ||
<div class="example"> | ||
<pre><code class="javascript">function TodoEntry({title, children}) { | ||
return ( | ||
<h3>{title}</h3> | ||
<mark data-message="Adjacent JSX elements must be wrapped in an enclosing tag" data-severity="error"><</mark>div className="body">{children}</div> | ||
); | ||
}</code></pre> | ||
<p>Adjacent JSX elements must be wrapped in an enclosing tag</p> | ||
</div> | ||
</figure> | ||
<figure style="grid-area: qljs"> | ||
<figcaption>quick-lint-js</figcaption> | ||
<div class="example"> | ||
<pre><code class="javascript">function TodoEntry({title, children}) { | ||
return ( | ||
<mark data-code="E0189" data-message="missing '<>' and '</>' to enclose multiple children" data-severity="error"><</mark>h3>{title}</h3> | ||
<div className="body">{children}</div><mark data-code="E0189" data-message="children end here" data-severity="error"></mark> | ||
); | ||
}</code></pre> | ||
<p> | ||
missing '<>' and '</>' to enclose multiple | ||
children;<br />children end here [<a | ||
href="../../errors/E0189/" | ||
>E0189</a | ||
>] | ||
</p> | ||
</div> | ||
</figure> | ||
</div> | ||
|
||
|
||
<p> | ||
What should we work on next? | ||
<a href="https://github.com/quick-lint/quick-lint-js/issues/327" | ||
>Suggest features for quick-lint-js.</a | ||
> | ||
</p> | ||
|
||
<p> | ||
quick-lint-js version 3.0 has over @@@ patches since version 2.0. | ||
<a | ||
href="../../contribute/authors/" | ||
>@@@ people</a | ||
> | ||
made quick-lint-js possible. | ||
</p> | ||
|
||
<%- callsToAction() %> | ||
|
||
<p> | ||
Written by <a href="https://strager.net/contact.html">strager</a>, lead | ||
developer of quick-lint-js. | ||
</p> | ||
|
||
<script src="../../error-box.bundled.js"></script> | ||
</main> | ||
</body> | ||
</html> | ||
|
||
<!-- | ||
quick-lint-js finds bugs in JavaScript programs. | ||
Copyright (C) 2020 Matthew "strager" Glazar | ||
This file is part of quick-lint-js. | ||
quick-lint-js is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
quick-lint-js is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with quick-lint-js. If not, see <https://www.gnu.org/licenses/>. | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters