Skip to content

Commit 935980e

Browse files
committed
refactor: update eslint
1 parent 9ff595b commit 935980e

File tree

5 files changed

+18
-17
lines changed

5 files changed

+18
-17
lines changed

.eslintrc

Lines changed: 0 additions & 11 deletions
This file was deleted.

.eslintrc.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
"env": {
3+
"browser": true,
4+
"commonjs": true,
5+
"es2021": true,
6+
"node": true
7+
},
8+
"extends": "eslint:recommended",
9+
"parserOptions": {
10+
"ecmaVersion": "latest"
11+
},
12+
"rules": {
13+
}
14+
}

condition-github-actions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var SRError = require('@semantic-release/error')
33
module.exports = function (pluginConfig, config, cb) {
44
var env = config.env
55

6-
if (!env.hasOwnProperty('GITHUB_ACTION')) {
6+
if (!Object.hasOwnProperty.call(env, 'GITHUB_ACTION')) {
77
return cb(new SRError(
88
'semantic-release didn’t run on Github Action and therefore a new version won’t be published.\n' +
99
'You can customize this behavior using "verifyConditions" plugins: git.io/sr-plugins',

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,8 @@
3434
"author": "Telerik",
3535
"license": "Apache-2.0",
3636
"devDependencies": {
37-
"@telerik/eslint-config": "1.1.0",
38-
"babel-eslint": "^7.2.3",
3937
"cz-conventional-changelog": "^1.1.5",
40-
"eslint": "^3.19.0",
38+
"eslint": "^8.16.0",
4139
"validate-commit-msg": "^1.1.1"
4240
},
4341
"config": {

verifyRelease.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ module.exports = function (pluginConfig, config, cb) {
22
if (config.nextRelease) {
33
// change version suffix of pre-releases from '-number' to '-tag.timestamp'
44
const now = new Date();
5-
const timestamp = now.toISOString().replace(/[\-T\:]/g, "").slice(0,12);
5+
const timestamp = now.toISOString().replace(/[-T:]/g, "").slice(0,12);
66
const suffix = `-${config.npm.tag}.${timestamp}`;
77
const release = config.nextRelease;
88

99
if (release.type === 'initial') {
1010
// start releases with 0.1.0 instead of 1.0.0
1111
release.version = '0.1.0';
1212
} else {
13-
release.version = release.version.replace(/\-.+$/, suffix);
13+
release.version = release.version.replace(/-.+$/, suffix);
1414
}
1515

1616
console.log(`Ready for release v${release.version}`);

0 commit comments

Comments
 (0)