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

Add es/no-function-prototype-bind rule #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ota-meshi
Copy link
Contributor

This PR adds es/no-function-prototype-bind rule.

es/no-function-prototype-bind rule reports ES5 Function.prototype.bind method as errors.

For how to check if type is a function on TypeScript, I referred to the source code of typescript-eslint.
https://github.com/typescript-eslint/typescript-eslint/blob/7b6f2ab4c0206619b493f6e7f82d280313fec9e9/packages/eslint-plugin/src/rules/no-implied-eval.ts#L69


I noticed that this rule is not implemented.

meta: {
docs: {
description: "disallow the `Function.prototype.bind` method.",
category: "ES5",
Copy link
Contributor Author

@ota-meshi ota-meshi Mar 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you release it in a minor version, we need to change it to undefined so that it doesn't affect the ruleset.
Let me know if you need to change it.

@ota-meshi ota-meshi changed the title Add es/no-function-prototype-bind rule Add es/no-function-prototype-bind rule Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant