Skip to content

Commit

Permalink
Fix linting error
Browse files Browse the repository at this point in the history
Fixes #76.
  • Loading branch information
sisou committed Mar 2, 2020
1 parent a8d9f09 commit 0bde886
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
8 changes: 7 additions & 1 deletion src/components/Amount.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ export default class Amount extends Vue {
// skip validation for minDecimals and maxDecimals if they're overwritten by decimals
return;
}
if (decimals !== undefined && (decimals < 0 || decimals > this.currencyDecimals || !Number.isInteger(decimals))) {
if (
decimals !== undefined && (
decimals < 0
|| decimals > this.currencyDecimals
|| !Number.isInteger(decimals)
)
) {
throw new Error('Amount: decimals is not in range');
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/AmountInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default class AmountInput extends Vue {
input: HTMLInputElement,
widthPlaceholder: HTMLSpanElement,
widthValue: HTMLSpanElement,
}
};
@Prop({type: Number}) private value?: number;
@Prop({type: Number, default: 8}) private maxFontSize!: number;
Expand Down
2 changes: 1 addition & 1 deletion src/components/CircleSpinner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</template>

<script lang="ts">
export default {}
export default {};
</script>

<style scoped>
Expand Down
7 changes: 5 additions & 2 deletions src/components/Tooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { AlertTriangleIcon } from './Icons';
@Component({ components: { AlertTriangleIcon }})
export default class Tooltip extends Vue {
// Only $el of the reference is of interest
@Prop(Object) public reference?: {$el : HTMLElement};
@Prop(Object) public reference?: {$el: HTMLElement};
// Typing of $refs and $el, in order to not having to cast it everywhere.
public $refs!: {
Expand Down Expand Up @@ -86,7 +86,10 @@ export default class Tooltip extends Vue {
if (this.reference && this.$el) {
const referenceLeftPad = parseInt(
window.getComputedStyle(this.reference.$el, null).getPropertyValue('padding-left'), 10);
this.left = this.reference.$el.getBoundingClientRect().left - this.$el.getBoundingClientRect().left + referenceLeftPad;
this.left =
this.reference.$el.getBoundingClientRect().left
- this.$el.getBoundingClientRect().left
+ referenceLeftPad;
if (this.reference.$el.scrollTop < this.$el.offsetTop - this.height) {
this.tooltipPosition = 'top';
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
]
},
"include": [
"types/svg.d.ts"
"types/svg.d.ts",
"src/main.ts" // Must be included for TSLint to work
// "src/**/*.ts",
// "src/**/*.tsx",
// "src/**/*.vue",
Expand Down

0 comments on commit 0bde886

Please sign in to comment.