Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Suggest a new rule 'no-plusplus' #4354

Closed
lbb00 opened this issue Dec 8, 2018 · 2 comments
Closed

Suggest a new rule 'no-plusplus' #4354

lbb00 opened this issue Dec 8, 2018 · 2 comments

Comments

@lbb00
Copy link

lbb00 commented Dec 8, 2018

It like eslint:
no-plusplus: ["error", { "allowForLoopAfterthoughts": true }]

Resean:
1、Because the unary ++ and -- operators are subject to automatic semicolon insertion, differences in whitespace can change the semantics of source code.
2、a++ or ++a is difficult to understand sometimes.

Refrence:
EN: resean-1
http://eslint.cn/docs/rules/no-plusplus
CN: resean-2
http://www.yinwang.org/blog-cn/2013/03/15/language-design-mistake1

@JoshuaKGoldberg
Copy link
Contributor

You're in luck, @loveonelong! That rule already exists in tslint-microsoft-contrib.

#1142 tracks migrating rules from there into TSLint core. For now you'll want to follow the instructions in tslint-microsoft-contrib to use the rule.

@lbb00
Copy link
Author

lbb00 commented Dec 10, 2018

You're in luck, @loveonelong! That rule already exists in tslint-microsoft-contrib.

#1142 tracks migrating rules from there into TSLint core. For now you'll want to follow the instructions in tslint-microsoft-contrib to use the rule.

thx

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants