Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Commit

Permalink
HARP-13721: update Prettier to v2
Browse files Browse the repository at this point in the history
Signed-off-by: Daniele Bacarella <daniele.bacarella@here.com>
  • Loading branch information
dbacarel committed Jan 15, 2021
1 parent 306b1b4 commit f6874ae
Show file tree
Hide file tree
Showing 154 changed files with 1,637 additions and 1,785 deletions.
8 changes: 7 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
"project": "./tsconfig.json"
},
"rules": {
"prettier/prettier": "error",
"prettier/prettier": [
"error",
{
"arrowParens": "avoid",
"trailingComma": "none"
}
],

"@typescript-eslint/no-unused-vars": [
"error",
Expand Down
4 changes: 3 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"printWidth": 100,
"tabWidth": 4
"tabWidth": 4,
"arrowParens": "avoid",
"trailingComma": "none"
}
4 changes: 1 addition & 3 deletions @here/harp-atlas-tools/src/ImageVectorCoders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ export class ImageVectorDecoderConstructor implements ImageDecoderConstructor {
const fileBuffer: Buffer = await FileSystem.readFile(filePath);
const resize = this.targetWidth !== 0 && this.targetHeight !== 0;
const png = resize
? sharp(fileBuffer)
.resize({ width: this.targetWidth, height: this.targetHeight })
.png()
? sharp(fileBuffer).resize({ width: this.targetWidth, height: this.targetHeight }).png()
: sharp(fileBuffer).png();
const bitmap: Jimp = await Jimp.read(await png.toBuffer());
return new ImageVectorDecoder(fileBuffer, bitmap);
Expand Down
4 changes: 2 additions & 2 deletions @here/harp-datasource-protocol/test/ColorUtilsTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { assert } from "chai";

import { ColorUtils } from "../lib/ColorUtils";

describe("ColorUtils", function() {
it("support rgba in signed int range", function() {
describe("ColorUtils", function () {
it("support rgba in signed int range", function () {
const encoded = ColorUtils.getHexFromRgba(0.1, 0.5, 1.0, 0.1)!;
assert.isNumber(encoded);
assert.isBelow(encoded, 0);
Expand Down
Loading

0 comments on commit f6874ae

Please sign in to comment.