Apply new ESLint rules to legacy code
This commit is contained in:
parent
91cf075697
commit
8a2c17f65f
70 changed files with 376 additions and 516 deletions
|
@ -7,17 +7,13 @@ const DEFAULT_JPEG_QUALITY = 0.85;
|
|||
// Documentation for `options` (`LoadImageOptions`):
|
||||
// https://github.com/blueimp/JavaScript-Load-Image/tree/v2.18.0#options
|
||||
exports.autoOrientImage = (fileOrBlobOrURL, options = {}) => {
|
||||
const optionsWithDefaults = Object.assign(
|
||||
{
|
||||
type: 'image/jpeg',
|
||||
quality: DEFAULT_JPEG_QUALITY,
|
||||
},
|
||||
options,
|
||||
{
|
||||
canvas: true,
|
||||
orientation: true,
|
||||
}
|
||||
);
|
||||
const optionsWithDefaults = {
|
||||
type: 'image/jpeg',
|
||||
quality: DEFAULT_JPEG_QUALITY,
|
||||
...options,
|
||||
canvas: true,
|
||||
orientation: true,
|
||||
};
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
loadImage(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue