Skip to content

Commit 8201e5b

Browse files
committed
chore: update ESlint from v8 to v9
1 parent a3e0e6d commit 8201e5b

39 files changed

+7305
-4303
lines changed

.eslintignore

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

.eslintrc.js

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

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ Then add the plugin to your `webpack` configuration. For example:
4242
**webpack.config.js**
4343

4444
```js
45-
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
4645
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
46+
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
4747

4848
module.exports = {
4949
module: {
@@ -296,15 +296,15 @@ module.exports = {
296296
minify: [
297297
CssMinimizerPlugin.cssnanoMinify,
298298
CssMinimizerPlugin.cleanCssMinify,
299-
async (data, inputMap, minimizerOptions) => {
299+
async (data, inputMap, minimizerOptions) =>
300300
// Custom minifier function
301-
return {
302-
code: `a{color: red}`,
303-
map: `{"version": "3", ...}`,
301+
({
302+
code: "a{color: red}",
303+
map: "{\"version\": \"3\", ...}",
304304
warnings: [],
305305
errors: [],
306-
};
307-
},
306+
})
307+
,
308308
],
309309
}),
310310
],

eslint.config.mjs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { defineConfig } from "eslint/config";
2+
import configs from "eslint-config-webpack/configs.js";
3+
import n from "eslint-plugin-n";
4+
5+
export default defineConfig([
6+
{
7+
extends: [configs["recommended-dirty"]],
8+
plugins: {
9+
n,
10+
},
11+
rules: {
12+
// Disable experimental Node.js API warnings for os.availableParallelism
13+
// This API is widely supported and stable in practice
14+
"n/no-unsupported-features/node-builtins": [
15+
"error",
16+
{
17+
ignores: ["os.availableParallelism"],
18+
},
19+
],
20+
},
21+
},
22+
]);

0 commit comments

Comments
 (0)