Navigation Menu

Skip to content

Commit

Permalink
Fix: Clarify line breaks in object-curly-newline (fixes #14024) (#14063)
Browse files Browse the repository at this point in the history
* Docs: Clarify line breaks in object-curly-newline (refs #14024)

* Docs: Clarify line breaks in object-curly-newline (refs #14024)

* Fix: Clarify line breaks in object-curly-newline (fixes #14024)
  • Loading branch information
arminyahya committed Mar 24, 2021
1 parent 8984c91 commit a99eb2d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions 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:

Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/rules/object-curly-newline.js
Expand Up @@ -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"
Expand Down

0 comments on commit a99eb2d

Please sign in to comment.