Releases: quick-lint/quick-lint-js
Releases · quick-lint/quick-lint-js
2.12.0 (2023-03-08)
Added
array[i, j]
now reports [E0450][] ("misleading use of ',' operator in
index") (implemented by Yunus).while (x > 0, y > 0)
now reports [E0451][] ("misleading use of ',' operator
in conditional statement") (implemented by Yunus).- Improvements to experimental TypeScript support:
- Type variables such as
Readonly<T>
andIArguments
are now recognized by
the newtypescript
global group which is enabled by default. declare
is now supported.- The old-style
module
syntax for namespaces is now supported.
- Type variables such as
Fixed
- Fixed E0062 being reported when E0061 should be reported instead
(fixed by Yunus). - TypeScript
namespace
without a body now reports [E0356][] instead of
crashing with an assertion failure.
Changed
- quick-lint-js' build system now optionally creates executes and runs them
during the build. This behavior is controlled by the
QUICK_LINT_JS_ENABLE_BUILD_TOOLS
andQUICK_LINT_JS_USE_BUILD_TOOLS
CMake
variables.- For most people,
QUICK_LINT_JS_ENABLE_BUILD_TOOLS
is enabled by default
and should work without extra configuration. No action is needed. - When cross-compiling,
QUICK_LINT_JS_ENABLE_BUILD_TOOLS
is disabled.
Currently,QUICK_LINT_JS_ENABLE_BUILD_TOOLS
is optional, so this should
behave as before. However, in the future, either
QUICK_LINT_JS_ENABLE_BUILD_TOOLS
orQUICK_LINT_JS_USE_BUILD_TOOLS
will
be required. - If you need to configure the build tools specially, or if you want to build
the build tools when cross-compiling, you must use the
QUICK_LINT_JS_USE_BUILD_TOOLS
CMake variable. See the cross-compiling
documentation for instructions on using
QUICK_LINT_JS_USE_BUILD_TOOLS
correctly.
- For most people,
2.11.0 (2023-01-31)
Changed
-
Debian: The apt repository signing key expired on (2023-01-21). This causes
apt-get update
to fail. To fix this issue, add the latest signing key by
running the following command:$ curl https://c.quick-lint-js.com/quick-lint-js-release.key | sudo apt-key add -
-
LSP: The quick-lint-js LSP server no longer accepts JSON-RPC 2.0 batch
messages. In practice, LSP clients don't use this feature, so this breaking
change should do no harm. The LSP specification recently started
prohibiting batch
messages to
match the status quo.
Added
- LSP: The LSP server now recognizes and lints TypeScript and TypeScript JSX
code. However, the editor plugins currently do not use this feature by
default. - Vim: You can opt into TypeScript support. Search for
EXPERIMENTAL
in
:help quick-lint-js
. (Disabled by default.) - VS Code: You can now opt into experimental TypeScript support. Set the
quick-lint-js.experimental-typescript
setting totrue
. (Disabled by
default.) switch (c) { case A: break; case A: break; }
now reports [E0347][]
("duplicated case clause in switch statement") (implemented by Rebraws).- Translations: Brazilian Portuguese (implemented by Guilherme Vasconcelos).
- Mixing up the order of the
export
,async
, andfunction
keywords now
reports [E0326][] or [E0327][] (implemented by Alek Lefebvre). - TypeScript types like
string?
now report [E0348][] (implemented by
Alek Lefebvre). - Extra parentheses in function parameters now report [E0349][] (function
parameter cannot be parenthesized) (implemented by Harshit Aghera). - QuickJS's global variables are now recognized by default via the new
quickjs
global group (implemented by wagner riffel). - E0190 is now reported if the literal is
undefined
, not onlynull
,
strings, and numbers (implemented by Harshit Aghera).
Fixed
- Variables can be named according to Unicode 15 (previously Unicode 14).
- In tracing files, the thread IDs in the file headers are now correct if
tracing was enabled after startup. - [E0325][] is now an error rather than a warning.
0o123.toString()
,0x123.toString()
,0b101.toString()
, and
0123.toString()
no longer incorrectly report E0046, E0047, or
E0048.- Using a variable called
async
, then exporting something, no longer reports
an unexpected token error (implemented by Alek Lefebvre). class C { x = 0, y; }
now reports [E0330][] ("',' should be ';' instead")
instead of E0057 ("use of undeclared variable: y") (implemented by
clegoz).
2.10.0 (2022-10-14)
Added
- [E0286][] and [E0287][] are now reported if the string or the value have extra
parentheses (such as in(tag.toUpperCase()) === 'img'
) (implemented by
Rebraws). myArray === []
now reports [E0344][] (implemented by Rebraws).myArray === [a, b, c]
now reports [E0341][] (implemented by Rebraws).- CLI: The new
--language
option lets you opt out of JSX
support. With--language=javascript
, quick-lint-js will report E0177 for
any uses of JSX. - You can opt into TypeScript support in the CLI using the
--language=experimental-typescript
option. TypeScript
support is experimental, so there will be bugs (including crashes) in
quick-lint-js. This option does not affect the LSP server. - E0149 and E0150 are now reported for labelled statements too
(implemented by Guilherme Vasconcelos).
Fixed
static
code blocks in classes no longer report E0242 ("TypeScript static
blocks are not supported in JavaScript").- When writing
implements
in JavaScript code, quick-lint-js will no longer
possibly report E0246 in addition to E0247. quick-lint-js will now
only report E0247. { x: y = z }
in an expression no longer incorrectly reports E0253.{ x: y = z }
now reports errors such as E0057 forz
. (z
used to be
completely ignored during variable analysis.){ x = z }
now only reports E0253, instead of also reporting E0059
forx
.class C { field!; }
now only reports E0239 (TypeScript assignment-asserted
fields are not supported in JavaScript) instead of both E0239 and
E0236 (assignment-asserted field must have a type annotation).
Changed
2.9.0 (2022-09-05)
Added
tag.toUpperCase() === 'img'
now reports E0286, and
tag.toLowerCase() === 'IMG'
now reports E0287 (implemented by Roland
Strasser).
Fixed
(param) { body(); }
now reports E0176 ('missing arrow operator for arrow
function') (implemented by Roland Strasser).- quick-lint-js no longer crashes if a TypeScript
type
alias appears in a
JavaScript file. - quick-lint-js now recognizes the
jest
global variable from the Jest test
framework. This suppresses undesired E0057 ("use of undeclared variable")
warnings. await () => x
no longer reportsx
as undeclared multiple times. (E0178
is still reported, as intended.)- Defining a global variable in
quick-lint-js.config
which is already declared
by default now always changes theshadowable
andwritable
settings. await () => await () => ...
no longer slows down linting and consumes a lot
of memory.
2.8.0 (2022-07-25)
Added
await await f()
now reports E0266 ("redundant await") (implemented by
clegoz).- CLI: Misuse of
--vim-file-bufnr
now reports warnings (implemented by Roland
Strasser).
Fixed
- LSP, VS Code: quick-lint-js now correctly handles merging lines containing
non-ASCII with lines containing ASCII. This fixes spurious diagnostics. Thanks
to T0x3139 and mirabellier for reporting and helping fix this bug. - quick-lint-js now recognizes Bun's global variables, including
Bun
and
bunJSX
. This suppresses undesired E0057 ("use of undeclared variable")
warnings.
Removed
- The
en@loud
translation has been removed. It was only used for testing.
Changed
- Debian/Ubuntu: Our Debian/Ubuntu package now might not work on Ubuntu 16.04 or
Debian 9. The following Debian-based Linux distributions are tested:- Debian 10 Bullseye and 11 Buster
- PureOS Amber
- Ubuntu 18.04 Bionic and 20.04 Focal
- Manual: Our Linux x86_64/amd64 pre-built binaries now might not work on Ubuntu
16.04 or similarly old distributions. The following Linux distributions are
tested:- Arch Linux
- Debian 10 Bullseye and 11 Buster
- Fedora 35 and 36
- Ubuntu 18.04 Bionic and 20.04 Focal
[E03...
2.7.0 (2022-07-13)
Added
const o = {k = v};
now reports E0253 ("use ':' instead of '=' in object
literals").--snarky
is now even snarkier.- LSP server: The new
quick-lint-js.tracing-directory
LSP configuration item
can be set to a path where quick-lint-js will log LSP protocol traffic. This
keylogger option can be used by quick-lint-js contributors to investigate
bugs. This new option is disabled by default.
Fixed
- quick-lint-js no longer fails to build with simdjson version 2.2.0.
- Declaring a TypeScript interface with the same name as a generic parameter no
longer crashes quick-lint-js.
2.6.0 (2022-06-15)
Added
DOMError
,MutationEvent
, and some other browser global variables are now
recognized.- New global group:
web-worker
(enabled by default) - The
importScripts
global function is now recognized by default. - Forgetting a semicolon between class fields now reports "missing semicolon
after field" (E0223) instead of "missing semicolon after statement"
(E0027). - Using some TypeScript features, such as class generics and interfaces, in
JavaScript code is now reported with a friendly error message. - E0199 ("unclosed class") is now reported in more scenarios.
static
code blocks in classes are now supported.
Fixed
- [E0707][] now only complains about classes named
await
, not any class inside
an async function. - E0054 is no longer incorrectly reported for class properties named
implements
,interface
,package
,private
,protected
, orpublic
. - In statement contexts,
async
followed by a newline followed byfunction
is
no longer falsely interpreted as an async function. It is instead interpreted
as the use of a variable calledasync
followed by a non-async function, per
the language standard. ((x)) => {}
no longer crashes the parser with an assertion failure.- Tests now pass if the user's locale is Italian (
it_IT.utf8
on Linux). - The FreeBSD build now succeeds and tests pass.
2.5.0 (2022-05-23)
Added
- E0144 and E0145 are now reported for
implements
,interface
,
package
,private
,protected
, andpublic
(in addition to other
keywords). - E0086 is now reported in more cases, such as when the deleted variable was
declared outside the function containing thedelete
expression. - Classes named
await
inasync
functions now report [E0707][] (implemented
by ooblegork). - Integer literals which are silently rounded at run-time now report E0212
(implemented by Rob Miner). - VS Code: The new
quick-lint-js.tracing
setting can be set to"verbose"
to
log changes to documents. This keylogger option can be used by quick-lint-js
contributors to investigate bugs. This new option is disabled by default. - CLI: The
--snarky
option makes error messages more interesting. Implemented
by david doroz.
Fixed
- E0150 no longer crashes quick-lint-js when using a German (
de
) locale.
(Fixed by Nico Sonack.) - The npm package now includes
copyright
files listing software licenses and
copyright notices. - E0086 is no longer falsely reported in some cases.
- VS Code (Windows x64): When the extension is first loaded, and a file has
errors, quick-lint-js no longer reports the first error always on the first
line. (The issue was a compiler
bug
which we worked around.) - quick-lint-js no longer creates and writes messages to
/tmp/qljs.log
.
Changed
- This release is signed with a new GPG key.
- Old fingerprint: 0327DE8F9CEF499851D19F6ED20BA9DCCF0E9D20
- New fingerprint: A6851D57A65803E98C05DA01C08A7BC89CA2F557
2.4.2 (2022-04-22)
Changed
- The name of package installed by the MSIX installer has changed. It used to be
"fa6b940b-8f96-4b46-8e21-703a63133e06" but now it is
"quick-lint.quick-lint-js". If you installed quick-lint-js using a prior
version of the MSIX installer, Windows won't let you upgrade. Uninstall the
old version of quick-lint-js before installing a new version.
[E...
2.4.1 (2022-04-19)
Fixed
- When using the
de
,fr_FR
, orsv_SV
locale, some error messages are no
longer blank.
Changed
- The Windows MSIX installer is now signed with a Microsoft-trusted certificate.
If you installed quick-lint-js using a prior version of the MSIX installer,
Windows won't let you upgrade. Uninstall the old version of quick-lint-js
before installing a new version. - The Windows executable is now signed with a Microsoft-trusted certificate.
...