diff options
author | Devlin Junker <devlin.junker@gmail.com> | 2022-10-02 20:43:11 -0700 |
---|---|---|
committer | Benjamin Brahmer <info@b-brahmer.de> | 2022-11-02 11:27:20 +0100 |
commit | a81cd40b00c8a004d844bed7fb697baf65b3d7e0 (patch) | |
tree | 88c254610dc14837cc9506a27a8916166fe85b37 | |
parent | 08d12e500952dfca9730f6b4ab0255f3805f6452 (diff) |
clean up linting errors
Signed-off-by: Devlin Junker <devlin.junker@gmail.com>
-rw-r--r-- | .eslintrc.js | 7 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | .stylelintignore | 3 | ||||
-rw-r--r-- | src/components/AddFeed.vue | 2 | ||||
-rw-r--r-- | src/components/Explore.vue | 8 | ||||
-rw-r--r-- | tests/javascript/unit/components/Sidebar.spec.ts | 14 | ||||
-rw-r--r-- | tsconfig.json | 2 |
7 files changed, 23 insertions, 14 deletions
diff --git a/.eslintrc.js b/.eslintrc.js index 53f17a942..3a85ff92d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -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', diff --git a/.gitignore b/.gitignore index eb1c407ce..e3b775692 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ js/ *.clover .phpunit.result.cache site/ +coverage # python PKG-INFO diff --git a/.stylelintignore b/.stylelintignore index a725465ae..ac623e965 100644 --- a/.stylelintignore +++ b/.stylelintignore @@ -1 +1,2 @@ -vendor/
\ No newline at end of file +vendor/ +coverage/
\ No newline at end of file diff --git a/src/components/AddFeed.vue b/src/components/AddFeed.vue index 258a58c5b..c9e176235 100644 --- a/src/components/AddFeed.vue +++ b/src/components/AddFeed.vue @@ -146,7 +146,7 @@ export default Vue.extend({ } }, computed: { - folders() { + folders(): Folder[] { return this.$store.state.folders }, }, diff --git a/src/components/Explore.vue b/src/components/Explore.vue index 214d55c90..64186fb14 100644 --- a/src/components/Explore.vue +++ b/src/components/Explore.vue @@ -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), diff --git a/tests/javascript/unit/components/Sidebar.spec.ts b/tests/javascript/unit/components/Sidebar.spec.ts index d5a381479..73a70f728 100644 --- a/tests/javascript/unit/components/Sidebar.spec.ts +++ b/tests/javascript/unit/components/Sidebar.spec.ts @@ -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 + }); }) diff --git a/tsconfig.json b/tsconfig.json index 492bbd7c9..72691c01a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -45,6 +45,6 @@ "tests/**/*.tsx" ], "exclude": [ - "node_modules" + ] }
\ No newline at end of file |