Skip to content

Commit

Permalink
Merge branch 'master' into feature/converter
Browse files Browse the repository at this point in the history
  • Loading branch information
voischev committed Aug 2, 2015
2 parents 1ca1b39 + a619fc1 commit f5c1d15
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
8 changes: 6 additions & 2 deletions .jscsrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
"plugins": ["jscs-protein"],
"excludeFiles": [
".git/**",
"node_modules/**"
"node_modules/**",
"coverage/**"
],
"fileExtensions": [".js"],
"esnext": true
"esnext": true,
"requireArrowFunctions": true,
"requireShorthandArrowFunctions": true,
"requireTemplateStrings": true
}
4 changes: 2 additions & 2 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ gulp.task('build:docs', () => {
let ignore = require('fs').readFileSync('.npmignore').toString()
.trim().split(/\n+/)
.concat(['.npmignore', 'index.js', 'package.json'])
.map( i => '!' + i );
.map( i => `!${i}` );
return gulp.src(['*'].concat(ignore))
.pipe(gulp.dest('build'));
});
Expand All @@ -40,7 +40,7 @@ gulp.task('build', ['build:lib', 'build:docs', 'build:package']);
gulp.task('changelog', done => {
require('conventional-changelog')({
preset: 'angular'
}, function(err, log) {
}, (err, log) => {
if(err) {
return done(err);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"gulp-babel": "^5.1.0",
"gulp-json-editor": "^2.2.1",
"isparta": "^3.0.3",
"jscs": "^1.11.2",
"jscs": "^2.0.0",
"jscs-protein": "git://github.com/theprotein/jscs-protein.git#1d22e08ca767958a95b79f3bad6449fb2fa9f496",
"jshint": "^2.8.0",
"mocha": "^2.2.5",
Expand Down
4 changes: 2 additions & 2 deletions test/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ describe('Set options', () => {

expect(posthtml()
.process('')
.then(function(result) {
.then(result => {
result.getOptions().to.eql({});
})
);

expect(posthtml()
.process('', { op: 1 })
.then(function(result) {
.then(result => {
result.getOptions().op.to.eql(1);
})
);
Expand Down
8 changes: 4 additions & 4 deletions test/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { expect } from 'chai';
const html = '<div class="button"><rect/><div class="button__text">Text</div></div>';

function testPluginsArray(nodes, options, done) {
expect(posthtml([ function(json) { return json; }, function(json) { return json; }])
expect(posthtml([ json => json, json => json ])
.process(nodes, options)
.then(result => {
expect(html).to.eql(result.html);
Expand All @@ -15,9 +15,9 @@ function testPluginsArray(nodes, options, done) {

function testPluginUse(nodes, options, done) {
expect(posthtml()
.use(function(json) { return json; })
.use(function(json) { return json; })
.use(function(json) { }) // jshint ignore: line
.use(json => json)
.use(json => json)
.use(json => { }) // jshint ignore: line
.process(nodes, options)
.then(result => {
expect(html).to.eql(result.html);
Expand Down

0 comments on commit f5c1d15

Please sign in to comment.