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

[tslint] lint TS fixtures without types #20910

Closed
spalger opened this issue Jul 17, 2018 · 0 comments
Closed

[tslint] lint TS fixtures without types #20910

spalger opened this issue Jul 17, 2018 · 0 comments
Labels
stale Used to mark issues that were closed for being stale Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@spalger
Copy link
Contributor

spalger commented Jul 17, 2018

In order to test that some code using our TypeScript types is flagged by the typescript compiler, it is ideal to be able to commit a fixture that includes invalid TypeScript. By explicitly excluding fixtures from our TypeScript project/tsconfig.json these files won't cause our primary TS project to fail to build, but can still be checked in tests.

This presents an issue with linting though, as we use linter rules that require type information, and therefore must compile properly.

I think we should extend the way we lint our files to use a separate TSLint instance for fixtures that does not use the type-enabled rules and only applies rules for style and such. This way we can have nicely linted TS fixtures, but also have invalid TS fixtures for testing.

@spalger spalger added the Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc label Jul 17, 2018
@joshdover joshdover added the stale Used to mark issues that were closed for being stale label Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Used to mark issues that were closed for being stale Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

No branches or pull requests

2 participants