X Tutup
The Wayback Machine - https://web.archive.org/web/20220428050332/https://github.com/microsoft/TypeScript/pull/45475
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

Copy link
Member

@RyanCavanaugh RyanCavanaugh commented Aug 16, 2021

@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 labels Aug 16, 2021
@RyanCavanaugh RyanCavanaugh merged commit e00b5ec into microsoft:main Aug 16, 2021
9 checks passed
@RyanCavanaugh RyanCavanaugh deleted the banMultiStatements branch Aug 17, 2021
BobobUnicorn pushed a commit to BobobUnicorn/TypeScript that referenced this issue 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants
X Tutup