Skip to content

Commit e2e4724

Browse files
committed
Address comments in #639
[eslint] Add comment above `max-len` rule with link to its docs [eslint] Change tab width for `max-len` rule from 4 to 2 [eslint] Replace double quotes around `max-len` with single quotes [eslint] Use object form of `max-len` and include all of the options
1 parent f1c249b commit e2e4724

File tree

1 file changed

+11
-1
lines changed
  • packages/eslint-config-airbnb/rules

1 file changed

+11
-1
lines changed

packages/eslint-config-airbnb/rules/style.js

+11-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,17 @@ module.exports = {
3535
// disallow mixed 'LF' and 'CRLF' as linebreaks
3636
'linebreak-style': 0,
3737
// specify the maximum length of a line in your program
38-
"max-len": [2, 100, 4],
38+
// https://github.com/eslint/eslint/blob/master/docs/rules/max-len.md
39+
'max-len': [2, {
40+
'code': 100,
41+
'comments': 100,
42+
'commentLength': 100,
43+
'tabWidth': 2,
44+
'ignoreUrls': false,
45+
'ignorePattern': null,
46+
'ignoreTrailingComments': false,
47+
'ignoreComments': false
48+
}],
3949
// specify the maximum depth callbacks can be nested
4050
'max-nested-callbacks': 0,
4151
// require a capital letter for constructors

0 commit comments

Comments
 (0)