// Rule Definition
//------------------------------------------------------------------------------
+/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
type: "layout",
docs: {
- description: "enforce placing object properties on separate lines",
- category: "Stylistic Issues",
+ description: "Enforce placing object properties on separate lines",
recommended: false,
url: "https://eslint.org/docs/rules/object-property-newline"
},
if (lastTokenOfPreviousProperty.loc.end.line === firstTokenOfCurrentProperty.loc.start.line) {
context.report({
node,
- loc: firstTokenOfCurrentProperty.loc.start,
+ loc: firstTokenOfCurrentProperty.loc,
messageId,
fix(fixer) {
const comma = sourceCode.getTokenBefore(firstTokenOfCurrentProperty);