typescript-eslint/typescript-eslint (@typescript-eslint/eslint-plugin)
### [`v5.30.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#5300-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5290v5300-2022-06-27)
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.29.0...v5.30.0)
##### Features
- **eslint-plugin:** \[no-shadow] add shadowed variable location to the error message ([#5183](https://togithub.com/typescript-eslint/typescript-eslint/issues/5183)) ([8ca08e9](https://togithub.com/typescript-eslint/typescript-eslint/commit/8ca08e9f18d59b29715c667fbb7d237f6e9a96ba))
- treat `this` in `typeof this` as a `ThisExpression` ([#4382](https://togithub.com/typescript-eslint/typescript-eslint/issues/4382)) ([b04b2ce](https://togithub.com/typescript-eslint/typescript-eslint/commit/b04b2ce1ba90d94718891f2562dd210a6d7b8609))
### [`v5.29.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#5290-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5280v5290-2022-06-20)
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.28.0...v5.29.0)
**Note:** Version bump only for package [@typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin)
### [`v5.28.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#5280-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5271v5280-2022-06-13)
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.27.1...v5.28.0)
##### Bug Fixes
- \[TS4.7] allow visiting of typeParameters in TSTypeQuery ([#5166](https://togithub.com/typescript-eslint/typescript-eslint/issues/5166)) ([dc1f930](https://togithub.com/typescript-eslint/typescript-eslint/commit/dc1f9309cf04aa7314e758980ac687558482f47f))
- **eslint-plugin:** \[space-infix-ops] support for optional property without type ([#5155](https://togithub.com/typescript-eslint/typescript-eslint/issues/5155)) ([1f25daf](https://togithub.com/typescript-eslint/typescript-eslint/commit/1f25daf74e5d45077199f9ee9fa9bf31107f4089))
##### Features
- **eslint-plugin:** \[consistent-generic-constructors] add rule ([#4924](https://togithub.com/typescript-eslint/typescript-eslint/issues/4924)) ([921cdf1](https://togithub.com/typescript-eslint/typescript-eslint/commit/921cdf17e548845311d0591249616ec844503926))
#### [5.27.1](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.27.0...v5.27.1) (2022-06-06)
##### Bug Fixes
- **eslint-plugin:** \[space-infix-ops] correct PropertyDefinition with typeAnnotation ([#5113](https://togithub.com/typescript-eslint/typescript-eslint/issues/5113)) ([d320174](https://togithub.com/typescript-eslint/typescript-eslint/commit/d320174f40a74b34e6b6e4c88128ef6e736311d8))
- **eslint-plugin:** \[space-infix-ops] regression fix for conditional types ([#5135](https://togithub.com/typescript-eslint/typescript-eslint/issues/5135)) ([e5238c8](https://togithub.com/typescript-eslint/typescript-eslint/commit/e5238c84e56e7c34174b2c6f1e3ea59456797c2f))
- **eslint-plugin:** \[space-infix-ops] regression fix for type aliases ([#5138](https://togithub.com/typescript-eslint/typescript-eslint/issues/5138)) ([4e13deb](https://togithub.com/typescript-eslint/typescript-eslint/commit/4e13deb05fbd8724996156b15b65f6a66794a7cc))
### [`v5.27.1`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#5271-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5270v5271-2022-06-06)
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.27.0...v5.27.1)
##### Bug Fixes
- **eslint-plugin:** \[space-infix-ops] correct PropertyDefinition with typeAnnotation ([#5113](https://togithub.com/typescript-eslint/typescript-eslint/issues/5113)) ([d320174](https://togithub.com/typescript-eslint/typescript-eslint/commit/d320174f40a74b34e6b6e4c88128ef6e736311d8))
- **eslint-plugin:** \[space-infix-ops] regression fix for conditional types ([#5135](https://togithub.com/typescript-eslint/typescript-eslint/issues/5135)) ([e5238c8](https://togithub.com/typescript-eslint/typescript-eslint/commit/e5238c84e56e7c34174b2c6f1e3ea59456797c2f))
- **eslint-plugin:** \[space-infix-ops] regression fix for type aliases ([#5138](https://togithub.com/typescript-eslint/typescript-eslint/issues/5138)) ([4e13deb](https://togithub.com/typescript-eslint/typescript-eslint/commit/4e13deb05fbd8724996156b15b65f6a66794a7cc))
typescript-eslint/typescript-eslint (@typescript-eslint/parser)
### [`v5.30.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#5300-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5290v5300-2022-06-27)
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.29.0...v5.30.0)
**Note:** Version bump only for package [@typescript-eslint/parser](https://togithub.com/typescript-eslint/parser)
### [`v5.29.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#5290-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5280v5290-2022-06-20)
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.28.0...v5.29.0)
**Note:** Version bump only for package [@typescript-eslint/parser](https://togithub.com/typescript-eslint/parser)
### [`v5.28.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#5280-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5271v5280-2022-06-13)
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.27.1...v5.28.0)
**Note:** Version bump only for package [@typescript-eslint/parser](https://togithub.com/typescript-eslint/parser)
#### [5.27.1](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.27.0...v5.27.1) (2022-06-06)
**Note:** Version bump only for package [@typescript-eslint/parser](https://togithub.com/typescript-eslint/parser)
### [`v5.27.1`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#5271-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5270v5271-2022-06-06)
[Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.27.0...v5.27.1)
**Note:** Version bump only for package [@typescript-eslint/parser](https://togithub.com/typescript-eslint/parser)
evanw/esbuild
### [`v0.14.48`](https://togithub.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#01448)
[Compare Source](https://togithub.com/evanw/esbuild/compare/v0.14.47...v0.14.48)
- Enable using esbuild in Deno via WebAssembly ([#2323](https://togithub.com/evanw/esbuild/issues/2323))
The native implementation of esbuild is much faster than the WebAssembly version, but some people don't want to give Deno the `--allow-run` permission necessary to run esbuild and are ok waiting longer for their builds to finish when using the WebAssembly backend. With this release, you can now use esbuild via WebAssembly in Deno. To do this you will need to import from `wasm.js` instead of `mod.js`:
```js
import * as esbuild from 'https://deno.land/x/esbuild@v0.14.48/wasm.js'
const ts = 'let test: boolean = true'
const result = await esbuild.transform(ts, { loader: 'ts' })
console.log('result:', result)
```
Make sure you run Deno with `--allow-net` so esbuild can download the WebAssembly module. Using esbuild like this starts up a worker thread that runs esbuild in parallel (unless you call `esbuild.initialize({ worker: false })` to tell esbuild to run on the main thread). If you want to, you can call `esbuild.stop()` to terminate the worker if you won't be using esbuild anymore and you want to reclaim the memory.
Note that Deno appears to have a bug where background WebAssembly optimization can prevent the process from exiting for many seconds. If you are trying to use Deno and WebAssembly to run esbuild quickly, you may need to manually call `Deno.exit(0)` after your code has finished running.
- Add support for font file MIME types ([#2337](https://togithub.com/evanw/esbuild/issues/2337))
This release adds support for font file MIME types to esbuild, which means they are now recognized by the built-in local web server and they are now used when a font file is loaded using the `dataurl` loader. The full set of newly-added file extension MIME type mappings is as follows:
- `.eot` => `application/vnd.ms-fontobject`
- `.otf` => `font/otf`
- `.sfnt` => `font/sfnt`
- `.ttf` => `font/ttf`
- `.woff` => `font/woff`
- `.woff2` => `font/woff2`
- Remove `"use strict";` when targeting ESM ([#2347](https://togithub.com/evanw/esbuild/issues/2347))
All ES module code is automatically in strict mode, so a `"use strict";` directive is unnecessary. With this release, esbuild will now remove the `"use strict";` directive if the output format is ESM. This change makes the generated output file a few bytes smaller:
```js
// Original code
'use strict'
export let foo = 123
// Old output (with --format=esm --minify)
"use strict";let t=123;export{t as foo};
// New output (with --format=esm --minify)
let t=123;export{t as foo};
```
- Attempt to have esbuild work with Deno on FreeBSD ([#2356](https://togithub.com/evanw/esbuild/issues/2356))
Deno doesn't support FreeBSD, but it's possible to build Deno for FreeBSD with some additional patches on top. This release of esbuild changes esbuild's Deno installer to download esbuild's FreeBSD binary in this situation. This configuration is unsupported although in theory everything should work.
- Add some more target JavaScript engines ([#2357](https://togithub.com/evanw/esbuild/issues/2357))
This release adds the [Rhino](https://togithub.com/mozilla/rhino) and [Hermes](https://hermesengine.dev/) JavaScript engines to the set of engine identifiers that can be passed to the `--target` flag. You can use this to restrict esbuild to only using JavaScript features that are supported on those engines in the output files that esbuild generates.
### [`v0.14.47`](https://togithub.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#01447)
[Compare Source](https://togithub.com/evanw/esbuild/compare/v0.14.46...v0.14.47)
- Make global names more compact when `||=` is available ([#2331](https://togithub.com/evanw/esbuild/issues/2331))
With this release, the code esbuild generates for the `--global-name=` setting is now slightly shorter when you don't configure esbuild such that the `||=` operator is unsupported (e.g. with `--target=chrome80` or `--supported:logical-assignment=false`):
```js
// Original code
exports.foo = 123
// Old output (with --format=iife --global-name=foo.bar.baz --minify)
var foo=foo||{};foo.bar=foo.bar||{};foo.bar.baz=(()=>{var b=(a,o)=>()=>(o||a((o={exports:{}}).exports,o),o.exports);var c=b(f=>{f.foo=123});return c();})();
// New output (with --format=iife --global-name=foo.bar.baz --minify)
var foo;((foo||={}).bar||={}).baz=(()=>{var b=(a,o)=>()=>(o||a((o={exports:{}}).exports,o),o.exports);var c=b(f=>{f.foo=123});return c();})();
```
- Fix `--mangle-quoted=false` with `--minify-syntax=true`
If property mangling is active and `--mangle-quoted` is disabled, quoted properties are supposed to be preserved. However, there was a case when this didn't happen if `--minify-syntax` was enabled, since that internally transforms `x['y']` into `x.y` to reduce code size. This issue has been fixed:
```js
// Original code
x.foo = x['bar'] = { foo: y, 'bar': z }
// Old output (with --mangle-props=. --mangle-quoted=false --minify-syntax=true)
x.a = x.b = { a: y, bar: z };
// New output (with --mangle-props=. --mangle-quoted=false --minify-syntax=true)
x.a = x.bar = { a: y, bar: z };
```
Notice how the property `foo` is always used unquoted but the property `bar` is always used quoted, so `foo` should be consistently mangled while `bar` should be consistently not mangled.
- Fix a minification bug regarding `this` and property initializers
When minification is enabled, esbuild attempts to inline the initializers of variables that have only been used once into the start of the following expression to reduce code size. However, there was a bug where this transformation could change the value of `this` when the initializer is a property access and the start of the following expression is a call expression. This release fixes the bug:
```js
// Original code
function foo(obj) {
let fn = obj.prop;
fn();
}
// Old output (with --minify)
function foo(f){f.prop()}
// New output (with --minify)
function foo(o){let f=o.prop;f()}
```
### [`v0.14.46`](https://togithub.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#01446)
[Compare Source](https://togithub.com/evanw/esbuild/compare/v0.14.45...v0.14.46)
- Add the ability to override support for individual syntax features ([#2060](https://togithub.com/evanw/esbuild/issues/2060), [#2290](https://togithub.com/evanw/esbuild/issues/2290), [#2308](https://togithub.com/evanw/esbuild/issues/2308))
The `target` setting already lets you configure esbuild to restrict its output by only making use of syntax features that are known to be supported in the configured target environment. For example, setting `target` to `chrome50` causes esbuild to automatically transform optional chain expressions into the equivalent older JavaScript and prevents you from using BigInts, among many other things. However, sometimes you may want to customize this set of unsupported syntax features at the individual feature level.
Some examples of why you might want to do this:
- JavaScript runtimes often do a quick implementation of newer syntax features that is slower than the equivalent older JavaScript, and you can get a speedup by telling esbuild to pretend this syntax feature isn't supported. For example, V8 has a [long-standing performance bug regarding object spread](https://bugs.chromium.org/p/v8/issues/detail?id=11536) that can be avoided by manually copying properties instead of using object spread syntax. Right now esbuild hard-codes this optimization if you set `target` to a V8-based runtime.
- There are many less-used JavaScript runtimes in addition to the ones present in browsers, and these runtimes sometimes just decide not to implement parts of the specification, which might make sense for runtimes intended for embedded environments. For example, the developers behind Facebook's JavaScript runtime [Hermes](https://hermesengine.dev/) have decided to not implement classes despite it being a major JavaScript feature that was added seven years ago and that is used in virtually every large JavaScript project.
- You may be processing esbuild's output with another tool, and you may want esbuild to transform certain features and the other tool to transform certain other features. For example, if you are using esbuild to transform files individually to ES5 but you are then feeding the output into Webpack for bundling, you may want to preserve `import()` expressions even though they are a syntax error in ES5.
With this release, you can now use `--supported:feature=false` to force `feature` to be unsupported. This will cause esbuild to either rewrite code that uses the feature into older code that doesn't use the feature (if esbuild is able to), or to emit a build error (if esbuild is unable to). For example, you can use `--supported:arrow=false` to turn arrow functions into function expressions and `--supported:bigint=false` to make it an error to use a BigInt literal. You can also use `--supported:feature=true` to force it to be supported, which means esbuild will pass it through without transforming it. Keep in mind that this is an advanced feature. For most use cases you will probably want to just use `target` instead of using this.
The full set of currently-allowed features are as follows:
**JavaScript:**
- `arbitrary-module-namespace-names`
- `array-spread`
- `arrow`
- `async-await`
- `async-generator`
- `bigint`
- `class`
- `class-field`
- `class-private-accessor`
- `class-private-brand-check`
- `class-private-field`
- `class-private-method`
- `class-private-static-accessor`
- `class-private-static-field`
- `class-private-static-method`
- `class-static-blocks`
- `class-static-field`
- `const-and-let`
- `default-argument`
- `destructuring`
- `dynamic-import`
- `exponent-operator`
- `export-star-as`
- `for-await`
- `for-of`
- `generator`
- `hashbang`
- `import-assertions`
- `import-meta`
- `logical-assignment`
- `nested-rest-binding`
- `new-target`
- `node-colon-prefix-import`
- `node-colon-prefix-require`
- `nullish-coalescing`
- `object-accessors`
- `object-extensions`
- `object-rest-spread`
- `optional-catch-binding`
- `optional-chain`
- `regexp-dot-all-flag`
- `regexp-lookbehind-assertions`
- `regexp-match-indices`
- `regexp-named-capture-groups`
- `regexp-sticky-and-unicode-flags`
- `regexp-unicode-property-escapes`
- `rest-argument`
- `template-literal`
- `top-level-await`
- `typeof-exotic-object-is-object`
- `unicode-escapes`
**CSS:**
- `hex-rgba`
- `rebecca-purple`
- `modern-rgb-hsl`
- `inset-property`
- `nesting`
Since you can now specify `--supported:object-rest-spread=false` yourself to work around the V8 performance issue mentioned above, esbuild will no longer automatically transform all instances of object spread when targeting a V8-based JavaScript runtime going forward.
*Note that JavaScript feature transformation is very complex and allowing full customization of the set of supported syntax features could cause bugs in esbuild due to new interactions between multiple features that were never possible before. Consider this to be an experimental feature.*
- Implement `extends` constraints on `infer` type variables ([#2330](https://togithub.com/evanw/esbuild/issues/2330))
TypeScript 4.7 introduced the ability to write an `extends` constraint after an `infer` type variable, which looks like this:
```ts
type FirstIfString =
T extends [infer S extends string, ...unknown[]]
? S
: never;
```
You can read the blog post for more details: https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#extends-constraints-on-infer-type-variables. Previously this was a syntax error in esbuild but with this release, esbuild can now parse this syntax correctly.
- Allow `define` to match optional chain expressions ([#2324](https://togithub.com/evanw/esbuild/issues/2324))
Previously esbuild's `define` feature only matched member expressions that did not use optional chaining. With this release, esbuild will now also match those that use optional chaining:
```js
// Original code
console.log(a.b, a?.b)
// Old output (with --define:a.b=c)
console.log(c, a?.b);
// New output (with --define:a.b=c)
console.log(c, c);
```
This is for compatibility with Webpack's [`DefinePlugin`](https://webpack.js.org/plugins/define-plugin/), which behaves the same way.
### [`v0.14.45`](https://togithub.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#01445)
[Compare Source](https://togithub.com/evanw/esbuild/compare/v0.14.44...v0.14.45)
- Add a log message for ambiguous re-exports ([#2322](https://togithub.com/evanw/esbuild/issues/2322))
In JavaScript, you can re-export symbols from another file using `export * from './another-file'`. When you do this from multiple files that export different symbols with the same name, this creates an ambiguous export which is causes that name to not be exported. This is harmless if you don't plan on using the ambiguous export name, so esbuild doesn't have a warning for this. But if you do want a warning for this (or if you want to make it an error), you can now opt-in to seeing this log message with `--log-override:ambiguous-reexport=warning` or `--log-override:ambiguous-reexport=error`. The log message looks like this:
▲ [WARNING] Re-export of "common" in "example.js" is ambiguous and has been removed [ambiguous-reexport]
One definition of "common" comes from "a.js" here:
a.js:2:11:
2 │ export let common = 2
╵ ~~~~~~
Another definition of "common" comes from "b.js" here:
b.js:3:14:
3 │ export { b as common }
╵ ~~~~~~
- Optimize the output of the JSON loader ([#2161](https://togithub.com/evanw/esbuild/issues/2161))
The `json` loader (which is enabled by default for `.json` files) parses the file as JSON and generates a JavaScript file with the parsed expression as the `default` export. This behavior is standard and works in both node and the browser (well, as long as you use an [import assertion](https://v8.dev/features/import-assertions)). As an extension, esbuild also allows you to import additional top-level properties of the JSON object directly as a named export. This is beneficial for tree shaking. For example:
```js
import { version } from 'esbuild/package.json'
console.log(version)
```
If you bundle the above code with esbuild, you'll get something like the following:
```js
// node_modules/esbuild/package.json
var version = "0.14.44";
// example.js
console.log(version);
```
Most of the `package.json` file is irrelevant and has been omitted from the output due to tree shaking. The way esbuild implements this is to have the JavaScript file that's generated from the JSON look something like this with a separate exported variable for each property on the top-level object:
```js
// node_modules/esbuild/package.json
export var name = "esbuild";
export var version = "0.14.44";
export var repository = "https://github.com/evanw/esbuild";
export var bin = {
esbuild: "bin/esbuild"
};
...
export default {
name,
version,
repository,
bin,
...
};
```
However, this means that if you import the `default` export instead of a named export, you will get non-optimal output. The `default` export references all top-level properties, leading to many unnecessary variables in the output. With this release esbuild will now optimize this case to only generate additional variables for top-level object properties that are actually imported:
```js
// Original code
import all, { bar } from 'data:application/json,{"foo":[1,2,3],"bar":[4,5,6]}'
console.log(all, bar)
// Old output (with --bundle --minify --format=esm)
var a=[1,2,3],l=[4,5,6],r={foo:a,bar:l};console.log(r,l);
// New output (with --bundle --minify --format=esm)
var l=[4,5,6],r={foo:[1,2,3],bar:l};console.log(r,l);
```
Notice how there is no longer an unnecessary generated variable for `foo` since it's never imported. And if you only import the `default` export, esbuild will now reproduce the original JSON object in the output with all top-level properties compactly inline.
- Add `id` to warnings returned from the API
With this release, warnings returned from esbuild's API now have an `id` property. This identifies which kind of log message it is, which can be used to more easily filter out certain warnings. For example, reassigning a `const` variable will generate a message with an `id` of `"assign-to-constant"`. This also gives you the identifier you need to apply a log override for that kind of message: https://esbuild.github.io/api/#log-override.
### [`v0.14.44`](https://togithub.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#01444)
[Compare Source](https://togithub.com/evanw/esbuild/compare/v0.14.43...v0.14.44)
- Add a `copy` loader ([#2255](https://togithub.com/evanw/esbuild/issues/2255))
You can configure the "loader" for a specific file extension in esbuild, which is a way of telling esbuild how it should treat that file. For example, the `text` loader means the file is imported as a string while the `binary` loader means the file is imported as a `Uint8Array`. If you want the imported file to stay a separate file, the only option was previously the `file` loader (which is intended to be similar to Webpack's [`file-loader`](https://v4.webpack.js.org/loaders/file-loader/) package). This loader copies the file to the output directory and imports the path to that output file as a string. This is useful for a web application because you can refer to resources such as `.png` images by importing them for their URL. However, it's not helpful if you need the imported file to stay a separate file but to still behave the way it normally would when the code is run without bundling.
With this release, there is now a new loader called `copy` that copies the loaded file to the output directory and then rewrites the path of the import statement or `require()` call to point to the copied file instead of the original file. This will automatically add a content hash to the output name by default (which can be configured with the `--asset-names=` setting). You can use this by specifying `copy` for a specific file extension, such as with `--loader:.png=copy`.
- Fix a regression in arrow function lowering ([#2302](https://togithub.com/evanw/esbuild/pull/2302))
This release fixes a regression with lowering arrow functions to function expressions in ES5. This feature was introduced in version 0.7.2 and regressed in version 0.14.30.
In JavaScript, regular `function` expressions treat `this` as an implicit argument that is determined by how the function is called, but arrow functions treat `this` as a variable that is captured in the closure from the surrounding lexical scope. This is emulated in esbuild by storing the value of `this` in a variable before changing the arrow function into a function expression.
However, the code that did this didn't treat `this` expressions as a usage of that generated variable. Version 0.14.30 began omitting unused generated variables, which caused the transformation of `this` to break. This regression happened due to missing test coverage. With this release, the problem has been fixed:
```js
// Original code
function foo() {
return () => this
}
// Old output (with --target=es5)
function foo() {
return function() {
return _this;
};
}
// New output (with --target=es5)
function foo() {
var _this = this;
return function() {
return _this;
};
}
```
This fix was contributed by [@nkeynes](https://togithub.com/nkeynes).
- Allow entity names as define values ([#2292](https://togithub.com/evanw/esbuild/issues/2292))
The "define" feature allows you to replace certain expressions with certain other expressions at compile time. For example, you might want to replace the global identifier `IS_PRODUCTION` with the boolean value `true` when building for production. Previously the only expressions you could substitute in were either identifier expressions or anything that is valid JSON syntax. This limitation exists because supporting more complex expressions is more complex (for example, substituting in a `require()` call could potentially pull in additional files, which would need to be handled). With this release, you can now also now define something as a member expression chain of the form `foo.abc.xyz`.
- Implement package self-references ([#2312](https://togithub.com/evanw/esbuild/issues/2312))
This release implements a rarely-used feature in node where a package can import itself by name instead of using relative imports. You can read more about this feature here: https://nodejs.org/api/packages.html#self-referencing-a-package-using-its-name. For example, assuming the `package.json` in a given package looks like this:
```json
// package.json
{
"name": "a-package",
"exports": {
".": "./main.mjs",
"./foo": "./foo.js"
}
}
```
Then any module in that package can reference an export in the package itself:
```js
// ./a-module.mjs
import { something } from 'a-package'; // Imports "something" from ./main.mjs.
```
Self-referencing is also available when using `require`, both in an ES module, and in a CommonJS one. For example, this code will also work:
```js
// ./a-module.js
const { something } = require('a-package/foo'); // Loads from ./foo.js.
```
- Add a warning for assigning to an import ([#2319](https://togithub.com/evanw/esbuild/issues/2319))
Import bindings are immutable in JavaScript, and assigning to them will throw an error. So instead of doing this:
```js
import { foo } from 'foo'
foo++
```
You need to do something like this instead:
```js
import { foo, setFoo } from 'foo'
setFoo(foo + 1)
```
This is already an error if you try to bundle this code with esbuild. However, this was previously allowed silently when bundling is disabled, which can lead to confusion for people who don't know about this aspect of how JavaScript works. So with this release, there is now a warning when you do this:
▲ [WARNING] This assignment will throw because "foo" is an import [assign-to-import]
example.js:2:0:
2 │ foo++
╵ ~~~
Imports are immutable in JavaScript. To modify the value of this import, you must export a setter
function in the imported file (e.g. "setFoo") and then import and call that function here instead.
This new warning can be turned off with `--log-override:assign-to-import=silent` if you don't want to see it.
- Implement `alwaysStrict` in `tsconfig.json` ([#2264](https://togithub.com/evanw/esbuild/issues/2264))
This release adds `alwaysStrict` to the set of TypeScript `tsconfig.json` configuration values that esbuild supports. When this is enabled, esbuild will forbid syntax that isn't allowed in strict mode and will automatically insert `"use strict";` at the top of generated output files. This matches the behavior of the TypeScript compiler: https://www.typescriptlang.org/tsconfig#alwaysStrict.
### [`v0.14.43`](https://togithub.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#01443)
[Compare Source](https://togithub.com/evanw/esbuild/compare/v0.14.42...v0.14.43)
- Fix TypeScript parse error whe a generic function is the first type argument ([#2306](https://togithub.com/evanw/esbuild/issues/2306))
In TypeScript, the `<<` token may need to be split apart into two `<` tokens if it's present in a type argument context. This was already correctly handled for all type expressions and for identifier expressions such as in the following code:
```ts
// These cases already worked in the previous release
let foo: Array<() => T>;
bar<() => T>;
```
However, normal expressions of the following form were previously incorrectly treated as syntax errors:
```ts
// These cases were broken but have now been fixed
foo.bar<() => T>;
foo?.<() => T>();
```
With this release, these cases now parsed correctly.
- Fix minification regression with pure IIFEs ([#2279](https://togithub.com/evanw/esbuild/issues/2279))
An Immediately Invoked Function Expression (IIFE) is a function call to an anonymous function, and is a way of introducing a new function-level scope in JavaScript since JavaScript lacks a way to do this otherwise. And a pure function call is a function call with the special `/* @__PURE__ */` comment before it, which tells JavaScript build tools that the function call can be considered to have no side effects (and can be removed if it's unused).
Version 0.14.9 of esbuild introduced a regression that changed esbuild's behavior when these two features were combined. If the IIFE body contains a single expression, the resulting output still contained that expression instead of being empty. This is a minor regression because you normally wouldn't write code like this, so this shouldn't come up in practice, and it doesn't cause any correctness issues (just larger-than-necessary output). It's unusual that you would tell esbuild "remove this if the result is unused" and then not store the result anywhere, since the result is unused by construction. But regardless, the issue has now been fixed.
For example, the following code is a pure IIFE, which means it should be completely removed when minification is enabled. Previously it was replaced by the contents of the IIFE but it's now completely removed:
```js
// Original code
/* @__PURE__ */ (() => console.log(1))()
// Old output (with --minify)
console.log(1);
// New output (with --minify)
```
- Add log messages for indirect `require` references ([#2231](https://togithub.com/evanw/esbuild/issues/2231))
A long time ago esbuild used to warn about indirect uses of `require` because they break esbuild's ability to analyze the dependencies of the code and cause dependencies to not be bundled, resulting in a potentially broken bundle. However, this warning was removed because many people wanted the warning to be removed. Some packages have code that uses `require` like this but on a code path that isn't used at run-time, so their code still happens to work even though the bundle is incomplete. For example, the following code will *not* bundle `bindings`:
```js
// Prevent React Native packager from seeing modules required with this
const nodeRequire = require;
function getRealmConstructor(environment) {
switch (environment) {
case "node.js":
case "electron":
return nodeRequire("bindings")("realm.node").Realm;
}
}
```
Version 0.11.11 of esbuild removed this warning, which means people no longer have a way to know at compile time whether their bundle is broken in this way. Now that esbuild has custom log message levels, this warning can be added back in a way that should make both people happy. With this release, there is now a log message for this that defaults to the `debug` log level, which normally isn't visible. You can either do `--log-override:indirect-require=warning` to make this log message a warning (and therefore visible) or use `--log-level=debug` to see this and all other `debug` log messages.
eslint/eslint
### [`v8.18.0`](https://togithub.com/eslint/eslint/releases/tag/v8.18.0)
[Compare Source](https://togithub.com/eslint/eslint/compare/v8.17.0...v8.18.0)
##### Features
- [`a6273b8`](https://togithub.com/eslint/eslint/commit/a6273b83b103c463937936ef2404575758a7baa4) feat: account for rule creation time in performance reports ([#15982](https://togithub.com/eslint/eslint/issues/15982)) (Nitin Kumar)
##### Bug Fixes
- [`f364d47`](https://togithub.com/eslint/eslint/commit/f364d47013d146cdea42b27a7b24d105223f5ffe) fix: Make no-unused-vars treat for..of loops same as for..in loops ([#15868](https://togithub.com/eslint/eslint/issues/15868)) (Alex Bass)
##### Documentation
- [`4871047`](https://togithub.com/eslint/eslint/commit/4871047dbd0c5ef5e4089425a85ac85dcd9cf263) docs: Update analytics, canonical URL, ads ([#15996](https://togithub.com/eslint/eslint/issues/15996)) (Nicholas C. Zakas)
- [`cddad14`](https://togithub.com/eslint/eslint/commit/cddad1495fbc1750c26330f7aadc6647e2eebac3) docs: Add correct/incorrect containers ([#15998](https://togithub.com/eslint/eslint/issues/15998)) (Nicholas C. Zakas)
- [`b04bc6f`](https://togithub.com/eslint/eslint/commit/b04bc6f1d558d9ad5eb57383a779fec5a170b3d3) docs: Add rules meta info to rule pages ([#15902](https://togithub.com/eslint/eslint/issues/15902)) (Nicholas C. Zakas)
- [`1324f10`](https://togithub.com/eslint/eslint/commit/1324f10ac58d3685fdb656a4fc9d1e5c9d035e42) docs: unify the wording referring to optional exception ([#15893](https://togithub.com/eslint/eslint/issues/15893)) (Abdelrahman Elkady)
- [`ad54d02`](https://togithub.com/eslint/eslint/commit/ad54d0246797cdd849948e7a5d31571c498af7aa) docs: add missing trailing slash to some internal links ([#15991](https://togithub.com/eslint/eslint/issues/15991)) (Milos Djermanovic)
- [`df7768e`](https://togithub.com/eslint/eslint/commit/df7768e16a5ab55da97749bb89ff19f98ce0cc6c) docs: Switch to version-relative URLs ([#15978](https://togithub.com/eslint/eslint/issues/15978)) (Nicholas C. Zakas)
- [`21d6479`](https://togithub.com/eslint/eslint/commit/21d647904dc30f9484b22acdd9243a6d0ecfba38) docs: change some absolute links to relative ([#15970](https://togithub.com/eslint/eslint/issues/15970)) (Milos Djermanovic)
- [`f31216a`](https://togithub.com/eslint/eslint/commit/f31216a90a6204ed1fd56547772376a10f5d3ebb) docs: Update README team and sponsors (ESLint Jenkins)
##### Build Related
- [`ed49f15`](https://togithub.com/eslint/eslint/commit/ed49f15fad96060501927ca27ebda1a4c736ed04) build: remove unwanted parallel and image-min for dev server ([#15986](https://togithub.com/eslint/eslint/issues/15986)) (Strek)
##### Chores
- [`f6e2e63`](https://togithub.com/eslint/eslint/commit/f6e2e632fa3710cfa467b15350b08dea6e0e3dfc) chore: fix 'replaced by' rule list ([#16007](https://togithub.com/eslint/eslint/issues/16007)) (Milos Djermanovic)
- [`d94dc84`](https://togithub.com/eslint/eslint/commit/d94dc84ae76a36b4ee9268c40d8536d2f5b1c63c) chore: remove unused deprecation warnings ([#15994](https://togithub.com/eslint/eslint/issues/15994)) (Francesco Trotta)
- [`cdcf11e`](https://togithub.com/eslint/eslint/commit/cdcf11e457a2455bd8875d78651fec55dd148139) chore: fix versions link ([#15995](https://togithub.com/eslint/eslint/issues/15995)) (Milos Djermanovic)
- [`d2a8715`](https://togithub.com/eslint/eslint/commit/d2a871543a12143fa0ecea13d7508021fd019031) chore: add trailing slash to `pathPrefix` ([#15993](https://togithub.com/eslint/eslint/issues/15993)) (Milos Djermanovic)
- [`58a1bf0`](https://togithub.com/eslint/eslint/commit/58a1bf0de33adb1d54c8051090f01984daa08c86) chore: tweak URL rewriting for local previews ([#15992](https://togithub.com/eslint/eslint/issues/15992)) (Milos Djermanovic)
- [`80404d2`](https://togithub.com/eslint/eslint/commit/80404d28f040df49706ba2c1e954aee945711aa9) chore: remove docs deploy workflow ([#15984](https://togithub.com/eslint/eslint/issues/15984)) (Nicholas C. Zakas)
- [`71bc750`](https://togithub.com/eslint/eslint/commit/71bc75012b1377d3c7e57deea0ad06f99c4c65bf) chore: Set permissions for GitHub actions ([#15971](https://togithub.com/eslint/eslint/issues/15971)) (Naveen)
- [`90ff647`](https://togithub.com/eslint/eslint/commit/90ff64742ede6ef29018cb967fc4f20d7b85b592) chore: avoid generating subdirectories for each page on new docs site ([#15967](https://togithub.com/eslint/eslint/issues/15967)) (Milos Djermanovic)
### [`v8.17.0`](https://togithub.com/eslint/eslint/releases/tag/v8.17.0)
[Compare Source](https://togithub.com/eslint/eslint/compare/v8.16.0...v8.17.0)
#### Features
- [`55319e1`](https://togithub.com/eslint/eslint/commit/55319e133f0862a008db3557d7350f154f2c784f) feat: fix indent bug with semicolon-first style ([#15951](https://togithub.com/eslint/eslint/issues/15951)) (Milos Djermanovic)
- [`f6d7920`](https://togithub.com/eslint/eslint/commit/f6d79209821241c8e03c183b5844a024da0efe8a) feat: add `allowNamedExports` option to no-use-before-define ([#15953](https://togithub.com/eslint/eslint/issues/15953)) (Milos Djermanovic)
#### Bug Fixes
- [`54c0953`](https://togithub.com/eslint/eslint/commit/54c09530c778eb4076d89777165d59db96c9acb5) fix: cleanup typos ([#15939](https://togithub.com/eslint/eslint/issues/15939)) (Nick Schonning)
- [`845a7af`](https://togithub.com/eslint/eslint/commit/845a7af90ce03b383c8f09654ac049fc161dbb9f) fix: typo ocatal -> octal ([#15940](https://togithub.com/eslint/eslint/issues/15940)) (Nick Schonning)
#### Documentation
- [`b915018`](https://togithub.com/eslint/eslint/commit/b9150186bcc0f2732a69ab0ebd83a9b2fb2e6552) docs: Update website UI to latest ([#15944](https://togithub.com/eslint/eslint/issues/15944)) (Nicholas C. Zakas)
- [`f0bb609`](https://togithub.com/eslint/eslint/commit/f0bb6099668f54ae6f444126b90dbb1146248146) docs: Update Exponentiation operator MDN link ([#15960](https://togithub.com/eslint/eslint/issues/15960)) (Pranjal Jain)
- [`baa0153`](https://togithub.com/eslint/eslint/commit/baa01530469ec233fb60380a0960c1550f9d9a45) docs: Use correct past tense "left" instead of "leaved" ([#15950](https://togithub.com/eslint/eslint/issues/15950)) (Frederik Braun)
- [`1351a9b`](https://togithub.com/eslint/eslint/commit/1351a9b875aa32a8961a68457dde03ede9ef7c78) docs: Add Resources section to rule pages ([#15901](https://togithub.com/eslint/eslint/issues/15901)) (Nicholas C. Zakas)
- [`68cf0fb`](https://togithub.com/eslint/eslint/commit/68cf0fb7f645da5d992a5e749fc6c1311d30e75a) docs: cleanup typos ([#15936](https://togithub.com/eslint/eslint/issues/15936)) (Nick Schonning)
- [`13b62ae`](https://togithub.com/eslint/eslint/commit/13b62aeb710a68e5d838a4d3847c487af1ba9520) docs: use-dart-sass instead of node-sass ([#15912](https://togithub.com/eslint/eslint/issues/15912)) (Deepshika S)
- [`c81c5d6`](https://togithub.com/eslint/eslint/commit/c81c5d6ef1ba5808cca95ab965a162802af9b7cc) docs: add social media links ([#15920](https://togithub.com/eslint/eslint/issues/15920)) (Deepshika S)
- [`0d6a50b`](https://togithub.com/eslint/eslint/commit/0d6a50b41f2fe444fd222463adad48473eaf9b7d) docs: fix openjs link ([#15917](https://togithub.com/eslint/eslint/issues/15917)) (Amaresh S M)
- [`54910f5`](https://togithub.com/eslint/eslint/commit/54910f5a3bf6615f8ac03d33fd26fc1fa6dea21f) docs: display version in mobile view ([#15909](https://togithub.com/eslint/eslint/issues/15909)) (Amaresh S M)
#### Chores
- [`da694b9`](https://togithub.com/eslint/eslint/commit/da694b9d7cb0247541bcabbf943d1289e0e30167) chore: avoid theme flashes ([#15927](https://togithub.com/eslint/eslint/issues/15927)) (Strek)
- [`f836743`](https://togithub.com/eslint/eslint/commit/f836743e95cb8ad3bdd4e88687dbe2f16bfade62) chore: Use build hook for docs deploy ([#15945](https://togithub.com/eslint/eslint/issues/15945)) (Nicholas C. Zakas)
- [`ce035e5`](https://togithub.com/eslint/eslint/commit/ce035e5fac632ba8d4f1860f92465f22d6b44d42) test: cleanup typos ([#15937](https://togithub.com/eslint/eslint/issues/15937)) (Nick Schonning)
- [`10249ad`](https://togithub.com/eslint/eslint/commit/10249ad1a961463b6b347be71c074951ab8e2652) chore: use addEventListener instead of addListener ([#15923](https://togithub.com/eslint/eslint/issues/15923)) (Amaresh S M)
- [`5f5c1fb`](https://togithub.com/eslint/eslint/commit/5f5c1fb1083573ea511d0dae7913651db0dca772) chore: lint eleventy config file ([#15904](https://togithub.com/eslint/eslint/issues/15904)) (Milos Djermanovic)
- [`8513d37`](https://togithub.com/eslint/eslint/commit/8513d37c725509c9e9ec1dbbc431f20d32632cf3) chore: update Rule typedefs ([#15915](https://togithub.com/eslint/eslint/issues/15915)) (Milos Djermanovic)
- [`55534f1`](https://togithub.com/eslint/eslint/commit/55534f1a7040fad94bb5726759fbb9acb60d1c24) test: ensure no-restricted-imports works with NodeJS imports ([#15907](https://togithub.com/eslint/eslint/issues/15907)) (Nick Mazuk)
Configuration
📅 Schedule: Branch creation - "on the first day of the month" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
[ ] If you want to rebase/retry this PR, click this checkbox.
This PR has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
5.27.0
->5.30.0
5.27.0
->5.30.0
0.14.42
->0.14.48
8.16.0
->8.18.0
Release Notes
typescript-eslint/typescript-eslint (@typescript-eslint/eslint-plugin)
### [`v5.30.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#5300-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5290v5300-2022-06-27) [Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.29.0...v5.30.0) ##### Features - **eslint-plugin:** \[no-shadow] add shadowed variable location to the error message ([#5183](https://togithub.com/typescript-eslint/typescript-eslint/issues/5183)) ([8ca08e9](https://togithub.com/typescript-eslint/typescript-eslint/commit/8ca08e9f18d59b29715c667fbb7d237f6e9a96ba)) - treat `this` in `typeof this` as a `ThisExpression` ([#4382](https://togithub.com/typescript-eslint/typescript-eslint/issues/4382)) ([b04b2ce](https://togithub.com/typescript-eslint/typescript-eslint/commit/b04b2ce1ba90d94718891f2562dd210a6d7b8609)) ### [`v5.29.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#5290-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5280v5290-2022-06-20) [Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.28.0...v5.29.0) **Note:** Version bump only for package [@typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin) ### [`v5.28.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#5280-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5271v5280-2022-06-13) [Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.27.1...v5.28.0) ##### Bug Fixes - \[TS4.7] allow visiting of typeParameters in TSTypeQuery ([#5166](https://togithub.com/typescript-eslint/typescript-eslint/issues/5166)) ([dc1f930](https://togithub.com/typescript-eslint/typescript-eslint/commit/dc1f9309cf04aa7314e758980ac687558482f47f)) - **eslint-plugin:** \[space-infix-ops] support for optional property without type ([#5155](https://togithub.com/typescript-eslint/typescript-eslint/issues/5155)) ([1f25daf](https://togithub.com/typescript-eslint/typescript-eslint/commit/1f25daf74e5d45077199f9ee9fa9bf31107f4089)) ##### Features - **eslint-plugin:** \[consistent-generic-constructors] add rule ([#4924](https://togithub.com/typescript-eslint/typescript-eslint/issues/4924)) ([921cdf1](https://togithub.com/typescript-eslint/typescript-eslint/commit/921cdf17e548845311d0591249616ec844503926)) #### [5.27.1](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.27.0...v5.27.1) (2022-06-06) ##### Bug Fixes - **eslint-plugin:** \[space-infix-ops] correct PropertyDefinition with typeAnnotation ([#5113](https://togithub.com/typescript-eslint/typescript-eslint/issues/5113)) ([d320174](https://togithub.com/typescript-eslint/typescript-eslint/commit/d320174f40a74b34e6b6e4c88128ef6e736311d8)) - **eslint-plugin:** \[space-infix-ops] regression fix for conditional types ([#5135](https://togithub.com/typescript-eslint/typescript-eslint/issues/5135)) ([e5238c8](https://togithub.com/typescript-eslint/typescript-eslint/commit/e5238c84e56e7c34174b2c6f1e3ea59456797c2f)) - **eslint-plugin:** \[space-infix-ops] regression fix for type aliases ([#5138](https://togithub.com/typescript-eslint/typescript-eslint/issues/5138)) ([4e13deb](https://togithub.com/typescript-eslint/typescript-eslint/commit/4e13deb05fbd8724996156b15b65f6a66794a7cc)) ### [`v5.27.1`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#5271-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5270v5271-2022-06-06) [Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.27.0...v5.27.1) ##### Bug Fixes - **eslint-plugin:** \[space-infix-ops] correct PropertyDefinition with typeAnnotation ([#5113](https://togithub.com/typescript-eslint/typescript-eslint/issues/5113)) ([d320174](https://togithub.com/typescript-eslint/typescript-eslint/commit/d320174f40a74b34e6b6e4c88128ef6e736311d8)) - **eslint-plugin:** \[space-infix-ops] regression fix for conditional types ([#5135](https://togithub.com/typescript-eslint/typescript-eslint/issues/5135)) ([e5238c8](https://togithub.com/typescript-eslint/typescript-eslint/commit/e5238c84e56e7c34174b2c6f1e3ea59456797c2f)) - **eslint-plugin:** \[space-infix-ops] regression fix for type aliases ([#5138](https://togithub.com/typescript-eslint/typescript-eslint/issues/5138)) ([4e13deb](https://togithub.com/typescript-eslint/typescript-eslint/commit/4e13deb05fbd8724996156b15b65f6a66794a7cc))typescript-eslint/typescript-eslint (@typescript-eslint/parser)
### [`v5.30.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#5300-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5290v5300-2022-06-27) [Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.29.0...v5.30.0) **Note:** Version bump only for package [@typescript-eslint/parser](https://togithub.com/typescript-eslint/parser) ### [`v5.29.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#5290-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5280v5290-2022-06-20) [Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.28.0...v5.29.0) **Note:** Version bump only for package [@typescript-eslint/parser](https://togithub.com/typescript-eslint/parser) ### [`v5.28.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#5280-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5271v5280-2022-06-13) [Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.27.1...v5.28.0) **Note:** Version bump only for package [@typescript-eslint/parser](https://togithub.com/typescript-eslint/parser) #### [5.27.1](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.27.0...v5.27.1) (2022-06-06) **Note:** Version bump only for package [@typescript-eslint/parser](https://togithub.com/typescript-eslint/parser) ### [`v5.27.1`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#5271-httpsgithubcomtypescript-eslinttypescript-eslintcomparev5270v5271-2022-06-06) [Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v5.27.0...v5.27.1) **Note:** Version bump only for package [@typescript-eslint/parser](https://togithub.com/typescript-eslint/parser)evanw/esbuild
### [`v0.14.48`](https://togithub.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#01448) [Compare Source](https://togithub.com/evanw/esbuild/compare/v0.14.47...v0.14.48) - Enable using esbuild in Deno via WebAssembly ([#2323](https://togithub.com/evanw/esbuild/issues/2323)) The native implementation of esbuild is much faster than the WebAssembly version, but some people don't want to give Deno the `--allow-run` permission necessary to run esbuild and are ok waiting longer for their builds to finish when using the WebAssembly backend. With this release, you can now use esbuild via WebAssembly in Deno. To do this you will need to import from `wasm.js` instead of `mod.js`: ```js import * as esbuild from 'https://deno.land/x/esbuild@v0.14.48/wasm.js' const ts = 'let test: boolean = true' const result = await esbuild.transform(ts, { loader: 'ts' }) console.log('result:', result) ``` Make sure you run Deno with `--allow-net` so esbuild can download the WebAssembly module. Using esbuild like this starts up a worker thread that runs esbuild in parallel (unless you call `esbuild.initialize({ worker: false })` to tell esbuild to run on the main thread). If you want to, you can call `esbuild.stop()` to terminate the worker if you won't be using esbuild anymore and you want to reclaim the memory. Note that Deno appears to have a bug where background WebAssembly optimization can prevent the process from exiting for many seconds. If you are trying to use Deno and WebAssembly to run esbuild quickly, you may need to manually call `Deno.exit(0)` after your code has finished running. - Add support for font file MIME types ([#2337](https://togithub.com/evanw/esbuild/issues/2337)) This release adds support for font file MIME types to esbuild, which means they are now recognized by the built-in local web server and they are now used when a font file is loaded using the `dataurl` loader. The full set of newly-added file extension MIME type mappings is as follows: - `.eot` => `application/vnd.ms-fontobject` - `.otf` => `font/otf` - `.sfnt` => `font/sfnt` - `.ttf` => `font/ttf` - `.woff` => `font/woff` - `.woff2` => `font/woff2` - Remove `"use strict";` when targeting ESM ([#2347](https://togithub.com/evanw/esbuild/issues/2347)) All ES module code is automatically in strict mode, so a `"use strict";` directive is unnecessary. With this release, esbuild will now remove the `"use strict";` directive if the output format is ESM. This change makes the generated output file a few bytes smaller: ```js // Original code 'use strict' export let foo = 123 // Old output (with --format=esm --minify) "use strict";let t=123;export{t as foo}; // New output (with --format=esm --minify) let t=123;export{t as foo}; ``` - Attempt to have esbuild work with Deno on FreeBSD ([#2356](https://togithub.com/evanw/esbuild/issues/2356)) Deno doesn't support FreeBSD, but it's possible to build Deno for FreeBSD with some additional patches on top. This release of esbuild changes esbuild's Deno installer to download esbuild's FreeBSD binary in this situation. This configuration is unsupported although in theory everything should work. - Add some more target JavaScript engines ([#2357](https://togithub.com/evanw/esbuild/issues/2357)) This release adds the [Rhino](https://togithub.com/mozilla/rhino) and [Hermes](https://hermesengine.dev/) JavaScript engines to the set of engine identifiers that can be passed to the `--target` flag. You can use this to restrict esbuild to only using JavaScript features that are supported on those engines in the output files that esbuild generates. ### [`v0.14.47`](https://togithub.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#01447) [Compare Source](https://togithub.com/evanw/esbuild/compare/v0.14.46...v0.14.47) - Make global names more compact when `||=` is available ([#2331](https://togithub.com/evanw/esbuild/issues/2331)) With this release, the code esbuild generates for the `--global-name=` setting is now slightly shorter when you don't configure esbuild such that the `||=` operator is unsupported (e.g. with `--target=chrome80` or `--supported:logical-assignment=false`): ```js // Original code exports.foo = 123 // Old output (with --format=iife --global-name=foo.bar.baz --minify) var foo=foo||{};foo.bar=foo.bar||{};foo.bar.baz=(()=>{var b=(a,o)=>()=>(o||a((o={exports:{}}).exports,o),o.exports);var c=b(f=>{f.foo=123});return c();})(); // New output (with --format=iife --global-name=foo.bar.baz --minify) var foo;((foo||={}).bar||={}).baz=(()=>{var b=(a,o)=>()=>(o||a((o={exports:{}}).exports,o),o.exports);var c=b(f=>{f.foo=123});return c();})(); ``` - Fix `--mangle-quoted=false` with `--minify-syntax=true` If property mangling is active and `--mangle-quoted` is disabled, quoted properties are supposed to be preserved. However, there was a case when this didn't happen if `--minify-syntax` was enabled, since that internally transforms `x['y']` into `x.y` to reduce code size. This issue has been fixed: ```js // Original code x.foo = x['bar'] = { foo: y, 'bar': z } // Old output (with --mangle-props=. --mangle-quoted=false --minify-syntax=true) x.a = x.b = { a: y, bar: z }; // New output (with --mangle-props=. --mangle-quoted=false --minify-syntax=true) x.a = x.bar = { a: y, bar: z }; ``` Notice how the property `foo` is always used unquoted but the property `bar` is always used quoted, so `foo` should be consistently mangled while `bar` should be consistently not mangled. - Fix a minification bug regarding `this` and property initializers When minification is enabled, esbuild attempts to inline the initializers of variables that have only been used once into the start of the following expression to reduce code size. However, there was a bug where this transformation could change the value of `this` when the initializer is a property access and the start of the following expression is a call expression. This release fixes the bug: ```js // Original code function foo(obj) { let fn = obj.prop; fn(); } // Old output (with --minify) function foo(f){f.prop()} // New output (with --minify) function foo(o){let f=o.prop;f()} ``` ### [`v0.14.46`](https://togithub.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#01446) [Compare Source](https://togithub.com/evanw/esbuild/compare/v0.14.45...v0.14.46) - Add the ability to override support for individual syntax features ([#2060](https://togithub.com/evanw/esbuild/issues/2060), [#2290](https://togithub.com/evanw/esbuild/issues/2290), [#2308](https://togithub.com/evanw/esbuild/issues/2308)) The `target` setting already lets you configure esbuild to restrict its output by only making use of syntax features that are known to be supported in the configured target environment. For example, setting `target` to `chrome50` causes esbuild to automatically transform optional chain expressions into the equivalent older JavaScript and prevents you from using BigInts, among many other things. However, sometimes you may want to customize this set of unsupported syntax features at the individual feature level. Some examples of why you might want to do this: - JavaScript runtimes often do a quick implementation of newer syntax features that is slower than the equivalent older JavaScript, and you can get a speedup by telling esbuild to pretend this syntax feature isn't supported. For example, V8 has a [long-standing performance bug regarding object spread](https://bugs.chromium.org/p/v8/issues/detail?id=11536) that can be avoided by manually copying properties instead of using object spread syntax. Right now esbuild hard-codes this optimization if you set `target` to a V8-based runtime. - There are many less-used JavaScript runtimes in addition to the ones present in browsers, and these runtimes sometimes just decide not to implement parts of the specification, which might make sense for runtimes intended for embedded environments. For example, the developers behind Facebook's JavaScript runtime [Hermes](https://hermesengine.dev/) have decided to not implement classes despite it being a major JavaScript feature that was added seven years ago and that is used in virtually every large JavaScript project. - You may be processing esbuild's output with another tool, and you may want esbuild to transform certain features and the other tool to transform certain other features. For example, if you are using esbuild to transform files individually to ES5 but you are then feeding the output into Webpack for bundling, you may want to preserve `import()` expressions even though they are a syntax error in ES5. With this release, you can now use `--supported:feature=false` to force `feature` to be unsupported. This will cause esbuild to either rewrite code that uses the feature into older code that doesn't use the feature (if esbuild is able to), or to emit a build error (if esbuild is unable to). For example, you can use `--supported:arrow=false` to turn arrow functions into function expressions and `--supported:bigint=false` to make it an error to use a BigInt literal. You can also use `--supported:feature=true` to force it to be supported, which means esbuild will pass it through without transforming it. Keep in mind that this is an advanced feature. For most use cases you will probably want to just use `target` instead of using this. The full set of currently-allowed features are as follows: **JavaScript:** - `arbitrary-module-namespace-names` - `array-spread` - `arrow` - `async-await` - `async-generator` - `bigint` - `class` - `class-field` - `class-private-accessor` - `class-private-brand-check` - `class-private-field` - `class-private-method` - `class-private-static-accessor` - `class-private-static-field` - `class-private-static-method` - `class-static-blocks` - `class-static-field` - `const-and-let` - `default-argument` - `destructuring` - `dynamic-import` - `exponent-operator` - `export-star-as` - `for-await` - `for-of` - `generator` - `hashbang` - `import-assertions` - `import-meta` - `logical-assignment` - `nested-rest-binding` - `new-target` - `node-colon-prefix-import` - `node-colon-prefix-require` - `nullish-coalescing` - `object-accessors` - `object-extensions` - `object-rest-spread` - `optional-catch-binding` - `optional-chain` - `regexp-dot-all-flag` - `regexp-lookbehind-assertions` - `regexp-match-indices` - `regexp-named-capture-groups` - `regexp-sticky-and-unicode-flags` - `regexp-unicode-property-escapes` - `rest-argument` - `template-literal` - `top-level-await` - `typeof-exotic-object-is-object` - `unicode-escapes` **CSS:** - `hex-rgba` - `rebecca-purple` - `modern-rgb-hsl` - `inset-property` - `nesting` Since you can now specify `--supported:object-rest-spread=false` yourself to work around the V8 performance issue mentioned above, esbuild will no longer automatically transform all instances of object spread when targeting a V8-based JavaScript runtime going forward. *Note that JavaScript feature transformation is very complex and allowing full customization of the set of supported syntax features could cause bugs in esbuild due to new interactions between multiple features that were never possible before. Consider this to be an experimental feature.* - Implement `extends` constraints on `infer` type variables ([#2330](https://togithub.com/evanw/esbuild/issues/2330)) TypeScript 4.7 introduced the ability to write an `extends` constraint after an `infer` type variable, which looks like this: ```ts type FirstIfStringeslint/eslint
### [`v8.18.0`](https://togithub.com/eslint/eslint/releases/tag/v8.18.0) [Compare Source](https://togithub.com/eslint/eslint/compare/v8.17.0...v8.18.0) ##### Features - [`a6273b8`](https://togithub.com/eslint/eslint/commit/a6273b83b103c463937936ef2404575758a7baa4) feat: account for rule creation time in performance reports ([#15982](https://togithub.com/eslint/eslint/issues/15982)) (Nitin Kumar) ##### Bug Fixes - [`f364d47`](https://togithub.com/eslint/eslint/commit/f364d47013d146cdea42b27a7b24d105223f5ffe) fix: Make no-unused-vars treat for..of loops same as for..in loops ([#15868](https://togithub.com/eslint/eslint/issues/15868)) (Alex Bass) ##### Documentation - [`4871047`](https://togithub.com/eslint/eslint/commit/4871047dbd0c5ef5e4089425a85ac85dcd9cf263) docs: Update analytics, canonical URL, ads ([#15996](https://togithub.com/eslint/eslint/issues/15996)) (Nicholas C. Zakas) - [`cddad14`](https://togithub.com/eslint/eslint/commit/cddad1495fbc1750c26330f7aadc6647e2eebac3) docs: Add correct/incorrect containers ([#15998](https://togithub.com/eslint/eslint/issues/15998)) (Nicholas C. Zakas) - [`b04bc6f`](https://togithub.com/eslint/eslint/commit/b04bc6f1d558d9ad5eb57383a779fec5a170b3d3) docs: Add rules meta info to rule pages ([#15902](https://togithub.com/eslint/eslint/issues/15902)) (Nicholas C. Zakas) - [`1324f10`](https://togithub.com/eslint/eslint/commit/1324f10ac58d3685fdb656a4fc9d1e5c9d035e42) docs: unify the wording referring to optional exception ([#15893](https://togithub.com/eslint/eslint/issues/15893)) (Abdelrahman Elkady) - [`ad54d02`](https://togithub.com/eslint/eslint/commit/ad54d0246797cdd849948e7a5d31571c498af7aa) docs: add missing trailing slash to some internal links ([#15991](https://togithub.com/eslint/eslint/issues/15991)) (Milos Djermanovic) - [`df7768e`](https://togithub.com/eslint/eslint/commit/df7768e16a5ab55da97749bb89ff19f98ce0cc6c) docs: Switch to version-relative URLs ([#15978](https://togithub.com/eslint/eslint/issues/15978)) (Nicholas C. Zakas) - [`21d6479`](https://togithub.com/eslint/eslint/commit/21d647904dc30f9484b22acdd9243a6d0ecfba38) docs: change some absolute links to relative ([#15970](https://togithub.com/eslint/eslint/issues/15970)) (Milos Djermanovic) - [`f31216a`](https://togithub.com/eslint/eslint/commit/f31216a90a6204ed1fd56547772376a10f5d3ebb) docs: Update README team and sponsors (ESLint Jenkins) ##### Build Related - [`ed49f15`](https://togithub.com/eslint/eslint/commit/ed49f15fad96060501927ca27ebda1a4c736ed04) build: remove unwanted parallel and image-min for dev server ([#15986](https://togithub.com/eslint/eslint/issues/15986)) (Strek) ##### Chores - [`f6e2e63`](https://togithub.com/eslint/eslint/commit/f6e2e632fa3710cfa467b15350b08dea6e0e3dfc) chore: fix 'replaced by' rule list ([#16007](https://togithub.com/eslint/eslint/issues/16007)) (Milos Djermanovic) - [`d94dc84`](https://togithub.com/eslint/eslint/commit/d94dc84ae76a36b4ee9268c40d8536d2f5b1c63c) chore: remove unused deprecation warnings ([#15994](https://togithub.com/eslint/eslint/issues/15994)) (Francesco Trotta) - [`cdcf11e`](https://togithub.com/eslint/eslint/commit/cdcf11e457a2455bd8875d78651fec55dd148139) chore: fix versions link ([#15995](https://togithub.com/eslint/eslint/issues/15995)) (Milos Djermanovic) - [`d2a8715`](https://togithub.com/eslint/eslint/commit/d2a871543a12143fa0ecea13d7508021fd019031) chore: add trailing slash to `pathPrefix` ([#15993](https://togithub.com/eslint/eslint/issues/15993)) (Milos Djermanovic) - [`58a1bf0`](https://togithub.com/eslint/eslint/commit/58a1bf0de33adb1d54c8051090f01984daa08c86) chore: tweak URL rewriting for local previews ([#15992](https://togithub.com/eslint/eslint/issues/15992)) (Milos Djermanovic) - [`80404d2`](https://togithub.com/eslint/eslint/commit/80404d28f040df49706ba2c1e954aee945711aa9) chore: remove docs deploy workflow ([#15984](https://togithub.com/eslint/eslint/issues/15984)) (Nicholas C. Zakas) - [`71bc750`](https://togithub.com/eslint/eslint/commit/71bc75012b1377d3c7e57deea0ad06f99c4c65bf) chore: Set permissions for GitHub actions ([#15971](https://togithub.com/eslint/eslint/issues/15971)) (Naveen) - [`90ff647`](https://togithub.com/eslint/eslint/commit/90ff64742ede6ef29018cb967fc4f20d7b85b592) chore: avoid generating subdirectories for each page on new docs site ([#15967](https://togithub.com/eslint/eslint/issues/15967)) (Milos Djermanovic) ### [`v8.17.0`](https://togithub.com/eslint/eslint/releases/tag/v8.17.0) [Compare Source](https://togithub.com/eslint/eslint/compare/v8.16.0...v8.17.0) #### Features - [`55319e1`](https://togithub.com/eslint/eslint/commit/55319e133f0862a008db3557d7350f154f2c784f) feat: fix indent bug with semicolon-first style ([#15951](https://togithub.com/eslint/eslint/issues/15951)) (Milos Djermanovic) - [`f6d7920`](https://togithub.com/eslint/eslint/commit/f6d79209821241c8e03c183b5844a024da0efe8a) feat: add `allowNamedExports` option to no-use-before-define ([#15953](https://togithub.com/eslint/eslint/issues/15953)) (Milos Djermanovic) #### Bug Fixes - [`54c0953`](https://togithub.com/eslint/eslint/commit/54c09530c778eb4076d89777165d59db96c9acb5) fix: cleanup typos ([#15939](https://togithub.com/eslint/eslint/issues/15939)) (Nick Schonning) - [`845a7af`](https://togithub.com/eslint/eslint/commit/845a7af90ce03b383c8f09654ac049fc161dbb9f) fix: typo ocatal -> octal ([#15940](https://togithub.com/eslint/eslint/issues/15940)) (Nick Schonning) #### Documentation - [`b915018`](https://togithub.com/eslint/eslint/commit/b9150186bcc0f2732a69ab0ebd83a9b2fb2e6552) docs: Update website UI to latest ([#15944](https://togithub.com/eslint/eslint/issues/15944)) (Nicholas C. Zakas) - [`f0bb609`](https://togithub.com/eslint/eslint/commit/f0bb6099668f54ae6f444126b90dbb1146248146) docs: Update Exponentiation operator MDN link ([#15960](https://togithub.com/eslint/eslint/issues/15960)) (Pranjal Jain) - [`baa0153`](https://togithub.com/eslint/eslint/commit/baa01530469ec233fb60380a0960c1550f9d9a45) docs: Use correct past tense "left" instead of "leaved" ([#15950](https://togithub.com/eslint/eslint/issues/15950)) (Frederik Braun) - [`1351a9b`](https://togithub.com/eslint/eslint/commit/1351a9b875aa32a8961a68457dde03ede9ef7c78) docs: Add Resources section to rule pages ([#15901](https://togithub.com/eslint/eslint/issues/15901)) (Nicholas C. Zakas) - [`68cf0fb`](https://togithub.com/eslint/eslint/commit/68cf0fb7f645da5d992a5e749fc6c1311d30e75a) docs: cleanup typos ([#15936](https://togithub.com/eslint/eslint/issues/15936)) (Nick Schonning) - [`13b62ae`](https://togithub.com/eslint/eslint/commit/13b62aeb710a68e5d838a4d3847c487af1ba9520) docs: use-dart-sass instead of node-sass ([#15912](https://togithub.com/eslint/eslint/issues/15912)) (Deepshika S) - [`c81c5d6`](https://togithub.com/eslint/eslint/commit/c81c5d6ef1ba5808cca95ab965a162802af9b7cc) docs: add social media links ([#15920](https://togithub.com/eslint/eslint/issues/15920)) (Deepshika S) - [`0d6a50b`](https://togithub.com/eslint/eslint/commit/0d6a50b41f2fe444fd222463adad48473eaf9b7d) docs: fix openjs link ([#15917](https://togithub.com/eslint/eslint/issues/15917)) (Amaresh S M) - [`54910f5`](https://togithub.com/eslint/eslint/commit/54910f5a3bf6615f8ac03d33fd26fc1fa6dea21f) docs: display version in mobile view ([#15909](https://togithub.com/eslint/eslint/issues/15909)) (Amaresh S M) #### Chores - [`da694b9`](https://togithub.com/eslint/eslint/commit/da694b9d7cb0247541bcabbf943d1289e0e30167) chore: avoid theme flashes ([#15927](https://togithub.com/eslint/eslint/issues/15927)) (Strek) - [`f836743`](https://togithub.com/eslint/eslint/commit/f836743e95cb8ad3bdd4e88687dbe2f16bfade62) chore: Use build hook for docs deploy ([#15945](https://togithub.com/eslint/eslint/issues/15945)) (Nicholas C. Zakas) - [`ce035e5`](https://togithub.com/eslint/eslint/commit/ce035e5fac632ba8d4f1860f92465f22d6b44d42) test: cleanup typos ([#15937](https://togithub.com/eslint/eslint/issues/15937)) (Nick Schonning) - [`10249ad`](https://togithub.com/eslint/eslint/commit/10249ad1a961463b6b347be71c074951ab8e2652) chore: use addEventListener instead of addListener ([#15923](https://togithub.com/eslint/eslint/issues/15923)) (Amaresh S M) - [`5f5c1fb`](https://togithub.com/eslint/eslint/commit/5f5c1fb1083573ea511d0dae7913651db0dca772) chore: lint eleventy config file ([#15904](https://togithub.com/eslint/eslint/issues/15904)) (Milos Djermanovic) - [`8513d37`](https://togithub.com/eslint/eslint/commit/8513d37c725509c9e9ec1dbbc431f20d32632cf3) chore: update Rule typedefs ([#15915](https://togithub.com/eslint/eslint/issues/15915)) (Milos Djermanovic) - [`55534f1`](https://togithub.com/eslint/eslint/commit/55534f1a7040fad94bb5726759fbb9acb60d1c24) test: ensure no-restricted-imports works with NodeJS imports ([#15907](https://togithub.com/eslint/eslint/issues/15907)) (Nick Mazuk)Configuration
📅 Schedule: Branch creation - "on the first day of the month" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR has been generated by Mend Renovate. View repository job log here.