-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy patherrors.js
27 lines (22 loc) · 1.05 KB
/
errors.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
const pkg = require('../../package.json');
const [homepage] = pkg.homepage.split('#');
const linkify = (file) => `${homepage}/blob/master/${file}`;
module.exports = {
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}\`.`,
}),
EINVALIDRESPECTIGNOREFILE: ({respectIgnoreFile}) => ({
message: 'Invalid `respectIgnoreFile` option.',
details: `The [respectIgnoreFile option](${linkify('README.md#options')}) option must be a \`boolean\`.
Your configuration for the \`respectIgnoreFile\` option is \`${respectIgnoreFile}\`.`,
}),
};