From 808be45e1b2522398fc4b44e560396dee388c062 Mon Sep 17 00:00:00 2001 From: Jacob Larsson Date: Tue, 5 Sep 2017 15:24:30 +0200 Subject: [PATCH] Added tslint file --- types/fancybox/fancybox-tests.ts | 6 +++--- types/fancybox/index.d.ts | 1 - types/fancybox/tslint.json | 7 +++++++ 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 types/fancybox/tslint.json diff --git a/types/fancybox/fancybox-tests.ts b/types/fancybox/fancybox-tests.ts index eac3f31771..ea6cb7bed4 100644 --- a/types/fancybox/fancybox-tests.ts +++ b/types/fancybox/fancybox-tests.ts @@ -23,7 +23,7 @@ $.fancybox.update(); $.fancybox.toggle(); $.fancybox.showLoading(); $.fancybox.hideLoading(); -$(".selector").fancybox({ 'type': 'image' }); +$(".selector").fancybox({ type: 'image' }); $("#single_1").fancybox({ helpers: { title: { @@ -114,7 +114,7 @@ $(".fancybox").fancybox({ }); $(".fancybox").fancybox({ beforeLoad: () => { - this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : ''); + this.title = this.title ? `Image ${this.index + 1} of ${this.group.length} - ${this.title}` : `Image ${this.index + 1} of ${this.group.length}`; } }); $.fancybox('

Lorem Lipsum

Lorem lipsum

', { @@ -142,4 +142,4 @@ $.fancybox([ $(".fancybox").fancybox({ margin: [20, 60, 20, 60] -}); \ No newline at end of file +}); diff --git a/types/fancybox/index.d.ts b/types/fancybox/index.d.ts index b2e563c367..bafdb142b3 100644 --- a/types/fancybox/index.d.ts +++ b/types/fancybox/index.d.ts @@ -4,7 +4,6 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 - /// interface FancyboxOptions extends FancyboxCallback { diff --git a/types/fancybox/tslint.json b/types/fancybox/tslint.json new file mode 100644 index 0000000000..1b62a88e52 --- /dev/null +++ b/types/fancybox/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "ban-types": false, + "unified-signatures": false + } +}