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

Feature/typescript validation #1048

Merged

Conversation

chandlerprall
Copy link
Contributor

Adds linting rules for TypeScript and runs tslint & tsc type checking on the existing lint / lint-fix scripts. Verified both linting and type checking detects problems in src directory.

Fixes existing TS compilation error in the EuiBadge's definition.

@chandlerprall chandlerprall requested a review from snide July 25, 2018 16:25
@chandlerprall
Copy link
Contributor Author

jenkins test this

@snide
Copy link
Contributor

snide commented Jul 25, 2018

@chandlerprall What's the best way to test this? Just screw up some of the definitions?

@chandlerprall
Copy link
Contributor Author

@snide yeah; I also used a dummy.ts file in src/components to test some invalid type usage, like

function add(x: number, y:number) {
  return x + y;
}

add(4, '5');

changing the '5' above to "5" should also demonstrate the linting

Copy link
Contributor

@snide snide left a comment

Choose a reason for hiding this comment

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

I gave this a run locally and seems to work. I'm likely not the best candidate for testing, but it works how I'd expect.

@chandlerprall chandlerprall merged commit ad52b6a into elastic:master Jul 25, 2018
@chandlerprall chandlerprall deleted the feature/typescript-validation branch July 25, 2018 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants