center-key/clabe-validator

Switch to trailing comma style in spec.js and gulpfile.js

dpilafian opened this issue · 0 comments

For multiline arrays and objects, the consistency of including a comma for the last item makes the code easier to edit and helps reduce merge diffs.

See:
https://jshint.com/docs/options/#trailingcomma

For example, change:

const dataSet = [
   { input: '002', expected: 'BANAMEX' },
   { input: '640', expected: 'CB JPMORGAN' },
   { input: '652', expected: 'CREDICAPITAL' }  //no comma
   ];

to:

const dataSet = [
   { input: '002', expected: 'BANAMEX' },
   { input: '640', expected: 'CB JPMORGAN' },
   { input: '652', expected: 'CREDICAPITAL' },  //with comma
   ];