Fix last eslint rules

This commit is contained in:
Filipa Lacerda 2018-01-08 20:45:34 +00:00
parent 349d06688f
commit 7e3405d76c
No known key found for this signature in database
GPG Key ID: 9CA3FDE4D1E2F1C8
9 changed files with 162 additions and 149 deletions

View File

@ -16,7 +16,8 @@
"localStorage": false
},
"parserOptions": {
"parser": "babel-eslint"
"parser": "babel-eslint",
"ecmaVersion": 2017
},
"plugins": [
"filenames",

View File

@ -94,8 +94,9 @@ export default class ImageFile {
});
return [maxWidth, maxHeight];
}
views = {
// eslint-disable-next-line class-methods-use-this
views() {
return {
'two-up': function() {
return $('.two-up.view .wrap', this.file).each((function(_this) {
return function(index, wrap) {
@ -190,6 +191,7 @@ export default class ImageFile {
};
})(this));
}
};
}
requestImageInfo(img, callback) {

View File

@ -1,12 +1,12 @@
<script>
import { s__ } from '~/locale';
import tooltip from '~/vue_shared/directives/tooltip';
import icon from '~/vue_shared/components/icon.vue';
import modal from '~/vue_shared/components/modal.vue';
import eventHub from '../event_hub';
import { COMMON_STR } from '../constants';
import { s__ } from '~/locale';
import tooltip from '~/vue_shared/directives/tooltip';
import icon from '~/vue_shared/components/icon.vue';
import modal from '~/vue_shared/components/modal.vue';
import eventHub from '../event_hub';
import { COMMON_STR } from '../constants';
export default {
export default {
components: {
icon,
modal,
@ -50,7 +50,7 @@ export default {
eventHub.$emit('leaveGroup', this.group, this.parentGroup);
},
},
};
};
</script>
<template>

View File

@ -26,30 +26,18 @@
default: () => ({}),
},
},
data() {
return {
outputType: '',
};
},
computed: {
componentName() {
if (this.output.text) {
return 'code-cell';
} else if (this.output.data['image/png']) {
this.outputType = 'image/png';
return 'image-output';
} else if (this.output.data['text/html']) {
this.outputType = 'text/html';
return 'html-output';
} else if (this.output.data['image/svg+xml']) {
this.outputType = 'image/svg+xml';
return 'html-output';
}
this.outputType = 'text/plain';
return 'code-cell';
},
rawCode() {
@ -59,6 +47,19 @@
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: {
dataForType(type) {

View File

@ -305,7 +305,8 @@ js-gfm-input js-autosize markdown-area js-vue-textarea"
</textarea>
</markdown-field>
<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">
<button
@click.prevent="handleSave()"

View File

@ -115,7 +115,7 @@
name="body"
:text="text"
>
<p>{{ this.text }}</p>
<p>{{ text }}</p>
</slot>
</div>
<div

View File

@ -13,14 +13,17 @@
selectedDate: {
type: Date,
required: false,
default: null,
},
minDate: {
type: Date,
required: false,
default: null,
},
maxDate: {
type: Date,
required: false,
default: null,
},
},
mounted() {

View File

@ -23,10 +23,12 @@
minDate: {
type: Date,
required: false,
default: null,
},
maxDate: {
type: Date,
required: false,
default: null,
},
disableClickableIcons: {
type: Boolean,

View File

@ -42,14 +42,17 @@
selectedDate: {
type: Date,
required: false,
default: null,
},
minDate: {
type: Date,
required: false,
default: null,
},
maxDate: {
type: Date,
required: false,
default: null,
},
},
data() {