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

Use ESlint instead of TSlint #4901

Merged
merged 17 commits into from May 17, 2019
Merged

Use ESlint instead of TSlint #4901

merged 17 commits into from May 17, 2019

Conversation

domoritz
Copy link
Member

@domoritz domoritz commented Apr 20, 2019

TSLint is deprecated (https://medium.com/palantir/tslint-in-2019-1a144c2317a9) and we already use ESLint in Vega. This makes things consistent.

Once this is in, we can also start using recommended rule sets such as the one from airbnb (https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb).

@domoritz
Copy link
Member Author

domoritz commented Apr 21, 2019

Eslint with typescript has terrible performance so let's not use it until they fix it typescript-eslint/typescript-eslint#389.

Not relevant anymore.

@domoritz domoritz changed the title Use ESlint instead os TSlint Use ESlint instead of TSlint Apr 21, 2019
@domoritz domoritz marked this pull request as ready for review April 21, 2019 06:46
@domoritz domoritz requested a review from kanitw April 21, 2019 06:46
@@ -45,14 +44,15 @@ const project: TransformCompiler = {
const parsed: Dict<SelectionProjection> = {};
const timeUnits: Dict<TimeUnitComponent> = {};

const signals = {};
const signals = new Set<string>();
Copy link
Member Author

Choose a reason for hiding this comment

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

I changed the code here so we don't do an assignment in the return.

@@ -249,27 +249,6 @@ export class UnitModel extends ModelWithField {
return this.encoding;
}

public toSpec(excludeConfig?: any, excludeData?: any) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Removed unused method.

Copy link
Member

Choose a reason for hiding this comment

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

Are you sure it is unused across projects?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think compassql might use it but I think then it would make sense to move it there. https://github.com/search?q=org%3Avega+toSpec&type=Code

@@ -0,0 +1,321 @@
import {AggregateOp} from 'vega';
Copy link
Member Author

Choose a reason for hiding this comment

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

This makes the namespace cleaner.

['bar', 'rule', 'rect'].forEach(mark => {
expect(scaleType({}, channel, {type: t}, 'rect', defaultScaleConfig)).toEqual(ScaleType.BAND);
[BAR, RULE, RECT].forEach(mark => {
expect(scaleType({}, channel, {type: t}, mark, defaultScaleConfig)).toEqual(ScaleType.BAND);
Copy link
Member Author

Choose a reason for hiding this comment

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

This was a bug I found through eslint.

@kanitw
Copy link
Member

kanitw commented Apr 21, 2019

This migration makes sense at some point. The question is whether the TS support in ESLint is good enough yet?

@domoritz
Copy link
Member Author

@domoritz
Copy link
Member Author

Not sure why the PR build fails. It says it can't find tslint but we don't need it anymore. @travis is behaving oddly here, I think.

@domoritz
Copy link
Member Author

I moved Embed over to Eslint.

@kanitw
Copy link
Member

kanitw commented Apr 23, 2019

Btw, if you have time to mess with this, please revert tsc project between src and test first.

@domoritz
Copy link
Member Author

@kanitw I reverted the ts project references. Once it's in, can we merge this (I can merge master into this then)?

@domoritz
Copy link
Member Author

Merged master

Copy link
Member

@kanitw kanitw left a comment

Choose a reason for hiding this comment

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

Please rebase so the test passes, then we can merge?

@domoritz domoritz merged commit cc4197a into master May 17, 2019
@domoritz domoritz deleted the dom/eslint branch May 17, 2019 04:23
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.

None yet

2 participants