Skip to content

Commit

Permalink
fix: ESLint errors
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Molenaar <[email protected]>
  • Loading branch information
SMillerDev committed Jan 2, 2024
1 parent b226b6f commit 38af3a7
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 32 deletions.
2 changes: 1 addition & 1 deletion src/components/AdminSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ import { confirmPassword } from '@nextcloud/password-confirmation'
* Debounce helper for method
* TODO: Should we remove this and use library?
*
* @param {function()} func - The callback function
* @param {Function} func - The callback function
* @param {number} wait - Time to wait in miliseconds
*/
function debounce(func, wait) {
Expand Down
4 changes: 4 additions & 0 deletions src/components/ContentTemplate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ watch(selectedFeedItem, (newSelectedFeedItem) => {
}
})
/**
* Unselect a list item.
*
*/
function unselectItem() {
itemStore.mutations.SET_SELECTED_ITEM(
itemStore.state,
Expand Down
2 changes: 1 addition & 1 deletion src/components/ShareItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default Vue.extend({
/**
* Adds or removes user to selected list
*
* @param user {ShareUser} user that was clicked
* @param {ShareUser} user - User that was clicked
*/
clickUser(user: ShareUser) {
const selectedUsers = this.selected.map((val: ShareUser) => { return val.shareName })
Expand Down
2 changes: 2 additions & 0 deletions src/components/feed-display/FeedItemDisplay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,11 @@
<img v-else :src="item.mediaThumbnail" alt="">
</div>

<!-- eslint-disable vue/no-v-html -->
<div v-if="item.mediaDescription" class="enclosure description" v-html="item.mediaDescription" />

<div class="body" :dir="item.rtl && 'rtl'" v-html="item.body" />
<!--eslint-enable-->
</div>
</div>
</template>
Expand Down
2 changes: 2 additions & 0 deletions src/components/feed-display/FeedItemRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
</div>

<div class="intro-container">
<!-- eslint-disable vue/no-v-html -->
<span class="intro" v-html="item.intro" />
<!--eslint-enable-->
</div>

<div class="date-container">
Expand Down
8 changes: 4 additions & 4 deletions src/dataservices/feed.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class FeedService {
* Attempts to add a feed to the Nextcloud News backend
* NOTE: this can fail if feed URL is not resolvable
*
* @param param0
* @param param0 Data for the feed
* @param param0.url {String} url of the feed to add
* @param param0.folderId {number} id number of folder to add feed to
* @param param0.user {String} http auth username required for accessing feed
Expand All @@ -50,7 +50,7 @@ export class FeedService {
/**
* Marks all items in feed, started with highestReadId
*
* @param param0
* @param param0 Data for the feed
* @param param0.feedId {Number} ID number of feed to mark items as read
* @param param0.highestItemId {Number} ID number of the (most recent?) feed item to mark as read (all older items will be marked as read)
* @return {AxiosResponse} Updated feed info (unreadCount = 0) stored in data.feeds[0] property
Expand All @@ -64,7 +64,7 @@ export class FeedService {
/**
* Update a feeds properties
*
* @param param0
* @param param0 Data for the feed
* @param param0.feedId {Number} ID number of feed to update
* @param param0.pinned {Boolean} should be pinned (true) or not pinned (flse)
* @param param0.ordering {FEED_ORDER} sets feed order (0 = NEWEST, 1 = OLDEST, 2 = DEFAULT)
Expand All @@ -86,7 +86,7 @@ export class FeedService {
/**
* Deletes a feed
*
* @param param0
* @param param0 Data for the feed
* @param param0.feedId {Number} ID number of feed to delete
* @return {AxiosResponse} Null value is returned on success
*/
Expand Down
6 changes: 3 additions & 3 deletions src/dataservices/folder.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class FolderService {
/**
* Creates a new Folder in the Nextcloud News backend
*
* @param param0
* @param param0 Folder data
* @param param0.name {String} New Folder Name
* @return {AxiosResponse} Folder info from backend in data.folders[0] property
*/
Expand All @@ -28,7 +28,7 @@ export class FolderService {
/**
* Update a folder name
*
* @param param0
* @param param0 Folder data
* @param param0.id {Number} ID number of folder to update
* @param param0.name {String} name to set for folder
* @return {AxiosResponse} Null value is returned on success
Expand All @@ -42,7 +42,7 @@ export class FolderService {
/**
* Deletes a folder in the Nextcloud News backend (by id number)
*
* @param param0
* @param param0 Folder data
* @param param0.id {number} id of folder to delete
* @return {AxiosResponse}
*/
Expand Down
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const store = new Store(mainStore)
* Handles errors returned during application runtime
*
* @param {Error} error Error thrown
* @return Promise<Error>
* @return {Promise<Error>} Error promise
*/
const handleErrors = function(error) {
store.commit(MUTATIONS.SET_ERROR, error)
Expand Down
44 changes: 22 additions & 22 deletions src/store/item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ export const actions = {
* Fetch Unread Items from Backend and call commit to update state
*
* @param param0 ActionParams
* @param param0.commit
* @param param0.commit Commit data
* @param param1 ActionArgs
* @param param1.start
* @param param1.start Start arg
*/
async [FEED_ITEM_ACTION_TYPES.FETCH_UNREAD](
{ commit }: ActionParams<ItemState>,
Expand All @@ -93,9 +93,9 @@ export const actions = {
* Fetch All Items from Backend and call commit to update state
*
* @param param0 ActionParams
* @param param0.commit
* @param param0.commit Commit param
* @param param1 ActionArgs
* @param param1.start
* @param param1.start Start data
*/
async [FEED_ITEM_ACTION_TYPES.FETCH_ITEMS](
{ commit }: ActionParams<ItemState>,
Expand All @@ -122,9 +122,9 @@ export const actions = {
* Fetch Starred Items from Backend and call commit to update state
*
* @param param0 ActionParams
* @param param0.commit
* @param param0.commit Commit param
* @param param1 ActionArgs
* @param param1.start
* @param param1.start Start data
*/
async [FEED_ITEM_ACTION_TYPES.FETCH_STARRED](
{ commit }: ActionParams<ItemState>,
Expand Down Expand Up @@ -152,10 +152,10 @@ export const actions = {
* Fetch All Feed Items from Backend and call commit to update state
*
* @param param0 ActionParams
* @param param0.commit
* @param param0.commit Commit param
* @param param1 ActionArgs
* @param param1.start
* @param param1.feedId
* @param param1.start Start data
* @param param1.feedId ID of the feed
*/
async [FEED_ITEM_ACTION_TYPES.FETCH_FEED_ITEMS](
{ commit }: ActionParams<ItemState>,
Expand All @@ -179,10 +179,10 @@ export const actions = {
* Fetch Folder Items from Backend and call commit to update state
*
* @param param0 ActionParams
* @param param0.commit
* @param param0.commit Commit param
* @param param1 ActionArgs
* @param param1.start
* @param param1.folderId
* @param param1.start Start data
* @param param1.folderId ID of the folder
*/
async [FEED_ITEM_ACTION_TYPES.FETCH_FOLDER_FEED_ITEMS](
{ commit }: ActionParams<ItemState>,
Expand All @@ -206,10 +206,10 @@ export const actions = {
* Sends message to Backend to mark as read, and then call commit to update state
*
* @param param0 ActionParams
* @param param0.commit
* @param param0.dispatch
* @param param0.commit Commit action
* @param param0.dispatch Dispatch action
* @param param1 ActionArgs
* @param param1.item
* @param param1.item Item argument
*/
[FEED_ITEM_ACTION_TYPES.MARK_READ](
{ commit, dispatch }: ActionParams<ItemState>,
Expand All @@ -230,10 +230,10 @@ export const actions = {
* Sends message to Backend to mark as unread, and then call commit to update state
*
* @param param0 ActionParams
* @param param0.commit
* @param param0.dispatch
* @param param0.commit Commit action
* @param param0.dispatch Dispatch
* @param param1 ActionArgs
* @param param1.item
* @param param1.item Item
*/
[FEED_ITEM_ACTION_TYPES.MARK_UNREAD](
{ commit, dispatch }: ActionParams<ItemState>,
Expand All @@ -254,9 +254,9 @@ export const actions = {
* Sends message to Backend to mark as starred, and then call commit to update state
*
* @param param0 ActionParams
* @param param0.commit
* @param param0.commit Commit action
* @param param1 ActionArgs
* @param param1.item
* @param param1.item Item
*/
[FEED_ITEM_ACTION_TYPES.STAR_ITEM](
{ commit }: ActionParams<ItemState>,
Expand All @@ -273,9 +273,9 @@ export const actions = {
* Sends message to Backend to remove mark as starred, and then call commit to update state
*
* @param param0 ActionParams
* @param param0.commit
* @param param0.commit Commit action
* @param param1 ActionArgs
* @param param1.item
* @param param1.item Item
*/
[FEED_ITEM_ACTION_TYPES.UNSTAR_ITEM](
{ commit }: ActionParams<ItemState>,
Expand Down

0 comments on commit 38af3a7

Please sign in to comment.