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

Implement strict mode in std #213

Closed
kitsonk opened this issue Feb 21, 2019 · 5 comments · Fixed by #453
Closed

Implement strict mode in std #213

kitsonk opened this issue Feb 21, 2019 · 5 comments · Fixed by #453

Comments

@kitsonk
Copy link
Contributor

kitsonk commented Feb 21, 2019

Deno runs in non-strict mode, in the Deno core though, we enforce strict mode. I think we should enforce that for std. I am seeing a lot of code in here that is not compliant with strict mode, which allows a lot of unsafe assignments around null and undefined as well as quite a few other violations which make the code unsound.

We also have quite a few linting violations too, which we catch in core, which are not being caught in our code review, like unused variables, lets where no reassignment occurs, etc...

My opinion is we need to find a way to enforce these as part of the CI process before it gets too far out of hand.

@ry
Copy link
Member

ry commented Feb 21, 2019

Yes - we need TSLint here.

@kitsonk
Copy link
Contributor Author

kitsonk commented Feb 21, 2019

Actually, ESLint. See denoland/deno#1824... TSLint is moving itself into ESLint.

@bartlomieju
Copy link
Member

With ESLing in CI pipeline can we close this issue?

@kitsonk
Copy link
Contributor Author

kitsonk commented May 21, 2019

No, this is more than that. Now that tsconfig.json is support on the CLI, we would want to change the CI to run Deno in strict mode in addition to linting. I haven't tried it yet, but I suspect it will throw out a huge amount of errors.

@bartlomieju
Copy link
Member

Thanks for comment @kitsonk, I'll look into it

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 a pull request may close this issue.

3 participants