File tree Expand file tree Collapse file tree 3 files changed +5
-11
lines changed
Expand file tree Collapse file tree 3 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -88,11 +88,8 @@ function github(options) {
8888 pkg = JSON . parse ( fs . readFileSync ( path . join ( proc . cwd ( ) , 'package.json' ) ) )
8989 } catch ( _ ) { }
9090
91- if ( pkg && pkg . repository ) {
92- repository = pkg . repository . url || pkg . repository
93- } else {
94- repository = ''
95- }
91+ repository =
92+ pkg && pkg . repository ? pkg . repository . url || pkg . repository : ''
9693 }
9794
9895 // Parse the URL: See the tests for all possible kinds.
Original file line number Diff line number Diff line change 5050 "remark-preset-wooorm" : " ^8.0.0" ,
5151 "tape" : " ^5.0.0" ,
5252 "tinyify" : " ^3.0.0" ,
53- "xo" : " ^0.33 .0"
53+ "xo" : " ^0.37 .0"
5454 },
5555 "scripts" : {
5656 "format" : " remark . -qfo --ignore-pattern test/ && prettier . -w --loglevel warn && xo --fix" ,
Original file line number Diff line number Diff line change @@ -211,11 +211,8 @@ test('Miscellaneous', function (t) {
211211function github ( value , repo ) {
212212 var options
213213
214- if ( typeof repo === 'string' || ! repo ) {
215- options = { repository : repo || null }
216- } else {
217- options = repo
218- }
214+ options =
215+ typeof repo === 'string' || ! repo ? { repository : repo || null } : repo
219216
220217 return remark ( ) . use ( remarkGitHub , options ) . processSync ( value ) . toString ( )
221218}
You can’t perform that action at this time.
0 commit comments