Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 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
3 changes: 2 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"package-lock.json",
"node_modules",
"coverage",
"*.log"
"*.log",
"test/fixtures/**"
]
}
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

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

This file was deleted.

26 changes: 10 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ module.exports = {
},
// If absolute path is a `glob` we replace backslashes with forward slashes, because only forward slashes can be used in the `glob`
path.posix.join(
path.resolve(__dirname, "src").replace(/\\/g, "/"),
path.resolve(__dirname, "src").replaceAll("\\", "/"),
"*.txt",
),
],
Expand Down Expand Up @@ -184,7 +184,7 @@ module.exports = {
{
// If absolute path is a `glob` we replace backslashes with forward slashes, because only forward slashes can be used in the `glob`
from: path.posix.join(
path.resolve(__dirname, "fixtures").replace(/\\/g, "/"),
path.resolve(__dirname, "fixtures").replaceAll("\\", "/"),
"*.txt",
),
},
Expand Down Expand Up @@ -397,7 +397,7 @@ Default: `undefined`
**webpack.config.js**

```js
const fs = require("fs").promise;
const fs = require("node:fs").promise;

module.exports = {
plugins: [
Expand Down Expand Up @@ -684,19 +684,13 @@ Type:
type cache =
| boolean
| {
keys: {
[key: string]: any;
};
keys: Record<string>;
}
| {
keys: (
defaultCacheKeys: {
[key: string]: any;
},
defaultCacheKeys: Record<string>,
absoluteFilename: string,
) => Promise<{
[key: string]: any;
}>;
) => Promise<Record<string>>;
}
| undefined;
```
Expand Down Expand Up @@ -849,7 +843,7 @@ type transformAll = (
sourceFilename: string;
absoluteFilename: string;
}[],
) => any;
) => string[];
```

Default: `undefined`
Expand Down Expand Up @@ -923,13 +917,13 @@ Type:

```ts
type info =
| Record<string, any>
| Record<string>
| ((item: {
absoluteFilename: string;
sourceFilename: string;
filename: string;
toType: ToType;
}) => Record<string, any>);
}) => Record<string>);
```

Default: `undefined`
Expand Down Expand Up @@ -1181,7 +1175,7 @@ module.exports = {
patterns: [
{
from: path.posix.join(
path.resolve(__dirname, "src").replace(/\\/g, "/"),
path.resolve(__dirname, "src").replaceAll("\\", "/"),
"**/*",
),
globOptions: {
Expand Down
12 changes: 12 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineConfig } from "eslint/config";
import configs from "eslint-config-webpack/configs.js";

export default defineConfig([
{
extends: [configs["recommended-dirty"]],
rules: {
"jsdoc/require-property-description": "off",
"jest/expect-expect": "off",
},
},
]);
8 changes: 4 additions & 4 deletions globalSetup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const path = require("path");
const fs = require("fs");
const fs = require("node:fs");
const path = require("node:path");

const removeIllegalCharacterForWindows = require("./test/helpers/removeIllegalCharacterForWindows");

Expand All @@ -12,11 +12,11 @@ const specialFiles = {
};

module.exports = () => {
Object.keys(specialFiles).forEach((originFile) => {
for (const originFile of Object.keys(specialFiles)) {
const file = removeIllegalCharacterForWindows(originFile);
const dir = path.dirname(file);

fs.mkdirSync(path.join(baseDir, dir), { recursive: true });
fs.writeFileSync(path.join(baseDir, file), specialFiles[originFile]);
});
}
};
Loading
Loading