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
2 changes: 2 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46947,7 +46947,9 @@ function parseCatImage(value) {
if (!Array.isArray(images) || images.length === 0)
throw new Error('cat api returned no images');
const url = images[0]?.url;
// a plain Error on purpose: fetchCatImage retries a TypeError as a network failure, and a malformed 2xx must not be retried
if (typeof url !== 'string')
// eslint-disable-next-line unicorn/prefer-type-error
throw new Error('cat api returned an invalid image record');
if (url.length > 4096)
throw new Error('cat api returned an excessively long image url');
Expand Down
5 changes: 5 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ export default antfu({
// Go templates, not yaml
'charts/*/templates/**',
],
rules: {
// new in @antfu/eslint-config 10: it would re-wrap ~3700 one-line objects
// and calls across src/ and __tests__/; the existing layout stays
'antfu/reasonable-newline': 'off',
},
}, {
files: ['__tests__/**/*.test.ts'],
rules: {
Expand Down
Loading
Loading