Skip to content

Commit

Permalink
chore(deps-dev): eslint-config-hexo from 3.0.0 to 4.1.0 (#156)
Browse files Browse the repository at this point in the history
* Bump eslint-config-hexo from 3.0.0 to 4.1.0

Bumps [eslint-config-hexo](https://github.com/hexojs/eslint-config-hexo) from 3.0.0 to 4.1.0.
- [Release notes](https://github.com/hexojs/eslint-config-hexo/releases)
- [Commits](hexojs/eslint-config-hexo@3.0.0...4.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* style: update with latest eslint-config-hexo

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: SukkaW <isukkaw@gmail.com>
  • Loading branch information
dependabot-preview[bot] and SukkaW committed Apr 27, 2020
1 parent 6e84df7 commit d38cabd
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 29 deletions.
4 changes: 2 additions & 2 deletions lib/deployer.js
Expand Up @@ -83,7 +83,7 @@ module.exports = function(args) {
});
}

return fs.exists(deployDir).then(function(exist) {
return fs.exists(deployDir).then(exist => {
if (exist) return;

log.info('Setting up Git deployment...');
Expand Down Expand Up @@ -143,7 +143,7 @@ module.exports = function(args) {
});
}).then(() => {
return parseConfig(args);
}).each(function(repo) {
}).each(repo => {
return push(repo);
});
};
Expand Down
4 changes: 2 additions & 2 deletions lib/parse_config.js
Expand Up @@ -7,7 +7,7 @@ const { URL } = require('url');
function parseObjRepo(repo) {
let url = repo.url;
let branch = repo.branch;
let configToken = repo.token;
const configToken = repo.token;

if (!branch) {
branch = testBranch(url);
Expand Down Expand Up @@ -43,7 +43,7 @@ function parseObjRepo(repo) {

function parseStrRepo(repo) {
const split = repo.split(',');
let url = split.shift();
const url = split.shift();
let branch = split[0];

if (!branch) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -31,7 +31,7 @@
"devDependencies": {
"chai": "^4.2.0",
"eslint": "^6.1.0",
"eslint-config-hexo": "^3.0.0",
"eslint-config-hexo": "^4.1.0",
"mocha": "^7.1.2",
"nyc": "^15.0.0"
},
Expand Down
48 changes: 24 additions & 24 deletions test/parse_config.js
Expand Up @@ -2,11 +2,11 @@

var should = require('chai').should(); // eslint-disable-line

describe('parse config', function() {
var parseConfig = require('../lib/parse_config');
describe('parse config', () => {
const parseConfig = require('../lib/parse_config');

it('single repo, no branch', function() {
var result = parseConfig({
it('single repo, no branch', () => {
const result = parseConfig({
repo: 'https://example.com/path/to/repo.git'
});

Expand All @@ -15,8 +15,8 @@ describe('parse config', function() {
]);
});

it('single repo, with branch', function() {
var result = parseConfig({
it('single repo, with branch', () => {
const result = parseConfig({
repo: 'https://example.com/path/to/repo.git',
branch: 'develop'
});
Expand All @@ -26,8 +26,8 @@ describe('parse config', function() {
]);
});

it('single repo, branch after url', function() {
var result = parseConfig({
it('single repo, branch after url', () => {
const result = parseConfig({
repo: 'https://example.com/path/to/repo.git,develop'
});

Expand All @@ -36,8 +36,8 @@ describe('parse config', function() {
]);
});

it('multiple repo', function() {
var result = parseConfig({
it('multiple repo', () => {
const result = parseConfig({
repo: {
foo: 'https://example.com/path/to/repo.git',
bar: 'https://example.com/path/to/repo2.git,custom'
Expand All @@ -50,7 +50,7 @@ describe('parse config', function() {
]);
});

it('github repo, master branch', function() {
it('github repo, master branch', () => {
// https
parseConfig({
repo: 'https://github.com/hexojs/hexojs.github.io.git'
Expand All @@ -67,7 +67,7 @@ describe('parse config', function() {
})[0].branch.should.eql('master');
});

it('github repo, gh-pages branch', function() {
it('github repo, gh-pages branch', () => {
// https
parseConfig({
repo: 'https://github.com/hexojs/hexo.git'
Expand All @@ -84,14 +84,14 @@ describe('parse config', function() {
})[0].branch.should.eql('gh-pages');
});

it('github repo, custom branch', function() {
it('github repo, custom branch', () => {
parseConfig({
repo: 'https://github.com/hexojs/hexojs.github.io.git',
branch: 'site'
})[0].branch.should.eql('site');
});

it('coding repo, coding-pages branch', function() {
it('coding repo, coding-pages branch', () => {
// https
parseConfig({
repo: 'https://coding.net/hexojs/hexojs.git'
Expand All @@ -108,22 +108,22 @@ describe('parse config', function() {
})[0].branch.should.eql('coding-pages');
});

it('coding, custom branch', function() {
it('coding, custom branch', () => {
parseConfig({
repo: 'https://coding.net/hexojs/hexojs.git',
branch: 'site'
})[0].branch.should.eql('site');
});

it('repo is required', function() {
it('repo is required', () => {
try {
parseConfig({});
} catch (err) {
err.should.have.property('message', 'repo is required!');
}
});

it('single repo with plain text token', function() {
it('single repo with plain text token', () => {
// http
parseConfig({
repo: {
Expand All @@ -141,7 +141,7 @@ describe('parse config', function() {
})[0].url.should.eql('git://github.com/hexojs/hexojs.github.io.git');
});

it('single repo with env var token', function() {
it('single repo with env var token', () => {
process.env.GIT_TOKEN = 'env_token';

// http
Expand All @@ -163,7 +163,7 @@ describe('parse config', function() {
delete process.env.GIT_TOKEN;
});

it('Structured single repo setting', function() {
it('Structured single repo setting', () => {
parseConfig({
repo: {
url: 'https://coding.net/hexojs/hexojs.git',
Expand All @@ -172,15 +172,15 @@ describe('parse config', function() {
})[0].branch.should.eql('site');
});

it('Single repo setting with name', function() {
it('Single repo setting with name', () => {
parseConfig({
repo: {
my_repo: 'https://coding.net/hexojs/hexojs.git,site'
}
})[0].branch.should.eql('site');
});

it('Single structured repo setting with name', function() {
it('Single structured repo setting with name', () => {
parseConfig({
repo: {
my_repo: {
Expand All @@ -191,7 +191,7 @@ describe('parse config', function() {
})[0].branch.should.eql('site');
});

it('Structured multiple repo settings', function() {
it('Structured multiple repo settings', () => {
process.env.GIT_TOKEN = 'env_token';
const result = parseConfig({
repo: {
Expand Down Expand Up @@ -220,7 +220,7 @@ describe('parse config', function() {
delete process.env.GIT_TOKEN;
});

it('fail to read env var token', function() {
it('fail to read env var token', () => {

// http
try {
Expand All @@ -235,7 +235,7 @@ describe('parse config', function() {
}
});

it('invalid url', function() {
it('invalid url', () => {
try {
parseConfig({
repo: {
Expand Down

0 comments on commit d38cabd

Please sign in to comment.