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

Port tslint-microsoft-contrib's no-function-constructor-with-string-args #3554

Closed
JoshuaKGoldberg opened this issue Dec 6, 2017 · 0 comments · Fixed by #4198
Closed

Port tslint-microsoft-contrib's no-function-constructor-with-string-args #3554

JoshuaKGoldberg opened this issue Dec 6, 2017 · 0 comments · Fixed by #4198

Comments

@JoshuaKGoldberg
Copy link
Contributor

See #1142.

no-function-constructor-with-string-args can now done as an optionally typed rule: without type info it only flags string literals. It should probably also include setInterval and setTimeout, with a config to add other built-in functions that allow strings as functions.

ericanderson pushed a commit that referenced this issue Dec 13, 2018
* Added function-constructor rule

Blocks using the `Function()`/`new Function()` methods to create new functions.

Fixes #3554.

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

Successfully merging a pull request may close this issue.

2 participants