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

Multi-level member-expression rules support ? #8

Open
ayqy opened this issue Jan 24, 2019 · 1 comment
Open

Multi-level member-expression rules support ? #8

ayqy opened this issue Jan 24, 2019 · 1 comment

Comments

@ayqy
Copy link

ayqy commented Jan 24, 2019

"deprecate/member-expression": ["error",
    {"name": "history.go", "use": "newFunc from this package"}
]

// Normal case, Expected
history.go(); // ERROR

// Case 1, Not expected
window.history.go(); // PASSED
// Case 2, Not expected
const history = {};
history.go(); // ERROR
// Case 3, Not expected
const h = history;
h.go(); // PASSED

Case 3 is complicated for Lint, but Case 1 and 2 are so fragile, Is there any idea to solve this ?

@ayqy
Copy link
Author

ayqy commented Jan 24, 2019

And my situation is that deprecate myGlobal.myNamespace.myFunc, but no way to implement.

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

No branches or pull requests

1 participant