Skip to content

Commit

Permalink
Merge b397303 into b67e9de
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshinorin committed Feb 3, 2019
2 parents b67e9de + b397303 commit 221a6f9
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 18 deletions.
4 changes: 0 additions & 4 deletions .jscsrc

This file was deleted.

1 change: 0 additions & 1 deletion .npmignore
Expand Up @@ -11,4 +11,3 @@ appveyor.yml
.npmignore
package-lock.json
yarn.lock
.jscsrc
1 change: 0 additions & 1 deletion .travis.yml
Expand Up @@ -14,7 +14,6 @@ node_js:

script:
- npm run eslint
- npm run jscs
- npm run test-cov

after_script:
Expand Down
4 changes: 2 additions & 2 deletions lib/generator.js
Expand Up @@ -4,14 +4,14 @@ var nunjucks = require('nunjucks');
var env = new nunjucks.Environment();
var pathFn = require('path');
var fs = require('fs');
var gravatar = require('hexo/lib/plugins/helper/gravatar');
var gravatar = require('hexo/lib/plugins/helper/gravatar'); // eslint-disable-line node/no-unpublished-require

env.addFilter('uriencode', function(str) {
return encodeURI(str);
});

env.addFilter('noControlChars', function(str) {
return str.replace(/[\x00-\x1F\x7F]/g, '');
return str.replace(/[\x00-\x1F\x7F]/g, ''); // eslint-disable-line no-control-regex
});

var atomTmplSrc = pathFn.join(__dirname, '../atom.xml');
Expand Down
7 changes: 2 additions & 5 deletions package.json
Expand Up @@ -5,7 +5,6 @@
"main": "index",
"scripts": {
"eslint": "eslint .",
"jscs": "jscs .",
"test": "mocha test/index.js",
"test-cov": "istanbul cover --print both _mocha -- test/index.js"
},
Expand Down Expand Up @@ -39,12 +38,10 @@
"babel-eslint": "^9.0.0",
"chai": "^4.2.0",
"cheerio": "^0.22.0",
"eslint": "^2.4.0",
"eslint-config-hexo": "^1.0.4",
"eslint": "^5.13.0",
"eslint-config-hexo": "^3.0.0",
"hexo": "^3.3.1",
"istanbul": "^0.4.5",
"jscs": "^3.0.7",
"jscs-preset-hexo": "^1.0.1",
"mocha": "^5.2.0"
},
"engines": {
Expand Down
10 changes: 5 additions & 5 deletions test/index.js
Expand Up @@ -13,7 +13,7 @@ env.addFilter('uriencode', function(str) {
});

env.addFilter('noControlChars', function(str) {
return str.replace(/[\x00-\x1F\x7F]/g, '');
return str.replace(/[\x00-\x1F\x7F]/g, ''); // eslint-disable-line no-control-regex
});

var atomTmplSrc = pathFn.join(__dirname, '../atom.xml');
Expand All @@ -33,10 +33,10 @@ describe('Feed generator', function() {
var Post = hexo.model('Post');
var generator = require('../lib/generator').bind(hexo);

(require('../node_modules/hexo/lib/plugins/helper'))(hexo);
require('../node_modules/hexo/lib/plugins/helper')(hexo);

var posts;
var locals;
var posts,
locals;

before(function() {
return Post.insert([
Expand Down Expand Up @@ -113,7 +113,7 @@ describe('Feed generator', function() {
var result = generator(locals);
var $ = cheerio.load(result.data, {xmlMode: true});

var description = $('content\\\:encoded').html()
var description = $('content\\:encoded').html()
.replace(/^<!\[CDATA\[/, '')
.replace(/\]\]>$/, '');

Expand Down

0 comments on commit 221a6f9

Please sign in to comment.