Skip to content

Commit 1c289e4

Browse files
authored
chore: update ESlint from v8 to v9 (#409)
1 parent f540c48 commit 1c289e4

36 files changed

+4158
-1828
lines changed

.eslintignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

README.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Finally, run `webpack` using the method you normally use (e.g., via CLI or an np
6666
Type:
6767

6868
```ts
69-
type test = string | RegExp | Array<string | RegExp>;
69+
type test = string | RegExp | (string | RegExp)[];
7070
```
7171

7272
Default: `undefined`
@@ -90,7 +90,7 @@ module.exports = {
9090
Type:
9191

9292
```ts
93-
type include = string | RegExp | Array<string | RegExp>;
93+
type include = string | RegExp | (string | RegExp)[];
9494
```
9595

9696
Default: `undefined`
@@ -114,7 +114,7 @@ module.exports = {
114114
Type:
115115

116116
```ts
117-
type exclude = string | RegExp | Array<string | RegExp>;
117+
type exclude = string | RegExp | (string | RegExp)[];
118118
```
119119

120120
Default: `undefined`
@@ -164,7 +164,7 @@ type algorithm =
164164
[Symbol.toPrimitive](hint: "string"): string;
165165
},
166166
) => void,
167-
) => any);
167+
) => void);
168168
```
169169

170170
Defines the compression algorithm or function to use. Defaults to `gzip`.
@@ -212,7 +212,7 @@ module.exports = {
212212
Type:
213213

214214
```ts
215-
type compressionOptions = {
215+
interface compressionOptions {
216216
flush?: number;
217217
finishFlush?: number;
218218
chunkSize?: number;
@@ -223,7 +223,7 @@ type compressionOptions = {
223223
dictionary?: Buffer | TypedArray | DataView | ArrayBuffer;
224224
info?: boolean;
225225
maxOutputLength?: number;
226-
};
226+
}
227227
```
228228

229229
Default: `{ level: 9 }`
@@ -401,10 +401,9 @@ Example:
401401
module.exports = {
402402
plugins: [
403403
new CompressionPlugin({
404-
deleteOriginalAssets: (assetName) => {
404+
deleteOriginalAssets: (assetName) =>
405405
// Delete all assets except images
406-
return !assetName.endsWith(".png") && !assetName.endsWith(".jpg");
407-
},
406+
!assetName.endsWith(".png") && !assetName.endsWith(".jpg"),
408407
}),
409408
],
410409
};
@@ -500,7 +499,7 @@ You can take advantage of this built-in support for Brotli in Node 10.16.0 and l
500499
**webpack.config.js**
501500

502501
```js
503-
const zlib = require("zlib");
502+
const zlib = require("node:zlib");
504503

505504
module.exports = {
506505
plugins: [
@@ -535,7 +534,7 @@ You can take advantage of this built-in support for zstd in Node 22.15.0 and lat
535534
**webpack.config.js**
536535

537536
```js
538-
const zlib = require("zlib");
537+
const zlib = require("node:zlib");
539538

540539
module.exports = {
541540
plugins: [
@@ -563,7 +562,7 @@ You can find all Zstandard's options in [the relevant part of the zlib module do
563562
**webpack.config.js**
564563

565564
```js
566-
const zlib = require("zlib");
565+
const zlib = require("node:zlib");
567566

568567
module.exports = {
569568
plugins: [

eslint.config.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { defineConfig } from "eslint/config";
2+
import configs from "eslint-config-webpack/configs.js";
3+
4+
export default defineConfig([
5+
{
6+
extends: [configs["recommended-dirty"]],
7+
},
8+
]);

0 commit comments

Comments
 (0)