Skip to content

Commit

Permalink
chore(package): update xo to version 0.26.1
Browse files Browse the repository at this point in the history
  • Loading branch information
greenkeeper[bot] authored and pvdlg committed Feb 18, 2020
1 parent d5e6e9f commit 4ec73c3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions lib/commit-transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = (commit, context) => {
}

if (typeof commit.hash === 'string') {
commit.shortHash = commit.hash.substring(0, COMMIT_HASH_LENGTH);
commit.shortHash = commit.hash.slice(0, COMMIT_HASH_LENGTH);
}

const references = [];
Expand All @@ -57,7 +57,7 @@ module.exports = (commit, context) => {
if (commit.references) {
// Remove references that already appear in the subject
commit.references = commit.references.filter(reference => {
if (references.indexOf(reference.issue) === -1) {
if (!references.includes(reference.issue)) {
return true;
}

Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"semantic-release": "^17.0.0",
"stringz": "^2.0.0",
"tempy": "^0.4.0",
"xo": "^0.24.0"
"xo": "^0.26.1"
},
"engines": {
"node": ">=10.13"
Expand Down Expand Up @@ -99,6 +99,9 @@
"test": "nyc ava -v"
},
"xo": {
"prettier": true
"prettier": true,
"rules": {
"prefer-named-capture-group": "off"
}
}
}
2 changes: 1 addition & 1 deletion test/aliases.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ test('Each alias`s type property has a value that exists in types', t => {
test('Each alias exists in typesOrder', t => {
for (const type in types) {
if (Reflect.apply(Object.prototype.hasOwnProperty, types, [type])) {
t.true(typesOrder.indexOf(type) !== -1);
t.true(typesOrder.includes(type));
}
}
});
6 changes: 3 additions & 3 deletions test/types.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ function hasValidRelease(t, object) {
if (Reflect.apply(Object.prototype.hasOwnProperty, object, [obj])) {
t.true(Reflect.apply(Object.prototype.hasOwnProperty, object[obj], ['release']));
t.true(
['major', 'minor', 'patch', false].indexOf(object[obj].release) !== -1 ||
['major', 'minor', 'patch', false].includes(object[obj].release) ||
(Reflect.apply(Object.prototype.hasOwnProperty, object[obj].release, ['release']) &&
['major', 'minor', 'patch', false].indexOf(object[obj].release.release) !== -1)
['major', 'minor', 'patch', false].includes(object[obj].release.release))
);
}
}
Expand All @@ -65,7 +65,7 @@ test('../types has the property typesOrder', t => {
test('Each type exists in typesOrder', t => {
for (const type in types) {
if (Reflect.apply(Object.prototype.hasOwnProperty, types, [type])) {
t.true(typesOrder.indexOf(type) !== -1);
t.true(typesOrder.includes(type));
}
}
});

0 comments on commit 4ec73c3

Please sign in to comment.