163 review linting implementation and resolve errors #164
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses items 1-4 of the AC in #163. Resolving all linting errors is not a trivial task and should be addressed separately. I feel there is value in merging this PR now so that we can establish a baseline for progression.
ESLint has been added to package.json and can be run with
npm run lint
. Note that warnings are currently disabled.The original TSlint rules (tslint.json) were converted to ESLint automatically using tslint-to-eslint-config. tslint.json has been left in the repo for now for comparison purposes but can eventually be removed.
In an attempt to get the baseline reporting as close to TSLint as possible these additional rules were disabled:
Despite this, there are still 692 ESLint errors, compared to 444 with TSLint. Over half of them are code-formatting issues which can easily be resolved with
eslint --fix
. Executing a dry-run withnpx eslint . --quiet --fix-dry-run
indicates there are still 153 which require manual resolution.Two code files have been modified to get the linting passing for illustration purposes. e.g.
npx eslint src/core/index.ts --quiet
Before making any further code changes to satisfy the linter, I suggest: