File tree Expand file tree Collapse file tree 6 files changed +168
-15
lines changed Expand file tree Collapse file tree 6 files changed +168
-15
lines changed Original file line number Diff line number Diff line change 1
1
module . exports = {
2
- parser : "@typescript -eslint/ parser" ,
2
+ parser : "vue -eslint- parser" ,
3
3
parserOptions : {
4
+ parser : "@typescript-eslint/parser" ,
4
5
ecmaVersion : 2018 ,
5
6
sourceType : "module"
6
7
} ,
7
8
extends : [
9
+ "plugin:vue/vue3-recommended" ,
8
10
"plugin:@typescript-eslint/recommended" ,
9
11
"plugin:prettier/recommended"
10
12
] ,
11
13
rules : {
12
- "@typescript-eslint/no-explicit-any" : "off"
14
+ "@typescript-eslint/no-explicit-any" : "off" ,
15
+ "vue/require-default-prop" : "off" ,
16
+ "vue/no-v-html" : "off" ,
17
+ "vue/multi-word-component-names" : "off" ,
18
+ "@typescript-eslint/ban-ts-comment" : "off"
13
19
}
14
20
} ;
Original file line number Diff line number Diff line change 23
23
"postversion" : " git push && git push --tags" ,
24
24
"postbuild" : " cp -R src/*.vue src/pages lib/." ,
25
25
"format" : " prettier --write \" src/**/*.ts\" \" src/**/*.vue\" " ,
26
- "lint" : " eslint ./src --ext .ts"
26
+ "lint" : " eslint --ext .ts,.vue ./src "
27
27
},
28
28
"author" : " Krister Andersson <cyclonecode@gmail.com>" ,
29
29
"repository" : {
46
46
"eslint" : " ^8.6.0" ,
47
47
"eslint-config-prettier" : " ^8.3.0" ,
48
48
"eslint-plugin-prettier" : " ^4.0.0" ,
49
+ "eslint-plugin-vue" : " ^8.3.0" ,
49
50
"jest" : " ^27.4.7" ,
50
51
"prettier" : " ^2.5.1" ,
51
52
"ts-jest" : " ^27.1.3" ,
Original file line number Diff line number Diff line change @@ -108,6 +108,9 @@ export default {
108
108
page: 0 ,
109
109
}
110
110
},
111
+ async fetch () {
112
+ await this .fetchFeed ()
113
+ },
111
114
computed: {
112
115
numPages () {
113
116
if (this .itemsPerPage > 0 ) {
@@ -129,13 +132,11 @@ export default {
129
132
},
130
133
},
131
134
watch: {
135
+ /* eslint-disable @typescript-eslint/no-unused-vars */
132
136
$route (to, from) {
133
137
this .fetchFeed ()
134
138
},
135
139
},
136
- async fetch () {
137
- await this .fetchFeed ()
138
- },
139
140
methods: {
140
141
async fetchFeed () {
141
142
this .releases = (
Original file line number Diff line number Diff line change 8
8
<div v-if =" showMedia && item.image" class =" cision-feed-item-media" >
9
9
<img :src =" item.image" :alt =" item.title" />
10
10
</div >
11
- <p class = " intro " v-if =" showIntro" >{{ item.intro }}</p >
11
+ <p v-if =" showIntro" class = " intro " >{{ item.intro }}</p >
12
12
<p v-if =" showBody" >{{ item.body }}</p >
13
13
<nuxt-link :to =" link" >
14
14
{{ linkText }}
Original file line number Diff line number Diff line change 6
6
<div v-if =" showFiles && files.length" class =" cision-block-files" >
7
7
<a
8
8
v-for =" (file, index) in files"
9
- :href =" file.url"
10
9
:key =" 'file-' + index"
10
+ :href =" file.url"
11
11
>{{ file.title }}</a
12
12
>
13
13
</div >
@@ -31,6 +31,13 @@ export default {
31
31
release: {},
32
32
}
33
33
},
34
+ async fetch () {
35
+ if (this .item ) {
36
+ this .release = this .item
37
+ return
38
+ }
39
+ this .release = await this .$cision .fetch (this .id || this .$route .params .id )
40
+ },
34
41
computed: {
35
42
files () {
36
43
return this .release .files || []
@@ -48,12 +55,5 @@ export default {
48
55
return this .$cision .options .articleShowFiles
49
56
},
50
57
},
51
- async fetch () {
52
- if (this .item ) {
53
- this .release = this .item
54
- return
55
- }
56
- this .release = await this .$cision .fetch (this .id || this .$route .params .id )
57
- },
58
58
}
59
59
</script >
You can’t perform that action at this time.
0 commit comments