Skip to content

Commit 0bde886

Browse files
committed
Fix linting error
Fixes #76.
1 parent a8d9f09 commit 0bde886

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

src/components/Amount.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ export default class Amount extends Vue {
3030
// skip validation for minDecimals and maxDecimals if they're overwritten by decimals
3131
return;
3232
}
33-
if (decimals !== undefined && (decimals < 0 || decimals > this.currencyDecimals || !Number.isInteger(decimals))) {
33+
if (
34+
decimals !== undefined && (
35+
decimals < 0
36+
|| decimals > this.currencyDecimals
37+
|| !Number.isInteger(decimals)
38+
)
39+
) {
3440
throw new Error('Amount: decimals is not in range');
3541
}
3642
}

src/components/AmountInput.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default class AmountInput extends Vue {
2525
input: HTMLInputElement,
2626
widthPlaceholder: HTMLSpanElement,
2727
widthValue: HTMLSpanElement,
28-
}
28+
};
2929
3030
@Prop({type: Number}) private value?: number;
3131
@Prop({type: Number, default: 8}) private maxFontSize!: number;

src/components/CircleSpinner.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
</template>
44

55
<script lang="ts">
6-
export default {}
6+
export default {};
77
</script>
88

99
<style scoped>

src/components/Tooltip.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import { AlertTriangleIcon } from './Icons';
3636
@Component({ components: { AlertTriangleIcon }})
3737
export default class Tooltip extends Vue {
3838
// Only $el of the reference is of interest
39-
@Prop(Object) public reference?: {$el : HTMLElement};
39+
@Prop(Object) public reference?: {$el: HTMLElement};
4040
4141
// Typing of $refs and $el, in order to not having to cast it everywhere.
4242
public $refs!: {
@@ -86,7 +86,10 @@ export default class Tooltip extends Vue {
8686
if (this.reference && this.$el) {
8787
const referenceLeftPad = parseInt(
8888
window.getComputedStyle(this.reference.$el, null).getPropertyValue('padding-left'), 10);
89-
this.left = this.reference.$el.getBoundingClientRect().left - this.$el.getBoundingClientRect().left + referenceLeftPad;
89+
this.left =
90+
this.reference.$el.getBoundingClientRect().left
91+
- this.$el.getBoundingClientRect().left
92+
+ referenceLeftPad;
9093
9194
if (this.reference.$el.scrollTop < this.$el.offsetTop - this.height) {
9295
this.tooltipPosition = 'top';

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
]
2929
},
3030
"include": [
31-
"types/svg.d.ts"
31+
"types/svg.d.ts",
32+
"src/main.ts" // Must be included for TSLint to work
3233
// "src/**/*.ts",
3334
// "src/**/*.tsx",
3435
// "src/**/*.vue",

0 commit comments

Comments
 (0)