Skip to content

Commit

Permalink
docs: consistent example
Browse files Browse the repository at this point in the history
  • Loading branch information
soobing committed Aug 22, 2020
1 parent 284e954 commit a3567ba
Showing 1 changed file with 24 additions and 10 deletions.
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 = {
};
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();
}};
let g = {
foo: function() {
dosomething();}};

let {f
let {
} = obj;
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;
let {
r = function() {
dosomething();
}} = obj;
```

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

0 comments on commit a3567ba

Please sign in to comment.