Skip to content

Commit

Permalink
chore(devDeps): update eslint and related packages (#560)
Browse files Browse the repository at this point in the history
  • Loading branch information
tommywo committed Nov 21, 2019
1 parent c888bfc commit 0d73855
Show file tree
Hide file tree
Showing 54 changed files with 789 additions and 553 deletions.
476 changes: 357 additions & 119 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@
"chai": "^4.2.0",
"concat-stream": "^2.0.0",
"coveralls": "^3.0.2",
"eslint": "^5.7.0",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-node": "^7.0.1",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0",
"eslint": "^6.6.0",
"eslint-config-standard": "^14.1.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"git-dummy-commit": "^1.2.0",
"git-tails": "^1.0.0",
"lerna": "^3.18.5",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict'

const Q = require(`q`)
const parserOpts = require(`./parser-opts`)
const writerOpts = require(`./writer-opts`)
const Q = require('q')
const parserOpts = require('./parser-opts')
const writerOpts = require('./writer-opts')

module.exports = Q.all([parserOpts, writerOpts])
.spread((parserOpts, writerOpts) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const parserOpts = require(`./parser-opts`)
const parserOpts = require('./parser-opts')

module.exports = {
parserOpts,
Expand All @@ -14,7 +14,7 @@ module.exports = {
if (commit.notes.length > 0) {
breakings += commit.notes.length
level = 0
} else if (commit.type === `feat`) {
} else if (commit.type === 'feat') {
features += 1
if (level === 2) {
level = 1
Expand Down
10 changes: 5 additions & 5 deletions packages/conventional-changelog-angular/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use strict'
const Q = require(`q`)
const conventionalChangelog = require(`./conventional-changelog`)
const parserOpts = require(`./parser-opts`)
const recommendedBumpOpts = require(`./conventional-recommended-bump`)
const writerOpts = require(`./writer-opts`)
const Q = require('q')
const conventionalChangelog = require('./conventional-changelog')
const parserOpts = require('./parser-opts')
const recommendedBumpOpts = require('./conventional-recommended-bump')
const writerOpts = require('./writer-opts')

module.exports = Q.all([conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts])
.spread((conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts) => {
Expand Down
10 changes: 5 additions & 5 deletions packages/conventional-changelog-angular/parser-opts.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
module.exports = {
headerPattern: /^(\w*)(?:\((.*)\))?: (.*)$/,
headerCorrespondence: [
`type`,
`scope`,
`subject`
'type',
'scope',
'subject'
],
noteKeywords: [`BREAKING CHANGE`],
noteKeywords: ['BREAKING CHANGE'],
revertPattern: /^(?:Revert|revert:)\s"?([\s\S]+?)"?\s*This reverts commit (\w*)\./i,
revertCorrespondence: [`header`, `hash`]
revertCorrespondence: ['header', 'hash']
}
74 changes: 37 additions & 37 deletions packages/conventional-changelog-angular/writer-opts.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
'use strict'

const compareFunc = require(`compare-func`)
const Q = require(`q`)
const readFile = Q.denodeify(require(`fs`).readFile)
const resolve = require(`path`).resolve
const compareFunc = require('compare-func')
const Q = require('q')
const readFile = Q.denodeify(require('fs').readFile)
const resolve = require('path').resolve

module.exports = Q.all([
readFile(resolve(__dirname, `./templates/template.hbs`), `utf-8`),
readFile(resolve(__dirname, `./templates/header.hbs`), `utf-8`),
readFile(resolve(__dirname, `./templates/commit.hbs`), `utf-8`),
readFile(resolve(__dirname, `./templates/footer.hbs`), `utf-8`)
readFile(resolve(__dirname, './templates/template.hbs'), 'utf-8'),
readFile(resolve(__dirname, './templates/header.hbs'), 'utf-8'),
readFile(resolve(__dirname, './templates/commit.hbs'), 'utf-8'),
readFile(resolve(__dirname, './templates/footer.hbs'), 'utf-8')
])
.spread((template, header, commit, footer) => {
const writerOpts = getWriterOpts()
Expand All @@ -29,43 +29,43 @@ function getWriterOpts () {
const issues = []

commit.notes.forEach(note => {
note.title = `BREAKING CHANGES`
note.title = 'BREAKING CHANGES'
discard = false
})

if (commit.type === `feat`) {
commit.type = `Features`
} else if (commit.type === `fix`) {
commit.type = `Bug Fixes`
} else if (commit.type === `perf`) {
commit.type = `Performance Improvements`
} else if (commit.type === `revert` || commit.revert) {
commit.type = `Reverts`
if (commit.type === 'feat') {
commit.type = 'Features'
} else if (commit.type === 'fix') {
commit.type = 'Bug Fixes'
} else if (commit.type === 'perf') {
commit.type = 'Performance Improvements'
} else if (commit.type === 'revert' || commit.revert) {
commit.type = 'Reverts'
} else if (discard) {
return
} else if (commit.type === `docs`) {
commit.type = `Documentation`
} else if (commit.type === `style`) {
commit.type = `Styles`
} else if (commit.type === `refactor`) {
commit.type = `Code Refactoring`
} else if (commit.type === `test`) {
commit.type = `Tests`
} else if (commit.type === `build`) {
commit.type = `Build System`
} else if (commit.type === `ci`) {
commit.type = `Continuous Integration`
} else if (commit.type === 'docs') {
commit.type = 'Documentation'
} else if (commit.type === 'style') {
commit.type = 'Styles'
} else if (commit.type === 'refactor') {
commit.type = 'Code Refactoring'
} else if (commit.type === 'test') {
commit.type = 'Tests'
} else if (commit.type === 'build') {
commit.type = 'Build System'
} else if (commit.type === 'ci') {
commit.type = 'Continuous Integration'
}

if (commit.scope === `*`) {
commit.scope = ``
if (commit.scope === '*') {
commit.scope = ''
}

if (typeof commit.hash === `string`) {
if (typeof commit.hash === 'string') {
commit.shortHash = commit.hash.substring(0, 7)
}

if (typeof commit.subject === `string`) {
if (typeof commit.subject === 'string') {
let url = context.repository
? `${context.host}/${context.owner}/${context.repository}`
: context.repoUrl
Expand Down Expand Up @@ -100,10 +100,10 @@ function getWriterOpts () {

return commit
},
groupBy: `type`,
commitGroupsSort: `title`,
commitsSort: [`scope`, `subject`],
noteGroupsSort: `title`,
groupBy: 'type',
commitGroupsSort: 'title',
commitsSort: ['scope', 'subject'],
noteGroupsSort: 'title',
notesSort: compareFunc
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict'

const Q = require(`q`)
const parserOpts = require(`./parser-opts`)
const writerOpts = require(`./writer-opts`)
const Q = require('q')
const parserOpts = require('./parser-opts')
const writerOpts = require('./writer-opts')

module.exports = Q.all([parserOpts, writerOpts])
.spread((parserOpts, writerOpts) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const parserOpts = require(`./parser-opts`)
const parserOpts = require('./parser-opts')

module.exports = {
parserOpts,
Expand All @@ -14,7 +14,7 @@ module.exports = {
if (commit.notes.length > 0) {
breakings += commit.notes.length
level = 0
} else if (commit.type === `feat`) {
} else if (commit.type === 'feat') {
features += 1
if (level === 2) {
level = 1
Expand Down
10 changes: 5 additions & 5 deletions packages/conventional-changelog-atom/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use strict'
const Q = require(`q`)
const conventionalChangelog = require(`./conventional-changelog`)
const parserOpts = require(`./parser-opts`)
const recommendedBumpOpts = require(`./conventional-recommended-bump`)
const writerOpts = require(`./writer-opts`)
const Q = require('q')
const conventionalChangelog = require('./conventional-changelog')
const parserOpts = require('./parser-opts')
const recommendedBumpOpts = require('./conventional-recommended-bump')
const writerOpts = require('./writer-opts')

module.exports = presetOpts

Expand Down
4 changes: 2 additions & 2 deletions packages/conventional-changelog-atom/parser-opts.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module.exports = {
headerPattern: /^(:.*?:) (.*)$/,
headerCorrespondence: [
`emoji`,
`shortDesc`
'emoji',
'shortDesc'
]
}
28 changes: 13 additions & 15 deletions packages/conventional-changelog-atom/writer-opts.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
'use strict'

const Q = require(`q`)
const readFile = Q.denodeify(require(`fs`).readFile)
const resolve = require(`path`).resolve
const Q = require('q')
const readFile = Q.denodeify(require('fs').readFile)
const resolve = require('path').resolve

module.exports = Q.all([
readFile(resolve(__dirname, `./templates/template.hbs`), `utf-8`),
readFile(resolve(__dirname, `./templates/header.hbs`), `utf-8`),
readFile(resolve(__dirname, `./templates/commit.hbs`), `utf-8`)
readFile(resolve(__dirname, './templates/template.hbs'), 'utf-8'),
readFile(resolve(__dirname, './templates/header.hbs'), 'utf-8'),
readFile(resolve(__dirname, './templates/commit.hbs'), 'utf-8')
])
.spread((template, header, commit) => {
const writerOpts = getWriterOpts()
Expand All @@ -22,27 +22,25 @@ module.exports = Q.all([
function getWriterOpts () {
return {
transform: (commit) => {
let emojiLength

if (!commit.emoji || typeof commit.emoji !== `string`) {
if (!commit.emoji || typeof commit.emoji !== 'string') {
return
}

commit.emoji = commit.emoji.substring(0, 72)
emojiLength = commit.emoji.length
const emojiLength = commit.emoji.length

if (typeof commit.hash === `string`) {
if (typeof commit.hash === 'string') {
commit.shortHash = commit.hash.substring(0, 7)
}

if (typeof commit.shortDesc === `string`) {
if (typeof commit.shortDesc === 'string') {
commit.shortDesc = commit.shortDesc.substring(0, 72 - emojiLength)
}

return commit
},
groupBy: `emoji`,
commitGroupsSort: `title`,
commitsSort: [`emoji`, `shortDesc`]
groupBy: 'emoji',
commitGroupsSort: 'title',
commitsSort: ['emoji', 'shortDesc']
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict'

const Q = require(`q`)
const parserOpts = require(`./parser-opts`)
const writerOpts = require(`./writer-opts`)
const Q = require('q')
const parserOpts = require('./parser-opts')
const writerOpts = require('./writer-opts')

module.exports = Q.all([parserOpts, writerOpts])
.spread((parserOpts, writerOpts) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const parserOpts = require(`./parser-opts`)
const parserOpts = require('./parser-opts')

module.exports = {
parserOpts,
Expand All @@ -14,7 +14,7 @@ module.exports = {
if (commit.notes.length > 0) {
breakings += commit.notes.length
level = 0
} else if (commit.type === `feat`) {
} else if (commit.type === 'feat') {
features += 1
if (level === 2) {
level = 1
Expand Down
10 changes: 5 additions & 5 deletions packages/conventional-changelog-codemirror/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use strict'
var Q = require(`q`)
const conventionalChangelog = require(`./conventional-changelog`)
const parserOpts = require(`./parser-opts`)
const recommendedBumpOpts = require(`./conventional-recommended-bump`)
const writerOpts = require(`./writer-opts`)
var Q = require('q')
const conventionalChangelog = require('./conventional-changelog')
const parserOpts = require('./parser-opts')
const recommendedBumpOpts = require('./conventional-recommended-bump')
const writerOpts = require('./writer-opts')

module.exports = presetOpts

Expand Down
6 changes: 3 additions & 3 deletions packages/conventional-changelog-codemirror/parser-opts.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
module.exports = {
headerPattern: /^\[(.*?)(?: (.*))?] (.*)$/,
headerCorrespondence: [
`language`,
`type`,
`message`
'language',
'type',
'message'
]
}
14 changes: 7 additions & 7 deletions packages/conventional-changelog-codemirror/writer-opts.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict'

const Q = require(`q`)
const readFile = Q.denodeify(require(`fs`).readFile)
const resolve = require(`path`).resolve
const Q = require('q')
const readFile = Q.denodeify(require('fs').readFile)
const resolve = require('path').resolve

module.exports = Q.all([
readFile(resolve(__dirname, './templates/template.hbs'), 'utf-8'),
Expand All @@ -26,14 +26,14 @@ function getWriterOpts () {
return
}

if (typeof commit.hash === `string`) {
if (typeof commit.hash === 'string') {
commit.shortHash = commit.hash.substring(0, 7)
}

return commit
},
groupBy: `language`,
commitGroupsSort: `title`,
commitsSort: [`language`, `type`, `message`]
groupBy: 'language',
commitGroupsSort: 'title',
commitsSort: ['language', 'type', 'message']
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict'

const Q = require(`q`)
const parserOpts = require(`./parser-opts`)
const writerOpts = require(`./writer-opts`)
const Q = require('q')
const parserOpts = require('./parser-opts')
const writerOpts = require('./writer-opts')

module.exports = function (config) {
return Q.all([parserOpts, writerOpts])
Expand Down
Loading

0 comments on commit 0d73855

Please sign in to comment.