phin icon indicating copy to clipboard operation
phin copied to clipboard

Add eslint to catch errors and enforce style

Open jdforsythe opened this issue 3 years ago • 0 comments

Fixes these issues:

  • https://eslint.org/docs/rules/no-prototype-builtins#disallow-use-of-objectprototypes-builtins-directly-no-prototype-builtins
  • https://eslint.org/docs/rules/no-else-return#disallow-return-before-else-no-else-return
  • Use Object.entries() to get key-value pairs in a loop
  • Use Object.assign() to merge default options (this could be a {...defaultOpts, ...nops} but that is only supported from Node 8.3 (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax#browser_compatibility)

jdforsythe avatar Mar 02 '21 03:03 jdforsythe