Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: fix examples in object-curly-newline #13605

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
34 changes: 24 additions & 10 deletions docs/rules/object-curly-newline.md
Expand Up @@ -325,29 +325,43 @@ Examples of **incorrect** code for this rule with the default `{ "consistent": t
/*eslint object-curly-newline: ["error", { "consistent": true }]*/
/*eslint-env es6*/

let a = {foo: 1
let a = {
};
mdjermanovic marked this conversation as resolved.
Show resolved Hide resolved
let b = {
let b = {foo: 1
};
let c = {
foo: 1};
let c = {foo: 1, bar: 2
let d = {foo: 1, bar: 2
};
let d = {
let e = {
foo: 1, bar: 2};
let e = {foo: function() {
let f = {foo: function() {
dosomething();
}};
mdjermanovic marked this conversation as resolved.
Show resolved Hide resolved
let g = {
foo: function() {
dosomething();}};

let {f
let {
} = obj;
mdjermanovic marked this conversation as resolved.
Show resolved Hide resolved
let {
h} = obj;
let {i, j
} = obj;
let {
g} = obj;
let {h, i
k, l} = obj;
let {m, n
} = obj;
let {
j, k} = obj;
let {l = function() {
o, p
} = obj;
let {q = function() {
dosomething();
}} = obj;
mdjermanovic marked this conversation as resolved.
Show resolved Hide resolved
let {
r = function() {
dosomething();
}} = obj;
```

Examples of **correct** code for this rule with the default `{ "consistent": true }` option:
Expand Down