5 - array-bracket-spacing
11 - space-after-keywords
13 - space-return-throw-case
15 - https://www.crockford.com/code.html
16 - https://dojotoolkit.org/reference-guide/1.9/developer/styleguide.html
21 Spacing around commas improves readability of a list of items. Although most of the style guidelines for languages prescribe adding a space after a comma and not before it, it is subjective to the preferences of a project.
30 This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.
32 This rule does not apply in either of the following cases:
35 * between opening bracket `[` and comma, to avoid conflicts with the [`array-bracket-spacing`](array-bracket-spacing) rule
36 * between comma and closing bracket `]`, to avoid conflicts with the [`array-bracket-spacing`](array-bracket-spacing) rule
37 * between comma and closing brace `}`, to avoid conflicts with the [`object-curly-spacing`](object-curly-spacing) rule
38 * between comma and closing parentheses `)`, to avoid conflicts with the [`space-in-parens`](space-in-parens) rule
42 This rule has an object option:
44 * `"before": false` (default) disallows spaces before commas
45 * `"before": true` requires one or more spaces before commas
46 * `"after": true` (default) requires one or more spaces after commas
47 * `"after": false` disallows spaces after commas
51 Examples of **incorrect** code for this rule with the default `{ "before": false, "after": true }` options:
56 /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
60 var obj = {"foo": "bar" ,"baz": "qur"};
69 Examples of **correct** code for this rule with the default `{ "before": false, "after": true }` options:
74 /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
80 var obj = {"foo": "bar", "baz": "qur"};
89 Additional examples of **correct** code for this rule with the default `{ "before": false, "after": true }` options:
94 /*eslint comma-spacing: ["error", { "before": false, "after": true }]*/
96 // this rule does not enforce spacing between two commas
102 // this rule does not enforce spacing after `[` and before `]`
110 // this rule does not enforce spacing before `}`
113 import {foo, bar,} from "mod";
115 // this rule does not enforce spacing before `)`
123 Examples of **incorrect** code for this rule with the `{ "before": true, "after": false }` options:
128 /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
130 var foo = 1, bar = 2;
132 var obj = {"foo": "bar", "baz": "qur"};
140 Examples of **correct** code for this rule with the `{ "before": true, "after": false }` options:
145 /*eslint comma-spacing: ["error", { "before": true, "after": false }]*/
147 var foo = 1 ,bar = 2 ,
151 var obj = {"foo": "bar" ,"baz": "qur"};
160 ## When Not To Use It
162 If your project will not be following a consistent comma-spacing pattern, turn this rule off.