Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: tslint cleanup #1704

Merged
1 commit merged into from
Sep 1, 2019
Merged

refactor: tslint cleanup #1704

1 commit merged into from
Sep 1, 2019

Conversation

terencehonles
Copy link
Contributor

@terencehonles terencehonles commented Aug 13, 2019

Configure tslint properly + add some more checks and run yarn lint --fix to fix most and manually fix the rest.

For old branches/PRs run git checkout 3af5f65 package.json tslint.json && yarn && yarn lint --fix and the branch should be easier to merge w/ these changes.

@terencehonles terencehonles force-pushed the fix-tslint branch 2 times, most recently from a7fd976 to 3af5f65 Compare August 13, 2019 03:19
@codecov
Copy link

codecov bot commented Aug 13, 2019

Codecov Report

Merging #1704 into master will decrease coverage by 0.05%.
The diff coverage is 52.84%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1704      +/-   ##
==========================================
- Coverage   47.23%   47.17%   -0.06%     
==========================================
  Files          41       41              
  Lines        1806     1808       +2     
  Branches      166      166              
==========================================
  Hits          853      853              
- Misses        950      952       +2     
  Partials        3        3
Impacted Files Coverage Δ
packages/core/utils/browser-globals.ts 100% <ø> (ø) ⬆️
...es/snazzy-info-window/snazzy-info-window.module.ts 0% <ø> (ø) ⬆️
packages/core/core.module.ts 0% <0%> (ø) ⬆️
packages/core/directives.ts 0% <0%> (ø) ⬆️
packages/core/directives/kml-layer.ts 0% <0%> (ø) ⬆️
...e/services/maps-api-loader/noop-maps-api-loader.ts 0% <0%> (ø) ⬆️
...nazzy-info-window/directives/snazzy-info-window.ts 0% <0%> (ø) ⬆️
...s/js-marker-clusterer/directives/marker-cluster.ts 0% <0%> (ø) ⬆️
packages/core/services/google-maps-types.ts 0% <0%> (ø) ⬆️
packages/js-marker-clusterer/services.ts 0% <0%> (ø) ⬆️
... and 31 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b746ca3...e1516a9. Read the comment docs.

@terencehonles
Copy link
Contributor Author

@doom777 any chance we want to merge this so I can start looking at #1648 again?

@ghost
Copy link

ghost commented Aug 26, 2019

I'll look it it. It's just a lot of changes, so may take me some time

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, terence, thanks for your submission. I made some changes. One of the changes will may require more tslint updates, if you have the time. Thanks.

tslint.json Outdated Show resolved Hide resolved
packages/core/directives/fit-bounds.ts Show resolved Hide resolved
tslint.json Show resolved Hide resolved
packages/core/services/google-maps-types.ts Show resolved Hide resolved
tslint.json Outdated Show resolved Hide resolved
packages/core/services/managers/rectangle-manager.spec.ts Outdated Show resolved Hide resolved

export function createMVCEventObservable<T>(array: MVCArray<T>): Observable<MVCEvent<T>>{
const eventNames = ['insert_at', 'remove_at', 'set_at'];
return fromEventPattern(
(handler: Function) => eventNames.map(evName => array.addListener(evName,
(index: number, previous?: T) => handler.apply(array, [ {'newArr': array.getArray(), evName, index, previous} as MVCEvent<T>]))),
(handler: Function, evListeners: MapsEventListener[]) => evListeners.forEach(evListener => evListener.remove()));
(_handler: Function, evListeners: MapsEventListener[]) => evListeners.forEach(evListener => evListener.remove()));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this renamed? i kept it the same, so it matches its sibling parameter

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TSlint was complaining that it was unused and only didn't complain when it was prefixed with a "_"

@terencehonles
Copy link
Contributor Author

@doom777 I made some updates to the PR based on your requests.

@ghost ghost merged commit 44eac3a into sebholstein:master Sep 1, 2019
@terencehonles terencehonles deleted the fix-tslint branch September 2, 2019 05:19
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant