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

Enable max-statements-per-line lint rule #45475

Merged
merged 2 commits into from
Aug 16, 2021

Conversation

RyanCavanaugh
Copy link
Member

@amcasey found this concerning line

const inputTime = getModifiedTime(host, inputFile); host.getModifiedTime(inputFile);

I've turned on the max statements per line rule and fixed all violations. No other suspicious lines were found.

eslint's interpretation of "multiple statements" means this is mostly just regularizing our use of if (e) { s; } to if (e) s; and effectively banning single-line cb(e => { s; })

@RyanCavanaugh RyanCavanaugh changed the title Ban multi statements Enable max-statements-per-line lint rule Aug 16, 2021
@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Aug 16, 2021
@RyanCavanaugh RyanCavanaugh merged commit e00b5ec into microsoft:main Aug 16, 2021
@RyanCavanaugh RyanCavanaugh deleted the banMultiStatements branch August 17, 2021 16:04
BobobUnicorn pushed a commit to BobobUnicorn/TypeScript that referenced this pull request Oct 24, 2021
* Enable the rule

* Fix all the violations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants