Expose meta data to rules for the Ember version being used
See original GitHub issueThis will allow rules to accommodate the best rules for a given Ember version. This would be helpful for a few existing rules (the recent rule RE: dynamic invocation without fn; the no-capital-arguments rule; and likely others).
There are a couple different logical paths to accomplish this:
-
have the configuration provide the Ember version, something like:
module.exports = { meta: { emberVersion: require('ember-source/package').version }, extends: 'recommended', };
-
attempt to resolve the version (resolvePackagePath relative to the configPath)
I think we could allow both options…
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (8 by maintainers)
Top Results From Across the Web
Handling Metadata - Ember Data
Metadata is data that goes along with a specific model or type instead of a record. Pagination is a common example of using...
Read more >How Ember does Ember.version() from browser console?
I know what is window and its variable. I just want to know how Ember "assigns" variable to window, since I couldn't find...
Read more >salsify/ember-exclaim - GitHub
An addon allowing apps to expose declarative, JSON-configurable custom UIs backed by Ember ... Helpers are used to transform data for an ember-exclaim...
Read more >ember-simple-auth-input-meta-updated - npm package - Snyk
Ember Simple Auth can be used as a browserified version that ... Auth is included in an application (see the Installation instructions for ......
Read more >@ember-data/serializer | Yarn - Package Manager
Provides reference Serializer implementations for use with @ember-data/store ... EmberData is a lightweight reactive data library for JavaScript ...
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
I think I’d prefer to use the existing rule configuration options system that we already have. It seems reasonable that the Ember version would be able to change the default value for config options, but I think we should ensure that all of these things are still overridable.
I’d be concerned about exposing the Ember version to rules for the following reasons:
As @Turbo87 suggested, I’d rather rely on rule options to tell the rules about specific features/preferences they should be aware of.
Now if we really need to have awareness of the Ember version somewhere, maybe the config itself (i.e.
recommended
) could detect the Ember version and configure the rules as desired. Although that makes the config a lot more complex…