]> git.proxmox.com Git - pve-eslint.git/blobdiff - eslint/lib/rules/object-property-newline.js
import 8.23.1 source
[pve-eslint.git] / eslint / lib / rules / object-property-newline.js
index 074bc775ae35a3401f15208b509fb9dde4e0ded2..bc079a16f45929872ff3baeac1a8ccd8af4b965c 100644 (file)
@@ -9,13 +9,13 @@
 // 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"
         },
@@ -77,7 +77,7 @@ module.exports = {
                     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);