Repository: eslint/eslint
File: tests/lib/rules/object-shorthand.js (JavaScript)

Code before:
        },
        {
            code: "var x = {a /* comment */: a}",
            output: null,
            errors: [PROPERTY_ERROR]
        },
        {
            code: "var x = {'a': /* comment */ a}",
            output: null,
            errors: [PROPERTY_ERROR]
        },
        {
            code: "var x = {'a' /* comment */: a}",
            output: null,
            errors: [PROPERTY_ERROR]
        },
        {
            code: "var x = {y: function() {}}",
            output: "var x = {y() {}}",
            errors: [METHOD_ERROR]
        },
        {
            code: "var x = {y: function*() {}}",
            output: "var x = {*y() {}}",
            errors: [METHOD_ERROR]
        },
        {
            code: "var x = {x: y, y: z, a: a}",
            output: "var x = {x: y, y: z, a}",
            errors: [PROPERTY_ERROR]
        },
        {
            code: "var x = {ConstructorFunction: function(){}, a: b}",
            output: "var x = {ConstructorFunction(){}, a: b}",
            errors: [METHOD_ERROR]
        },
        {
            code: "var x = {x: y, y: z, a: function(){}, b() {}}",
            output: "var x = {x: y, y: z, a(){}, b() {}}",
            errors: [METHOD_ERROR]
        },
        {
            code: "var x = {x: x, y: function() {}}",
            output: "var x = {x, y() {}}",
            errors: [PROPERTY_ERROR, METHOD_ERROR]
        },
        {
            code: "doSomething({x: x})",
            output: "doSomething({x})",
            errors: [PROPERTY_ERROR]
        },

Review comment (suggestion):
```suggestion
        },
        {
            code: "var x = {'a': (a /* comment */)}",
            output: null,
            errors: [PROPERTY_ERROR]
        },
```

Code after:
        },
        {
            code: "var x = {a /* comment */: a}",
            output: null,
            errors: [PROPERTY_ERROR]
        },
        {
            code: "var x = {a: (a /* comment */)}",
            output: null,
            errors: [PROPERTY_ERROR]
        },
        {
            code: "var x = {'a': /* comment */ a}",
            output: null,
            errors: [PROPERTY_ERROR]
        },
        {
            code: "var x = {'a': (a /* comment */)}",
            output: null,
            errors: [PROPERTY_ERROR]
        },
        {
            code: "var x = {'a' /* comment */: a}",
            output: null,
            errors: [PROPERTY_ERROR]
        },
        {
            code: "var x = {y: function() {}}",
            output: "var x = {y() {}}",
            errors: [METHOD_ERROR]
        },
        {
            code: "var x = {y: function*() {}}",
            output: "var x = {*y() {}}",
            errors: [METHOD_ERROR]
        },
        {
            code: "var x = {x: y, y: z, a: a}",
            output: "var x = {x: y, y: z, a}",
            errors: [PROPERTY_ERROR]
        },
        {
            code: "var x = {ConstructorFunction: function(){}, a: b}",
            output: "var x = {ConstructorFunction(){}, a: b}",
            errors: [METHOD_ERROR]
        },
        {
            code: "var x = {x: y, y: z, a: function(){}, b() {}}",
            output: "var x = {x: y, y: z, a(){}, b() {}}",
            errors: [METHOD_ERROR]
        },