This commit is contained in:
Tsvetomir Tsonev 2022-06-02 13:17:46 +03:00 коммит произвёл Tsvetomir Tsonev
Родитель 9ff595b366
Коммит 935980eedf
5 изменённых файлов: 18 добавлений и 17 удалений

Просмотреть файл

@ -1,11 +0,0 @@
{
"extends": "eslint:recommended",
"parser": "babel-eslint",
"env": {
"node": true
},
"rules": {
"no-console": 0
}
}

14
.eslintrc.js Normal file
Просмотреть файл

@ -0,0 +1,14 @@
module.exports = {
"env": {
"browser": true,
"commonjs": true,
"es2021": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": "latest"
},
"rules": {
}
}

Просмотреть файл

@ -3,7 +3,7 @@ var SRError = require('@semantic-release/error')
module.exports = function (pluginConfig, config, cb) {
var env = config.env
if (!env.hasOwnProperty('GITHUB_ACTION')) {
if (!Object.hasOwnProperty.call(env, 'GITHUB_ACTION')) {
return cb(new SRError(
'semantic-release didnt run on Github Action and therefore a new version wont be published.\n' +
'You can customize this behavior using "verifyConditions" plugins: git.io/sr-plugins',

Просмотреть файл

@ -34,10 +34,8 @@
"author": "Telerik",
"license": "Apache-2.0",
"devDependencies": {
"@telerik/eslint-config": "1.1.0",
"babel-eslint": "^7.2.3",
"cz-conventional-changelog": "^1.1.5",
"eslint": "^3.19.0",
"eslint": "^8.16.0",
"validate-commit-msg": "^1.1.1"
},
"config": {

Просмотреть файл

@ -2,7 +2,7 @@ module.exports = function (pluginConfig, config, cb) {
if (config.nextRelease) {
// change version suffix of pre-releases from '-number' to '-tag.timestamp'
const now = new Date();
const timestamp = now.toISOString().replace(/[\-T\:]/g, "").slice(0,12);
const timestamp = now.toISOString().replace(/[-T:]/g, "").slice(0,12);
const suffix = `-${config.npm.tag}.${timestamp}`;
const release = config.nextRelease;
@ -10,7 +10,7 @@ module.exports = function (pluginConfig, config, cb) {
// start releases with 0.1.0 instead of 1.0.0
release.version = '0.1.0';
} else {
release.version = release.version.replace(/\-.+$/, suffix);
release.version = release.version.replace(/-.+$/, suffix);
}
console.log(`Ready for release v${release.version}`);