Skip to content

Commit

Permalink
chore: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed Mar 14, 2022
1 parent 80daf4a commit 02aba91
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 10,617 deletions.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions lib/fixer.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ module.exports = {

fixNameField: function (data, options) {
if (typeof options === 'boolean') {
options = {strict: options}
options = { strict: options }
} else if (typeof options === 'undefined') {
options = {}
}
Expand Down Expand Up @@ -261,16 +261,16 @@ module.exports = {
if (!data.bugs && data.repository && data.repository.url) {
var hosted = hostedGitInfo.fromUrl(data.repository.url)
if (hosted && hosted.bugs()) {
data.bugs = {url: hosted.bugs()}
data.bugs = { url: hosted.bugs() }
}
} else if (data.bugs) {
var emailRe = /^.+@.*\..+$/
if (typeof data.bugs === 'string') {
if (emailRe.test(data.bugs)) {
data.bugs = {email: data.bugs}
data.bugs = { email: data.bugs }
/* eslint-disable-next-line node/no-deprecated-api */
} else if (url.parse(data.bugs).protocol) {
data.bugs = {url: data.bugs}
data.bugs = { url: data.bugs }
} else {
this.warn('nonEmailUrlBugsString')
}
Expand Down
Loading

0 comments on commit 02aba91

Please sign in to comment.