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

Rule proposal: No multi non null assertion #1170

Closed
negezor opened this issue Nov 5, 2019 · 2 comments · Fixed by #1183
Closed

Rule proposal: No multi non null assertion #1170

negezor opened this issue Nov 5, 2019 · 2 comments · Fixed by #1183
Labels
enhancement: new plugin rule New rule request for eslint-plugin package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@negezor
Copy link

negezor commented Nov 5, 2019

Currently, non null assertion can be written more than once without any errors.

const one: number | undefined = 1;

const result = one!!!!!!;

I propose to add a rule that will limit the number of characters to 1.

@negezor negezor added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look labels Nov 5, 2019
@bradzacher bradzacher added enhancement: new plugin rule New rule request for eslint-plugin and removed triage Waiting for maintainers to take a look labels Nov 5, 2019
@a-tarasyuk
Copy link
Contributor

@bradzacher what would the acceptable name for this rule?

@bradzacher
Copy link
Member

probably something similar to
https://eslint.org/docs/rules/no-extra-semi

Maybe no-extra-non-null-assertion

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement: new plugin rule New rule request for eslint-plugin package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants