Skip to content
This repository has been archived by the owner on Jan 11, 2018. It is now read-only.

Commit

Permalink
Revert "Add object-property-newline and object-curly-newline"
Browse files Browse the repository at this point in the history
This reverts commit 9ddd8b9.
  • Loading branch information
Sergey Sova committed Nov 3, 2017
1 parent 91c709b commit 6e18e33
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 69 deletions.
11 changes: 0 additions & 11 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,6 @@ module.exports = {
'no-unused-vars': ['warn', { ignoreRestSiblings: false }],
semi: ['error', 'never'],
'no-confusing-arrow': 'off',
'object-property-newline': ['error'],

'object-curly-newline': ['warn', {
ObjectExpression: {
minProperties: 5,
},
ObjectPattern: {
minProperties: 6,
multiline: true,
},
}],

'no-magic-numbers': ['warn', {
ignore: [1, 0, -1],
Expand Down
17 changes: 1 addition & 16 deletions example/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,13 @@ const example = {
four,
}

const format = ({
name, surname, age, demo, foo, bar,
}) =>
`> ${name} ${surname}, ${age} (${[demo, foo, bar].join('::')})`

const maps = { foo: 1, bar: 2, baz: 3, baf: 4 }
const dats = {
foo: 1, bar: 2, baz: 3, baf: 4, maps,
}

const {
foo, bar, baz, baf, maps: boe, ...other
} = dats

const PART_NUM = 12

const inside = resolve(
example,
`report${example['third-e'].join(',')}`,
`foo${PART_NUM}`,
reinstall.path,
format(dats),
reinstall.path
)

try {
Expand Down
42 changes: 0 additions & 42 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,48 +79,6 @@ Really? You can be confused with?
const x = a => 1 ? 2 : 3
```

## object-property-newline: `error`

https://eslint.org/docs/rules/object-property-newline

Just write multiline object definition with new line for each property.

## object-curly-newline: `warn`

```js
{
ObjectExpression: { minProperties: 5 },
ObjectPattern: { minProperties: 6, multiline: true },
}
```

https://eslint.org/docs/rules/object-curly-newline

Object definition with more than 4 properties should be multiline.

```js
const expression = {
foo: 1,
bar: 2,
baz: 3,
taf: 4,
kas: 5.
}
```

For object destructuring with more than 5 properties, should be multiline.

```js
const {
foo,
bar,
baz,
baf,
maps: boe,
...other
} = dats
```


## no-magic-numbers: `warn`

Expand Down

0 comments on commit 6e18e33

Please sign in to comment.