chore: Fix Eslint warnings (#3654)

* Fix all the eslint warnings

* Revert the schema
This commit is contained in:
Muhsin Keloth 2021-12-27 13:49:31 +05:30 committed by GitHub
parent 28da30f7e4
commit 9606abe251
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 63 additions and 50 deletions

View file

@ -28,9 +28,7 @@ module.exports = {
}],
'vue/html-self-closing': 'off',
"vue/no-v-html": 'off',
'vue/singleline-html-element-content-newline': 'warn',
'vue/require-default-prop': 'warn',
'vue/require-prop-types': 'warn',
'vue/singleline-html-element-content-newline': 'off',
'import/extensions': ['off']
},

View file

@ -11,7 +11,7 @@
<script>
export default {
props: {
message: String,
message: { type: String, default: '' },
showButton: Boolean,
duration: {
type: [String, Number],

View file

@ -18,12 +18,11 @@
export default {
props: {
disabled: Boolean,
isFullwidth: Boolean,
type: String,
size: String,
type: { type: String, default: '' },
size: { type: String, default: '' },
checked: Boolean,
name: String,
id: String,
name: { type: String, default: '' },
id: { type: String, default: '' },
},
data() {
return {

View file

@ -12,9 +12,9 @@
<script>
export default {
props: {
title: String,
message: String,
buttonText: String,
title: { type: String, default: '' },
message: { type: String, default: '' },
buttonText: { type: String, default: '' },
},
};
</script>

View file

@ -1,12 +1,12 @@
<template>
<div class="row loading-state">
<h6 class="message">{{ message }}<span class="spinner"></span></h6>
<h6 class="message">{{ message }}<span class="spinner" /></h6>
</div>
</template>
<script>
export default {
props: {
message: String,
message: { type: String, default: '' },
},
};
</script>

View file

@ -18,12 +18,12 @@
<script>
export default {
props: {
heading: String,
point: [Number, String],
index: Number,
desc: String,
heading: { type: String, default: '' },
point: { type: [Number, String], default: '' },
index: { type: Number, default: null },
desc: { type: String, default: '' },
selected: Boolean,
onClick: Function,
onClick: { type: Function, default: () => {} },
},
};
</script>

View file

@ -21,12 +21,12 @@ export default {
},
props: {
show: Boolean,
onClose: Function,
onConfirm: Function,
title: String,
message: String,
confirmText: String,
rejectText: String,
onClose: { type: Function, default: () => {} },
onConfirm: { type: Function, default: () => {} },
title: { type: String, default: '' },
message: { type: String, default: '' },
confirmText: { type: String, default: '' },
rejectText: { type: String, default: '' },
},
};
</script>

View file

@ -57,9 +57,9 @@ export default {
WootSubmitButton,
},
props: {
resetPasswordToken: String,
redirectUrl: String,
config: String,
resetPasswordToken: { type: String, default: '' },
redirectUrl: { type: String, default: '' },
config: { type: String, default: '' },
},
data() {
return {

View file

@ -10,8 +10,8 @@
<script>
export default {
props: {
headerTitle: String,
headerContent: String,
headerTitle: { type: String, default: '' },
headerContent: { type: String, default: '' },
},
};
</script>

View file

@ -25,9 +25,9 @@ export default {
SettingsHeader,
},
props: {
headerTitle: String,
headerButtonText: String,
icon: String,
headerTitle: { type: String, default: '' },
headerButtonText: { type: String, default: '' },
icon: { type: String, default: '' },
keepAlive: {
type: Boolean,
default: true,

View file

@ -61,10 +61,10 @@ export default {
Modal,
},
props: {
id: Number,
edcontent: String,
edshortCode: String,
onClose: Function,
id: { type: Number, default: null },
edcontent: { type: String, default: '' },
edshortCode: { type: String, default: '' },
onClose: { type: Function, default: () => {} },
},
data() {
return {

View file

@ -47,8 +47,8 @@ export default {
mixins: [globalConfigMixin],
props: {
integrationId: {
type: String,
default: '',
type: [String, Number],
required: true,
},
integrationLogo: {
type: String,

View file

@ -68,14 +68,17 @@ import globalConfigMixin from 'shared/mixins/globalConfigMixin';
export default {
mixins: [alertMixin, globalConfigMixin],
props: [
'integrationId',
'integrationLogo',
'integrationName',
'integrationDescription',
'integrationEnabled',
'integrationAction',
],
props: {
integrationId: {
type: [String, Number],
required: true,
},
integrationLogo: { type: String, default: '' },
integrationName: { type: String, default: '' },
integrationDescription: { type: String, default: '' },
integrationEnabled: { type: Boolean, default: false },
integrationAction: { type: String, default: '' },
},
data() {
return {
showDeleteConfirmationPopup: false,

View file

@ -33,7 +33,14 @@ export default {
IntegrationHelpText,
},
mixins: [globalConfigMixin],
props: ['integrationId', 'code'],
props: {
integrationId: {
type: [String, Number],
required: true,
},
code: { type: String, default: '' },
},
data() {
return {
integrationLoaded: false,

View file

@ -56,7 +56,7 @@ export default {
};
},
watch: {
value: function(newValue) {
value(newValue) {
this.greetingsMessage = newValue;
},
},

View file

@ -19,7 +19,11 @@
<script>
export default {
props: ['url', 'thumb', 'readableTime'],
props: {
url: { type: String, default: '' },
thumb: { type: String, default: '' },
readableTime: { type: String, default: '' },
},
methods: {
onImgError() {
this.$emit('error');

View file

@ -11,9 +11,11 @@ export default {
props: {
src: {
type: String,
default: '',
},
size: {
type: String,
default: '',
},
},
computed: {