You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following JSCS rules in my jscsrc file:
• "disallowSpaceBeforeComma": true,
• "disallowTrailingComma": true,
• "requireCommaBeforeLineBreak": true,
• "requireSpaceAfterComma": true,
The resulting eslintrc is: "comma-spacing": [2, { "before": false }],
What I expected was "comma-spacing": [2,{ "before": false, "after": true }], or "comma-spacing": 2,
The comma-spacing rule includes some defaults: http://eslint.org/docs/rules/comma-spacing#options which is how I arrived at "comma-spacing": 2, via JSCS "disallowSpaceBeforeComma": true, and "requireSpaceAfterComma": true, rules.
"before": false (default) disallows spaces before commas
"before": true requires one or more spaces before commas
"after": true (default) requires one or more spaces after commas
"after": false disallows spaces after commas
The text was updated successfully, but these errors were encountered:
The base JSCS version used was v2.0.0, so this rule didn't exist by that time. I'll be implementing the missing rules I identified until v.3.0.2, as you can check here eslint/eslint#5856.
Awesome thanks for the explanation, pretty new, actually up until the JSCS team joined ESLint a couple of days ago I'd never touched JSCS so I'm not really up to date on all the versions...
http://jscs.info/rule/requireSpaceAfterComma http://eslint.org/docs/rules/comma-spacing
JSCS Rule:
"requireSpaceAfterComma": true,
ESlint Rule:
"comma-spacing"
I have the following JSCS rules in my
jscsrc
file:•
"disallowSpaceBeforeComma": true,
•
"disallowTrailingComma": true,
•
"requireCommaBeforeLineBreak": true,
•
"requireSpaceAfterComma": true,
The resulting
eslintrc
is:"comma-spacing": [2, { "before": false }],
What I expected was
"comma-spacing": [2,{ "before": false, "after": true }],
or"comma-spacing": 2,
The
comma-spacing
rule includes some defaults: http://eslint.org/docs/rules/comma-spacing#options which is how I arrived at"comma-spacing": 2,
via JSCS"disallowSpaceBeforeComma": true,
and"requireSpaceAfterComma": true,
rules.The text was updated successfully, but these errors were encountered: