Rule no-get-properties not work?
See original GitHub issueIt seems like no-get-properties
rule not work.
I’ve setup error state on this rule in .eslintrc
file, but still linter always pass through without error even though the getProperties function is used incorrectly.
I have the same settings with no-get
rule, but I’m getting error correctly so I guess must be something wrong with this rule.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
c# - Why does GetProperty fail to find it? - Stack Overflow
If I add BindingFlags.Instance to the GetProperties() call, no properties are found, period. This is more consistent, and leads me to believe ...
Read more >Type.GetProperties Method (System) - Microsoft Learn
A method (both virtual and non-virtual) can be hide-by-name or hide-by-name-and-signature. Nested Type, No, No. Property, Not applicable, The common type system ...
Read more >Type.GetProperties() not working in custom inpesctor
I have the following class: public abstract class Binding : MonoBehaviour { public ViewModel ViewModel; public string...
Read more >eslint-plugin-ember/no-get.md at master - GitHub
Starting in Ember 3.1, native ES5 getters are available, which eliminates much of the need to use get / getProperties on Ember objects....
Read more >Type.GetProperties - John Nelson's Blog
To set property values via Reflection, you must use the Type. GetProperty() method, then invoke the PropertyInfo. SetValue() method. The default overload that ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@bobisjan the rule is currently limited to “destructuring assignments” that look like the following example because it’s trivial to simply remove the
getProperties
call from them.Other usages would need a slightly more complex replacement to maintain the same behavior:
If there’s interest in catching this more general usage, I would be open to updating the lint rule to do so.
For our case the
node.id.type
isIdentifier
, which results to skip linting by this condition https://github.com/ember-cli/eslint-plugin-ember/blob/master/lib/rules/no-get-properties.js#L24