From e2e4724fbb079c0dc18481bd10443323df2838c1 Mon Sep 17 00:00:00 2001 From: Christopher Banh Date: Thu, 24 Dec 2015 02:01:51 -0800 Subject: [PATCH] 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 --- packages/eslint-config-airbnb/rules/style.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/eslint-config-airbnb/rules/style.js b/packages/eslint-config-airbnb/rules/style.js index 928dac82..46bd38a6 100644 --- a/packages/eslint-config-airbnb/rules/style.js +++ b/packages/eslint-config-airbnb/rules/style.js @@ -35,7 +35,17 @@ module.exports = { // disallow mixed 'LF' and 'CRLF' as linebreaks 'linebreak-style': 0, // specify the maximum length of a line in your program - "max-len": [2, 100, 4], + // https://github.com/eslint/eslint/blob/master/docs/rules/max-len.md + 'max-len': [2, { + 'code': 100, + 'comments': 100, + 'commentLength': 100, + 'tabWidth': 2, + 'ignoreUrls': false, + 'ignorePattern': null, + 'ignoreTrailingComments': false, + 'ignoreComments': false + }], // specify the maximum depth callbacks can be nested 'max-nested-callbacks': 0, // require a capital letter for constructors