diff --git a/lib/rules/disallow-empty-blocks.js b/lib/rules/disallow-empty-blocks.js index fe358ab5e..f56631d9d 100644 --- a/lib/rules/disallow-empty-blocks.js +++ b/lib/rules/disallow-empty-blocks.js @@ -93,7 +93,8 @@ module.exports.prototype = { if (node.parentElement.type !== 'CatchClause' && node.parentElement.type !== 'FunctionDeclaration' && node.parentElement.type !== 'FunctionExpression' && - node.parentElement.type !== 'ArrowFunctionExpression') { + node.parentElement.type !== 'ArrowFunctionExpression' && + node.parentElement.type !== 'ObjectMethod') { errors.add('Empty block found', node.lastChild); } }); diff --git a/test/specs/rules/disallow-empty-blocks.js b/test/specs/rules/disallow-empty-blocks.js index b73d20c91..d2955505a 100644 --- a/test/specs/rules/disallow-empty-blocks.js +++ b/test/specs/rules/disallow-empty-blocks.js @@ -141,6 +141,10 @@ describe('rules/disallow-empty-blocks', function() { expect(checker.checkString('(a) => {}')).to.have.no.errors(); }); + it('should not report empty object method', function() { + expect(checker.checkString('var a = { b() {} }')).to.have.no.errors(); + }); + describe('allExcept: ["comments"]', function() { beforeEach(function() { checker = new Checker(); diff --git a/test/specs/rules/disallow-spaces-in-generator.js b/test/specs/rules/disallow-spaces-in-generator.js index d01368906..a5f8cf1fc 100644 --- a/test/specs/rules/disallow-spaces-in-generator.js +++ b/test/specs/rules/disallow-spaces-in-generator.js @@ -160,6 +160,7 @@ describe('rules/disallow-spaces-in-generator', function() { output: 'var x = function*asdf(){}' }); + // TODO: fix in CST reportAndFix({ name: 'should report illegal space after the star for the shorthand', rules: rules, diff --git a/test/specs/rules/require-spaces-in-generator.js b/test/specs/rules/require-spaces-in-generator.js index 4d9c07c71..920bccf92 100644 --- a/test/specs/rules/require-spaces-in-generator.js +++ b/test/specs/rules/require-spaces-in-generator.js @@ -90,6 +90,7 @@ describe('rules/require-spaces-in-generator', function() { output: 'var x = function * asdf(){}' }); + // TODO: fix in CST reportAndFix({ name: 'should report missing space after the star for the shorthand', rules: rules, diff --git a/test/specs/string-checker.js b/test/specs/string-checker.js index 0f9950da4..6e35121a4 100644 --- a/test/specs/string-checker.js +++ b/test/specs/string-checker.js @@ -376,7 +376,9 @@ describe('string-checker', function() { }); }); - describe.skip('presets', function() { + describe('presets', function() { + this.timeout(30000); + testPreset('airbnb'); testPreset('crockford'); testPreset('google');