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

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -