Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

4 changes: 0 additions & 4 deletions .eslintrc.js

This file was deleted.

26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ Finally, run `webpack` using the method you normally use (e.g., via CLI or an np

Type:

<!-- eslint-skip -->

```ts
type lessOptions = import('less').options | ((loaderContext: LoaderContext) => import('less').options})
```
Expand Down Expand Up @@ -221,10 +223,10 @@ module.exports = {
const relativePath = path.relative(rootContext, resourcePath);

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

return "@value: 200px;" + content;
return `@value: 200px;${content}`;
},
},
},
Expand Down Expand Up @@ -255,10 +257,10 @@ module.exports = {
const relativePath = path.relative(rootContext, resourcePath);

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

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

**webpack.config.js**

<!-- eslint-skip -->

```js
const CleanCSSPlugin = require('less-plugin-clean-css');

Expand All @@ -646,12 +650,14 @@ module.exports = {

```js
module.exports = {
install: function (less, pluginManager, functions) {
functions.add("pi", function () {
// Loader context is available in `pluginManager.webpackLoaderContext`

return Math.PI;
});
install(less, pluginManager, functions) {
functions.add(
"pi",
() =>
// Loader context is available in `pluginManager.webpackLoaderContext`

Math.PI,
);
},
};
```
Expand Down
8 changes: 8 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { defineConfig } from "eslint/config";
import configs from "eslint-config-webpack/configs.js";

export default defineConfig([
{
extends: [configs["recommended-dirty"]],
},
]);
Loading
Loading