javascript-algorithms icon indicating copy to clipboard operation
javascript-algorithms copied to clipboard

Begin moving to ES6 syntax via linting changes.

Open JRIngram opened this issue 3 years ago • 0 comments

This PR begin the process of moving to ES6 syntax (which has been discussed in #194 ).

This PR achieves 3 things as part of fix:

1. Adds an explicit eslint script command to the package file.

The rationale behind this was so that the eslint rules could be tweaked to favour ES6 syntax. With an explicit linting script in place we can more easily identify where changes need to occur.

2. Change lint rule to use let / const

As raised in #194, let / const sytanx should be favoured. The linting rules have been changed to flag vars, and the issues have been fixed.

3. Fix previous linting errors

This repository was breaking its own linting rules, such as no-plus-plus. These have been resolved.

Note: I do not believe that this totally resolves #194 and that should remain open; this PR does, however, begin that journey should make the journey easier.

JRIngram avatar Oct 01 '22 15:10 JRIngram