Fix last eslint rules
This commit is contained in:
parent
349d06688f
commit
7e3405d76c
|
@ -16,7 +16,8 @@
|
||||||
"localStorage": false
|
"localStorage": false
|
||||||
},
|
},
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"parser": "babel-eslint"
|
"parser": "babel-eslint",
|
||||||
|
"ecmaVersion": 2017
|
||||||
},
|
},
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"filenames",
|
"filenames",
|
||||||
|
|
|
@ -94,8 +94,9 @@ export default class ImageFile {
|
||||||
});
|
});
|
||||||
return [maxWidth, maxHeight];
|
return [maxWidth, maxHeight];
|
||||||
}
|
}
|
||||||
|
// eslint-disable-next-line class-methods-use-this
|
||||||
views = {
|
views() {
|
||||||
|
return {
|
||||||
'two-up': function() {
|
'two-up': function() {
|
||||||
return $('.two-up.view .wrap', this.file).each((function(_this) {
|
return $('.two-up.view .wrap', this.file).each((function(_this) {
|
||||||
return function(index, wrap) {
|
return function(index, wrap) {
|
||||||
|
@ -190,6 +191,7 @@ export default class ImageFile {
|
||||||
};
|
};
|
||||||
})(this));
|
})(this));
|
||||||
}
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
requestImageInfo(img, callback) {
|
requestImageInfo(img, callback) {
|
||||||
|
|
|
@ -26,30 +26,18 @@
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
outputType: '',
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
componentName() {
|
componentName() {
|
||||||
if (this.output.text) {
|
if (this.output.text) {
|
||||||
return 'code-cell';
|
return 'code-cell';
|
||||||
} else if (this.output.data['image/png']) {
|
} else if (this.output.data['image/png']) {
|
||||||
this.outputType = 'image/png';
|
|
||||||
|
|
||||||
return 'image-output';
|
return 'image-output';
|
||||||
} else if (this.output.data['text/html']) {
|
} else if (this.output.data['text/html']) {
|
||||||
this.outputType = 'text/html';
|
|
||||||
|
|
||||||
return 'html-output';
|
return 'html-output';
|
||||||
} else if (this.output.data['image/svg+xml']) {
|
} else if (this.output.data['image/svg+xml']) {
|
||||||
this.outputType = 'image/svg+xml';
|
|
||||||
|
|
||||||
return 'html-output';
|
return 'html-output';
|
||||||
}
|
}
|
||||||
|
|
||||||
this.outputType = 'text/plain';
|
|
||||||
return 'code-cell';
|
return 'code-cell';
|
||||||
},
|
},
|
||||||
rawCode() {
|
rawCode() {
|
||||||
|
@ -59,6 +47,19 @@
|
||||||
|
|
||||||
return this.dataForType(this.outputType);
|
return this.dataForType(this.outputType);
|
||||||
},
|
},
|
||||||
|
outputType() {
|
||||||
|
if (this.output.text) {
|
||||||
|
return '';
|
||||||
|
} else if (this.output.data['image/png']) {
|
||||||
|
return 'image/png';
|
||||||
|
} else if (this.output.data['text/html']) {
|
||||||
|
return 'text/html';
|
||||||
|
} else if (this.output.data['image/svg+xml']) {
|
||||||
|
return 'image/svg+xml';
|
||||||
|
}
|
||||||
|
|
||||||
|
return 'text/plain';
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
dataForType(type) {
|
dataForType(type) {
|
||||||
|
|
|
@ -305,7 +305,8 @@ js-gfm-input js-autosize markdown-area js-vue-textarea"
|
||||||
</textarea>
|
</textarea>
|
||||||
</markdown-field>
|
</markdown-field>
|
||||||
<div class="note-form-actions">
|
<div class="note-form-actions">
|
||||||
<div class="pull-left btn-group
|
<div
|
||||||
|
class="pull-left btn-group
|
||||||
append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown">
|
append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown">
|
||||||
<button
|
<button
|
||||||
@click.prevent="handleSave()"
|
@click.prevent="handleSave()"
|
||||||
|
|
|
@ -115,7 +115,7 @@
|
||||||
name="body"
|
name="body"
|
||||||
:text="text"
|
:text="text"
|
||||||
>
|
>
|
||||||
<p>{{ this.text }}</p>
|
<p>{{ text }}</p>
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -13,14 +13,17 @@
|
||||||
selectedDate: {
|
selectedDate: {
|
||||||
type: Date,
|
type: Date,
|
||||||
required: false,
|
required: false,
|
||||||
|
default: null,
|
||||||
},
|
},
|
||||||
minDate: {
|
minDate: {
|
||||||
type: Date,
|
type: Date,
|
||||||
required: false,
|
required: false,
|
||||||
|
default: null,
|
||||||
},
|
},
|
||||||
maxDate: {
|
maxDate: {
|
||||||
type: Date,
|
type: Date,
|
||||||
required: false,
|
required: false,
|
||||||
|
default: null,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
|
@ -23,10 +23,12 @@
|
||||||
minDate: {
|
minDate: {
|
||||||
type: Date,
|
type: Date,
|
||||||
required: false,
|
required: false,
|
||||||
|
default: null,
|
||||||
},
|
},
|
||||||
maxDate: {
|
maxDate: {
|
||||||
type: Date,
|
type: Date,
|
||||||
required: false,
|
required: false,
|
||||||
|
default: null,
|
||||||
},
|
},
|
||||||
disableClickableIcons: {
|
disableClickableIcons: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
|
|
@ -42,14 +42,17 @@
|
||||||
selectedDate: {
|
selectedDate: {
|
||||||
type: Date,
|
type: Date,
|
||||||
required: false,
|
required: false,
|
||||||
|
default: null,
|
||||||
},
|
},
|
||||||
minDate: {
|
minDate: {
|
||||||
type: Date,
|
type: Date,
|
||||||
required: false,
|
required: false,
|
||||||
|
default: null,
|
||||||
},
|
},
|
||||||
maxDate: {
|
maxDate: {
|
||||||
type: Date,
|
type: Date,
|
||||||
required: false,
|
required: false,
|
||||||
|
default: null,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|
Loading…
Reference in New Issue