Why does this trigger comma-dangle rule in eslint? -
this looks correct me, why eslint show rule violation, missing trailing comma comma-dangle
@ end of last property "credentials"?
dispatch({ type: login_user, payload: credentials });
.eslintrc
{ "extends": "airbnb", "globals": { "__dev__": true }, "rules": { "react/jsx-quotes": 0, "jsx-quotes": [2, "prefer-double"] } }
based on airbnb
config rule setup comma-dangle: [2, "always-multiline"]
.
acoording this, expected
code is
dispatch({ type: login_user, payload: credentials, });
it expects ,
@ end.
more info on rule: http://eslint.org/docs/rules/comma-dangle
Comments
Post a Comment