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

Check class of instance that calls getSlidingPercent() #39

Open
imhoffd opened this issue Jul 7, 2018 · 1 comment
Open

Check class of instance that calls getSlidingPercent() #39

imhoffd opened this issue Jul 7, 2018 · 1 comment
Labels
bug Something isn't working

Comments

@imhoffd
Copy link

imhoffd commented Jul 7, 2018

Although less likely to cause problems than an instance that calls create(), we could probably do some more syntax checks like we do for ion-action-sheet-method-create-parameters-renamed and ion-alert-method-create-parameters-renamed.

It appears as though we're just checking for any function call by the name of getSlidingPercent():

if (expression.name && expression.name.text === 'getSlidingPercent') {
const replacement = new Lint.Replacement(expression.name.getStart(), expression.name.getWidth(), 'getSlidingRatio');
this.addFailure(this.createFailure(expression.name.getStart(), expression.name.getWidth(), ruleMessage, replacement));
}

@imhoffd imhoffd added the bug Something isn't working label Jul 7, 2018
@cwoolum
Copy link

cwoolum commented Jul 7, 2018

I'm running into the same problem on #40. It doesn't seem possible to get the type of an IdentityNode unless the developer would have explicitly defined the type. In #40, I chose not to add a fixer for the present part so the user could decide on a case-by-case basis.

cwoolum pushed a commit that referenced this issue Jul 25, 2018
imhoffd pushed a commit that referenced this issue Jul 31, 2018
* feat(rules): Part 1 of the async/await fixers

* docs(readme): update readme

* feat(rules): add rule for present needing await

* docs(readme): update readme to cover new rules

* feat(rules): remove fixer for async/await

#39

* test(tests): add more cases, better rule descriptions
Ionitron added a commit that referenced this issue Jul 31, 2018
# [1.5.0](v1.4.0...v1.5.0) (2018-07-31)

### Bug Fixes

* **packages:** move codelyzer and tslint to dependencies ([#45](#45)) ([3ea86a3](3ea86a3)), closes [#44](#44)

### Features

* **rules:** create/present should use await rule ([#40](#40)) ([c39a8cd](c39a8cd)), closes [#39](#39)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants