clean up linting errors

Signed-off-by: Devlin Junker <devlin.junker@gmail.com>
This commit is contained in:
Devlin Junker 2022-10-02 20:43:11 -07:00 committed by Benjamin Brahmer
parent 08d12e5009
commit a81cd40b00
7 changed files with 23 additions and 14 deletions

View File

@ -10,6 +10,13 @@ module.exports = {
env: {
jest: true,
},
rules: {
// frustratingly this seems to error for all imports right now...
'n/no-missing-import': 'off',
// need to warn on these because @nextcloud repeats some component names (Button, Content..)
'vue/no-reserved-component-names': 'warn',
},
extends: [
'eslint:recommended',
'plugin:vue/base',

1
.gitignore vendored
View File

@ -9,6 +9,7 @@ js/
*.clover
.phpunit.result.cache
site/
coverage
# python
PKG-INFO

View File

@ -1 +1,2 @@
vendor/
vendor/
coverage/

View File

@ -146,7 +146,7 @@ export default Vue.extend({
}
},
computed: {
folders() {
folders(): Folder[] {
return this.$store.state.folders
},
},

View File

@ -67,6 +67,14 @@ const ExploreComponent = Vue.extend({
const exploreUrl = settings.data.settings.exploreUrl + 'feeds.en.json'
const explore = await axios.get(exploreUrl)
this.exploreSites.push({
title: 'test',
favicon: 'string',
url: 'http://test.com',
feed: '',
description: 'testing test',
votes: 2,
})
Object.keys(explore.data).forEach((key) =>
explore.data[key].forEach((value: ExploreSite) =>
this.exploreSites.push(value),

View File

@ -28,17 +28,9 @@ import { shallowMount } from '@vue/test-utils'
describe('Sidebar.vue', () => {
'use strict'
// We set the route before mounting AppSidebar to prevent messages that the task was not found
// Could be adjusted with future tests
// router.push({ name: 'calendarsTask', params: { calendarId: 'calendar-1', taskId: 'pwen4kz18g.ics' } })
it('Returns the correct value for the new dates', () => {
it('should initialize without showing AddFeed Component', () => {
const wrapper = shallowMount(AppSidebar, { localVue, store })
// eslint-disable-next-line no-console
console.log(wrapper.vm)
// let actual = wrapper.vm.newStartDate
// let expected = new Date('2019-01-01T12:00:00')
// expect(actual.getTime()).toBe(expected.getTime()
})
expect(wrapper.vm.$data.showAddFeed).toBeFalsy
});
})

View File

@ -45,6 +45,6 @@
"tests/**/*.tsx"
],
"exclude": [
"node_modules"
]
}