Standard for Ember CLI apps and addons This plugin is heavily inspired by and based on ember-cli-eslint ember-cli/ember-cli-eslint.
Standard:
ember install ember-cli-standard
Congratulations! You've made the leap into the next generation of JavaScript
Standardization. At the moment, however, ember-cli
defaults to generating
applications and addons with a jshint
configuration.
If you notice the two awkwardly running side by side, click here!
As of ember-cli v.2.5.0
,
jshint
is provided through its own ember-cli-jshint
addon.
Running npm uninstall --save-dev ember-cli-jshint
, in addition to removing
any .jshintrc
files from your project should guarantee that its behavior
is disabled.
Controlling linting is a bit trickier on versions of ember-cli
prior to
2.5.0
. Within your ember-cli-build.js
file, ember-cli-qunit
or
ember-cli-mocha
can be configured to have their default linting process
disabled during:
module.exports = function(defaults) {
const app = new EmberApp(defaults, {
'ember-cli-qunit': {
useLintTree: false
}
});
};
or
module.exports = function(defaults) {
const app = new EmberApp(defaults, {
'ember-cli-mocha': {
useLintTree: false
}
});
};
Alongside this setting, the hinting
property can then be used to
enable/disable globally:
const isTesting = process.env.EMBER_ENV === 'test';
module.exports = function(defaults) {
const app = new EmberApp(defaults, {
hinting: !isTesting,
});
};
It is possible to use ember-cli-standard with experimental JavaScript (ES Next) features but it will require extra setup.
Instructions can be found at https://standardjs.com/#how-do-i-use-experimental-javascript-es-next-features
Standard will be run by ember-cli-qunit
or ember-cli-mocha
automatically
when you run ember test
. If Standard is not being run automatically, try
updating your ember-cli
and/or ember-cli-qunit
/ember-cli-mocha
dependencies.
git clone
this repositorynpm install
bower install
ember server
- Visit your app at http://localhost:4200.
npm test
(Runsember try:testall
to test your addon against multiple Ember versions)ember test
ember test --server
ember build
For more information on using ember-cli, visit http://ember-cli.com/.
This project is licensed under the MIT License.