Skip to content

Commit

Permalink
Docs: Don’t use undocumented array-style configuration for max-len (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
j-f1 authored and ilyavolodin committed Dec 6, 2017
1 parent 1ad3091 commit d067ae1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/rules/max-len.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ This rule has a number or object option:
Examples of **incorrect** code for this rule with the default `{ "code": 80 }` option:

```js
/*eslint max-len: ["error", 80]*/
/*eslint max-len: ["error", { "code": 80 }]*/

var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" }, "difficult": "to read" };
```

Examples of **correct** code for this rule with the default `{ "code": 80 }` option:

```js
/*eslint max-len: ["error", 80]*/
/*eslint max-len: ["error", { "code": 80 }]*/

var foo = {
"bar": "This is a bar.",
Expand All @@ -52,15 +52,15 @@ var foo = {
Examples of **incorrect** code for this rule with the default `{ "tabWidth": 4 }` option:

```js
/*eslint max-len: ["error", 80, 4]*/
/*eslint max-len: ["error", { "code": 80, "tabWidth": 4 }]*/

\t \t var foo = { "bar": "This is a bar.", "baz": { "qux": "This is a qux" } };
```

Examples of **correct** code for this rule with the default `{ "tabWidth": 4 }` option:

```js
/*eslint max-len: ["error", 80, 4]*/
/*eslint max-len: ["error", { "code": 80, "tabWidth": 4 }]*/

\t \t var foo = {
\t \t \t \t "bar": "This is a bar.",
Expand Down

0 comments on commit d067ae1

Please sign in to comment.