Skip to content

Latest commit

 

History

History
63 lines (44 loc) · 858 Bytes

File metadata and controls

63 lines (44 loc) · 858 Bytes

import

always

When this rule is given the always option it will ensure that Ember is ALWAYS explicitly imported as the variable "Ember".

ESLint Configuration

{
  "rules": {
    "ember-standard/import": [2, "always"]
  }
}

Valid

import Ember from 'ember'

export default Ember.Component.extend({
})

Invalid

import Foo from 'ember'

export default Foo.Component.extend({
})

never

When this rule given the never option it will ensure that Ember is NEVER explicitly imported, leaving code to rely on a global Ember variable instead.

ESLint Configuration

{
  "rules": {
    "ember-standard/import": [2, "never"]
  }
}

Valid

export default Ember.Component.extend({
})

Invalid

import Ember from 'ember'

export default Ember.Component.extend({
})