Skip to content

Commit

Permalink
Fix eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gfaudriga committed Mar 25, 2024
1 parent 955b6b8 commit 87632bd
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/components/Message.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ import { NcButton } from '@nextcloud/vue'
import { html, plain } from '../util/text.js'
import { isPgpgMessage } from '../crypto/pgp.js'
import Itinerary from './Itinerary.vue'
import Schema from './Schema'
import Schema from './Schema.vue'
import MessageAttachments from './MessageAttachments.vue'
import MessageEncryptedBody from './MessageEncryptedBody.vue'
import MessageHTMLBody from './MessageHTMLBody.vue'
Expand Down
6 changes: 3 additions & 3 deletions src/components/Schema.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@

<script>
import Jsonld2html from 'jsonld2html-cards'
import SchemaActionBar from './SchemaActionBar'
import SchemaActionBar from './SchemaActionBar.vue'

export default {
name: 'Schema',
components: {
SchemaActionBar,
SchemaActionBar,
},
props: {
json: {
Expand Down Expand Up @@ -65,7 +65,7 @@ export default {
},
async updateData(updatedValues) {
for (const key in updatedValues) {
if (this.data.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(this.data, key)) {
this.data[key] = updatedValues[key]
}
}
Expand Down
19 changes: 11 additions & 8 deletions src/components/SchemaActionBar.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<!-- eslint-disable n/no-missing-import -->
<!-- eslint-disable import/no-unresolved -->
<!-- eslint-disable import/no-unresolved -->
<!--
-
- @copyright Copyright (c) 2023, Gerke Frölje <[email protected]>
Expand Down Expand Up @@ -75,12 +78,12 @@

import { NcActionButton } from '@nextcloud/vue'
import NcActions from '@nextcloud/vue/dist/Components/NcActions.js'
import SilverwareForkKnifeIcon from 'vue-material-design-icons/SilverwareForkKnife'
import CheckIcon from 'vue-material-design-icons/Check'
import CloseIcon from 'vue-material-design-icons/Close'
import OpenInNewIcon from 'vue-material-design-icons/OpenInNew'
import MapMarkerIcon from 'vue-material-design-icons/MapMarker'
import MapSearchOutlineIcon from 'vue-material-design-icons/MapSearchOutline'
import SilverwareForkKnifeIcon from 'vue-material-design-icons/SilverwareForkKnife.vue'
import CheckIcon from 'vue-material-design-icons/Check.vue'
import CloseIcon from 'vue-material-design-icons/Close.vue'
import OpenInNewIcon from 'vue-material-design-icons/OpenInNew.vue'
import MapMarkerIcon from 'vue-material-design-icons/MapMarker.vue'
import MapSearchOutlineIcon from 'vue-material-design-icons/MapSearchOutline.vue'
import IconLoading from '@nextcloud/vue/dist/Components/NcLoadingIcon.js'

export default {
Expand Down Expand Up @@ -108,10 +111,10 @@ export default {
return this.$parent.json['@type']
},
hasUrlValue() {
return this.$parent.json.hasOwnProperty('url')
return Object.prototype.hasOwnProperty.call(this.$parent.json, 'url')
},
hasLiveUri() {
return this.$parent.json.hasOwnProperty('liveUri')
return Object.prototype.hasOwnProperty.call(this.$parent.json, 'liveUri')
},
},
methods: {
Expand Down
16 changes: 4 additions & 12 deletions src/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1503,25 +1503,17 @@ export default {
},
async sendRecipeToCookbook({ commit }, { recipe }) {
return handleHttpAuthErrors(commit, async () => {
try {
const result = await sendRecipe(recipe)
const result = await sendRecipe(recipe)

return result
} catch (e) {
throw e
}
return result
})
},

async callLiveUri({ commit }, { liveUri }) {
return handleHttpAuthErrors(commit, async () => {
try {
const result = await updateSchema(liveUri)
const result = await updateSchema(liveUri)

return result
} catch (e) {
throw e
}
return result
})
},
}

0 comments on commit 87632bd

Please sign in to comment.