brenolf / polyjuice

A utility to convert JSHint and JSCS files into ESLint files and vice-versa
MIT License
275 stars 15 forks source link

jscs requireSpaceAfterKeywords and space-before-function-paren #18

Closed steveoh closed 8 years ago

steveoh commented 8 years ago

http://jscs.info/rule/requireSpaceBeforeKeywords http://jscs.info/rule/disallowSpacesInNamedFunctionExpression http://jscs.info/rule/disallowSpacesInFunctionDeclaration

given .jscs

   "requireSpaceAfterKeywords": [
        "function"
    ],

created

   "space-before-function-paren": [
      2,
      "never"
    ],

When I think it should be

      { "anonymous": "always", "named": "never" }

instead of never

    "disallowSpacesInNamedFunctionExpression": {
        "beforeOpeningRoundBrace": true
    },
    "disallowSpacesInFunctionDeclaration": {
        "beforeOpeningRoundBrace": true
    },

might be throwing it off?

brenolf commented 8 years ago

I tried it here and actually it generates:

{
  "rules": {
    "space-after-keywords": [
      2,
      "always"
    ]
  }
}
brenolf commented 8 years ago

I'll reopen on another example