diff --git a/rules/empty-brace-spaces.js b/rules/empty-brace-spaces.js index b1eff77df8..5422441723 100644 --- a/rules/empty-brace-spaces.js +++ b/rules/empty-brace-spaces.js @@ -11,10 +11,9 @@ const selector = matches([ 'BlockStatement[body.length=0]', 'ClassBody[body.length=0]', 'ObjectExpression[properties.length=0]', + 'StaticBlock[body.length=0]', // Experimental https://github.com/tc39/proposal-record-tuple 'RecordExpression[properties.length=0]', - // Experimental https://github.com/tc39/proposal-class-static-block - 'StaticBlock[body.length=0]', ]); /** @param {import('eslint').Rule.RuleContext} context */ diff --git a/test/empty-brace-spaces.mjs b/test/empty-brace-spaces.mjs index 6e043f9ba9..f925ad7b0e 100644 --- a/test/empty-brace-spaces.mjs +++ b/test/empty-brace-spaces.mjs @@ -26,6 +26,7 @@ const cases = [ 'foo = {/* */}', 'class Foo {bar() {/* */}}', 'foo = class {bar() {/* */}}', + 'class Foo {static {/* */}}', ]; const classBodyCases = [ 'class Foo {/* */}',