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

Code before:
        },
        {
            code: "var x = {\n  f: function*() {\n    /* comment */\n    a(b);\n    }\n  }",
            output: "var x = {\n  *f() {\n    /* comment */\n    a(b);\n    }\n  }",
            errors: [METHOD_ERROR]
        },
        {
            code: "var x = {\n  f: /* comment */ function() {\n  }\n  }",
            output: null,
            errors: [METHOD_ERROR]
        },
        {
            code: "var x = {\n f /* comment */: function() {\n  }\n  }",
            output: null,
            errors: [METHOD_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 = {'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]
        },

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

Code after:
        },
        {
            code: "var x = {\n  f: function*() {\n    /* comment */\n    a(b);\n    }\n  }",
            output: "var x = {\n  *f() {\n    /* comment */\n    a(b);\n    }\n  }",
            errors: [METHOD_ERROR]
        },
        {
            code: "var x = {\n  f: /* comment */ function() {\n  }\n  }",
            output: null,
            errors: [METHOD_ERROR]
        },
        {
            code: "var x = {\n f /* comment */: function() {\n  }\n  }",
            output: null,
            errors: [METHOD_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 = {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]
        },