diff --git a/docs/rules/object-curly-newline.md b/docs/rules/object-curly-newline.md index 302c81c33b5..cc98b4293c0 100644 --- a/docs/rules/object-curly-newline.md +++ b/docs/rules/object-curly-newline.md @@ -1,17 +1,17 @@ -# enforce consistent line breaks inside braces (object-curly-newline) +# enforce consistent line breaks after opening and before closing braces (object-curly-newline) A number of style guides require or disallow line breaks inside of object braces and other tokens. ## Rule Details -This rule enforces consistent line breaks inside braces of object literals or destructuring assignments. +This rule requires or disallows a line break between `{` and its following token, and between `}` and its preceding token of object literals or destructuring assignments. ## Options This rule has either a string option: -* `"always"` requires line breaks inside braces -* `"never"` disallows line breaks inside braces +* `"always"` requires line breaks after opening and before closing braces +* `"never"` disallows line breaks after opening and before closing braces Or an object option: @@ -538,7 +538,7 @@ export { foo as f, bar } from 'foo-bar'; ## When Not To Use It -If you don't want to enforce consistent line breaks inside braces, then it's safe to disable this rule. +If you don't want to enforce consistent line breaks after opening and before closing braces, then it's safe to disable this rule. ## Related Rules diff --git a/lib/rules/object-curly-newline.js b/lib/rules/object-curly-newline.js index c5c098e1301..9b64a1b5c6a 100644 --- a/lib/rules/object-curly-newline.js +++ b/lib/rules/object-curly-newline.js @@ -134,7 +134,7 @@ module.exports = { type: "layout", docs: { - description: "enforce consistent line breaks inside braces", + description: "enforce consistent line breaks after opening and before closing braces", category: "Stylistic Issues", recommended: false, url: "https://eslint.org/docs/rules/object-curly-newline"