-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy patherrors.js
More file actions
21 lines (17 loc) · 782 Bytes
/
errors.js
File metadata and controls
21 lines (17 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import pkg from "../../package.json" with { type: "json" };
const [homepage] = pkg.homepage.split("#");
const linkify = (file) => `${homepage}/blob/master/${file}`;
export default {
EINVALIDASSETS: ({ assets }) => ({
message: "Invalid `assets` option.",
details: `The [assets option](${linkify(
"README.md#assets",
)}) option must be an \`Array\` of \`Strings\` or \`Objects\` with a \`path\` property.
Your configuration for the \`assets\` option is \`${assets}\`.`,
}),
EINVALIDMESSAGE: ({ message }) => ({
message: "Invalid `message` option.",
details: `The [message option](${linkify("README.md#message")}) option, if defined, must be a non empty \`String\`.
Your configuration for the \`successComment\` option is \`${message}\`.`,
}),
};