Skip to content

Commit 7392971

Browse files
authored
chore: upgrade eslint from v8 to v9 (#568)
1 parent e65cd30 commit 7392971

23 files changed

+3304
-1288
lines changed

.eslintignore

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

.eslintrc.js

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

README.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ Finally, run `webpack` using the method you normally use (e.g., via CLI or an np
7272

7373
Type:
7474

75+
<!-- eslint-skip -->
76+
7577
```ts
7678
type lessOptions = import('less').options | ((loaderContext: LoaderContext) => import('less').options})
7779
```
@@ -221,10 +223,10 @@ module.exports = {
221223
const relativePath = path.relative(rootContext, resourcePath);
222224

223225
if (relativePath === "styles/foo.less") {
224-
return "@value: 100px;" + content;
226+
return `@value: 100px;${content}`;
225227
}
226228

227-
return "@value: 200px;" + content;
229+
return `@value: 200px;${content}`;
228230
},
229231
},
230232
},
@@ -255,10 +257,10 @@ module.exports = {
255257
const relativePath = path.relative(rootContext, resourcePath);
256258

257259
if (relativePath === "styles/foo.less") {
258-
return "@value: 100px;" + content;
260+
return `@value: 100px;${content}`;
259261
}
260262

261-
return "@value: 200px;" + content;
263+
return `@value: 200px;${content}`;
262264
},
263265
},
264266
},
@@ -621,6 +623,8 @@ In order to use [Less plugins](http://lesscss.org/usage/#plugins), simply set th
621623

622624
**webpack.config.js**
623625

626+
<!-- eslint-skip -->
627+
624628
```js
625629
const CleanCSSPlugin = require('less-plugin-clean-css');
626630

@@ -646,12 +650,14 @@ module.exports = {
646650
647651
```js
648652
module.exports = {
649-
install: function (less, pluginManager, functions) {
650-
functions.add("pi", function () {
651-
// Loader context is available in `pluginManager.webpackLoaderContext`
652-
653-
return Math.PI;
654-
});
653+
install(less, pluginManager, functions) {
654+
functions.add(
655+
"pi",
656+
() =>
657+
// Loader context is available in `pluginManager.webpackLoaderContext`
658+
659+
Math.PI,
660+
);
655661
},
656662
};
657663
```

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)