Upgrade semistandard, appease new linter rules

This commit is contained in:
Lovell Fuller
2023-09-26 21:25:15 +01:00
parent 854ed65016
commit a41c62be2b
11 changed files with 44 additions and 44 deletions

View File

@@ -190,8 +190,8 @@ async.series({
srcPath: fixtures.inputJpg,
dstPath: outputJpg,
quality: 0.8,
width: width,
height: height,
width,
height,
format: 'jpg',
filter: 'Lanczos'
}, function (err) {
@@ -795,7 +795,7 @@ async.series({
imagemagick.resize({
srcPath: fixtures.inputPngAlphaPremultiplicationLarge,
dstPath: outputPng,
width: width,
width,
height: heightPng,
filter: 'Lanczos',
customArgs: [

View File

@@ -269,7 +269,7 @@ describe('composite', () => {
.resize(80)
.composite([{
input: fixtures.inputPngWithTransparency16bit,
gravity: gravity
gravity
}])
.toBuffer((err, data, info) => {
if (err) throw err;
@@ -314,7 +314,7 @@ describe('composite', () => {
.composite([{
input: fixtures.inputPngWithTransparency16bit,
tile: true,
gravity: gravity
gravity
}])
.toBuffer((err, data, info) => {
if (err) throw err;

View File

@@ -40,7 +40,7 @@ describe('Extend', function () {
sharp(fixtures.inputWebPAnimated, { pages: -1 })
.resize(120)
.extend({
extendWith: extendWith,
extendWith,
top: 40,
bottom: 40,
left: 40,
@@ -58,7 +58,7 @@ describe('Extend', function () {
sharp(fixtures.inputJpg)
.resize(120)
.extend({
extendWith: extendWith,
extendWith,
top: 10,
bottom: 10,
left: 10,
@@ -77,7 +77,7 @@ describe('Extend', function () {
sharp(fixtures.inputPngWithTransparency16bit)
.resize(120)
.extend({
extendWith: extendWith,
extendWith,
top: 50,
left: 10,
right: 35,
@@ -94,7 +94,7 @@ describe('Extend', function () {
it(`PNG with 2 channels (${extendWith})`, function (done) {
sharp(fixtures.inputPngWithGreyAlpha)
.extend({
extendWith: extendWith,
extendWith,
top: 50,
bottom: 50,
left: 80,

View File

@@ -914,7 +914,7 @@ describe('Input/output', function () {
channels: 3,
background: { r: 0, g: 255, b: 0 }
};
sharp({ create: create })
sharp({ create })
.jpeg()
.toBuffer(function (err, data, info) {
if (err) throw err;
@@ -932,7 +932,7 @@ describe('Input/output', function () {
channels: 4,
background: { r: 255, g: 0, b: 0, alpha: 128 }
};
sharp({ create: create })
sharp({ create })
.png()
.toBuffer(function (err, data, info) {
if (err) throw err;
@@ -951,7 +951,7 @@ describe('Input/output', function () {
background: { r: 0, g: 0, b: 0 }
};
assert.throws(function () {
sharp({ create: create });
sharp({ create });
});
});
it('Missing background', function () {
@@ -961,7 +961,7 @@ describe('Input/output', function () {
channels: 3
};
assert.throws(function () {
sharp({ create: create });
sharp({ create });
});
});
});

View File

@@ -36,7 +36,7 @@ describe('JPEG', function () {
[-1, 88.2, 'test'].forEach(function (quality) {
it(quality.toString(), function () {
assert.throws(function () {
sharp().jpeg({ quality: quality });
sharp().jpeg({ quality });
});
});
});

View File

@@ -646,7 +646,7 @@ describe('Resize dimensions', function () {
].forEach(function (kernel) {
it(`kernel ${kernel}`, function (done) {
sharp(fixtures.inputJpg)
.resize(320, null, { kernel: kernel })
.resize(320, null, { kernel })
.toBuffer(function (err, data, info) {
if (err) throw err;
assert.strictEqual('jpeg', info.format);

View File

@@ -66,7 +66,7 @@ describe('Text to image', function () {
const text = sharp({
text: {
text: 'Hello, world!',
dpi: dpi
dpi
}
});
text.toFile(output, function (err, info) {
@@ -87,7 +87,7 @@ describe('Text to image', function () {
text: {
text: '<span foreground="red" font="100">red</span><span font="50" background="cyan">blue</span>',
rgba: true,
dpi: dpi
dpi
}
});
text.toFile(output, function (err, info) {
@@ -146,7 +146,7 @@ describe('Text to image', function () {
text: {
text: '<span background="cyan">cool</span>',
font: 'sans 30',
dpi: dpi,
dpi,
rgba: true
}
},

View File

@@ -125,7 +125,7 @@ describe('Tile', function () {
[1, 8192].forEach(function (size) {
assert.doesNotThrow(function () {
sharp().tile({
size: size
size
});
});
});
@@ -135,7 +135,7 @@ describe('Tile', function () {
['zoinks', 1.1, -1, 0, 8193].forEach(function (size) {
assert.throws(function () {
sharp().tile({
size: size
size
});
});
});
@@ -146,7 +146,7 @@ describe('Tile', function () {
assert.doesNotThrow(function () {
sharp().tile({
size: 8192,
overlap: overlap
overlap
});
});
});
@@ -156,7 +156,7 @@ describe('Tile', function () {
['zoinks', 1.1, -1, 8193].forEach(function (overlap) {
assert.throws(function () {
sharp().tile({
overlap: overlap
overlap
});
});
});
@@ -166,7 +166,7 @@ describe('Tile', function () {
['fs', 'zip'].forEach(function (container) {
assert.doesNotThrow(function () {
sharp().tile({
container: container
container
});
});
});
@@ -176,7 +176,7 @@ describe('Tile', function () {
['zoinks', 1].forEach(function (container) {
assert.throws(function () {
sharp().tile({
container: container
container
});
});
});
@@ -186,7 +186,7 @@ describe('Tile', function () {
['dz', 'google', 'zoomify'].forEach(function (layout) {
assert.doesNotThrow(function () {
sharp().tile({
layout: layout
layout
});
});
});
@@ -196,7 +196,7 @@ describe('Tile', function () {
['zoinks', 1].forEach(function (layout) {
assert.throws(function () {
sharp().tile({
layout: layout
layout
});
});
});
@@ -254,7 +254,7 @@ describe('Tile', function () {
[90, 270, -90].forEach(function (angle) {
assert.doesNotThrow(function () {
sharp().tile({
angle: angle
angle
});
});
});
@@ -264,7 +264,7 @@ describe('Tile', function () {
['zoinks', 1.1, -1, 27].forEach(function (angle) {
assert.throws(function () {
sharp().tile({
angle: angle
angle
});
});
});