mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Linter: apply all recommended biome settings
Enforces previously-skipped useArrowFunction check
This commit is contained in:
@@ -12,13 +12,13 @@ const fixtures = require('../fixtures');
|
||||
// Allow for small rounding differences between platforms
|
||||
const maxDistance = 6;
|
||||
|
||||
describe('Tint', function () {
|
||||
it('tints rgb image red', function (_t, done) {
|
||||
describe('Tint', () => {
|
||||
it('tints rgb image red', (_t, done) => {
|
||||
const output = fixtures.path('output.tint-red.jpg');
|
||||
sharp(fixtures.inputJpg)
|
||||
.resize(320, 240)
|
||||
.tint('#FF0000')
|
||||
.toFile(output, function (err, info) {
|
||||
.toFile(output, (err, info) => {
|
||||
if (err) throw err;
|
||||
assert.strictEqual(true, info.size > 0);
|
||||
fixtures.assertMaxColourDistance(output, fixtures.expected('tint-red.jpg'), maxDistance);
|
||||
@@ -26,12 +26,12 @@ describe('Tint', function () {
|
||||
});
|
||||
});
|
||||
|
||||
it('tints rgb image green', function (_t, done) {
|
||||
it('tints rgb image green', (_t, done) => {
|
||||
const output = fixtures.path('output.tint-green.jpg');
|
||||
sharp(fixtures.inputJpg)
|
||||
.resize(320, 240)
|
||||
.tint('#00FF00')
|
||||
.toFile(output, function (err, info) {
|
||||
.toFile(output, (err, info) => {
|
||||
if (err) throw err;
|
||||
assert.strictEqual(true, info.size > 0);
|
||||
fixtures.assertMaxColourDistance(output, fixtures.expected('tint-green.jpg'), maxDistance);
|
||||
@@ -39,12 +39,12 @@ describe('Tint', function () {
|
||||
});
|
||||
});
|
||||
|
||||
it('tints rgb image blue', function (_t, done) {
|
||||
it('tints rgb image blue', (_t, done) => {
|
||||
const output = fixtures.path('output.tint-blue.jpg');
|
||||
sharp(fixtures.inputJpg)
|
||||
.resize(320, 240)
|
||||
.tint('#0000FF')
|
||||
.toFile(output, function (err, info) {
|
||||
.toFile(output, (err, info) => {
|
||||
if (err) throw err;
|
||||
assert.strictEqual(true, info.size > 0);
|
||||
fixtures.assertMaxColourDistance(output, fixtures.expected('tint-blue.jpg'), maxDistance);
|
||||
@@ -52,12 +52,12 @@ describe('Tint', function () {
|
||||
});
|
||||
});
|
||||
|
||||
it('tints rgb image with sepia tone', function (_t, done) {
|
||||
it('tints rgb image with sepia tone', (_t, done) => {
|
||||
const output = fixtures.path('output.tint-sepia-hex.jpg');
|
||||
sharp(fixtures.inputJpg)
|
||||
.resize(320, 240)
|
||||
.tint('#704214')
|
||||
.toFile(output, function (err, info) {
|
||||
.toFile(output, (err, info) => {
|
||||
if (err) throw err;
|
||||
assert.strictEqual(320, info.width);
|
||||
assert.strictEqual(240, info.height);
|
||||
@@ -66,12 +66,12 @@ describe('Tint', function () {
|
||||
});
|
||||
});
|
||||
|
||||
it('tints rgb image with sepia tone with rgb colour', function (_t, done) {
|
||||
it('tints rgb image with sepia tone with rgb colour', (_t, done) => {
|
||||
const output = fixtures.path('output.tint-sepia-rgb.jpg');
|
||||
sharp(fixtures.inputJpg)
|
||||
.resize(320, 240)
|
||||
.tint([112, 66, 20])
|
||||
.toFile(output, function (err, info) {
|
||||
.toFile(output, (err, info) => {
|
||||
if (err) throw err;
|
||||
assert.strictEqual(320, info.width);
|
||||
assert.strictEqual(240, info.height);
|
||||
@@ -80,12 +80,12 @@ describe('Tint', function () {
|
||||
});
|
||||
});
|
||||
|
||||
it('tints rgb image with alpha channel', function (_t, done) {
|
||||
it('tints rgb image with alpha channel', (_t, done) => {
|
||||
const output = fixtures.path('output.tint-alpha.png');
|
||||
sharp(fixtures.inputPngRGBWithAlpha)
|
||||
.resize(320, 240)
|
||||
.tint('#704214')
|
||||
.toFile(output, function (err, info) {
|
||||
.toFile(output, (err, info) => {
|
||||
if (err) throw err;
|
||||
assert.strictEqual(320, info.width);
|
||||
assert.strictEqual(240, info.height);
|
||||
@@ -94,12 +94,12 @@ describe('Tint', function () {
|
||||
});
|
||||
});
|
||||
|
||||
it('tints cmyk image red', function (_t, done) {
|
||||
it('tints cmyk image red', (_t, done) => {
|
||||
const output = fixtures.path('output.tint-cmyk.jpg');
|
||||
sharp(fixtures.inputJpgWithCmykProfile)
|
||||
.resize(320, 240)
|
||||
.tint('#FF0000')
|
||||
.toFile(output, function (err, info) {
|
||||
.toFile(output, (err, info) => {
|
||||
if (err) throw err;
|
||||
assert.strictEqual(true, info.size > 0);
|
||||
fixtures.assertMaxColourDistance(output, fixtures.expected('tint-cmyk.jpg'), maxDistance);
|
||||
|
||||
Reference in New Issue
Block a user