diff --git a/.jscsrc b/.jscsrc
new file mode 100644
index 0000000..e24512d
--- /dev/null
+++ b/.jscsrc
@@ -0,0 +1,3 @@
+{
+ "preset": "ember-suave"
+}
diff --git a/.template-lintrc.js b/.template-lintrc.js
new file mode 100644
index 0000000..7feb8b2
--- /dev/null
+++ b/.template-lintrc.js
@@ -0,0 +1,6 @@
+/* jshint node:true */
+'use strict';
+
+module.exports = {
+ extends: 'recommended'
+};
diff --git a/package.json b/package.json
index cfb5263..c9080af 100644
--- a/package.json
+++ b/package.json
@@ -29,11 +29,13 @@
"ember-cli-qunit": "^1.4.0",
"ember-cli-release": "^0.2.9",
"ember-cli-sri": "^2.1.0",
+ "ember-cli-template-lint": "0.4.11",
"ember-cli-uglify": "^1.2.0",
"ember-disable-prototype-extensions": "^1.1.0",
"ember-export-application-global": "^1.0.5",
"ember-load-initializers": "^0.5.1",
"ember-resolver": "^2.0.3",
+ "ember-suave": "4.0.0",
"loader.js": "^4.0.1"
},
"keywords": [
diff --git a/tests/acceptance/interactions-test.js b/tests/acceptance/interactions-test.js
index 786f1f4..3cc23d1 100644
--- a/tests/acceptance/interactions-test.js
+++ b/tests/acceptance/interactions-test.js
@@ -35,7 +35,7 @@ module('Acceptance: Interactions', {
test('#checkByLabel finds a checkbox and checks it', (assert) => {
andThen(checkByLabel('This is the second checkbox'));
andThen(() => {
- const checkedInput = find('#checkbox2:checked');
+ let checkedInput = find('#checkbox2:checked');
assert.equal('second_checkbox', checkedInput.val(), `expected the second checkbox to be checked but found ${checkedInput.val()}`);
});
@@ -60,7 +60,7 @@ test('#clickLink finds a link by its text and clicks it', function(assert) {
andThen(clickLink('First link'));
andThen(() => {
- const url = currentURL();
+ let url = currentURL();
assert.equal(url, '/first-link-target');
});
});
@@ -68,30 +68,30 @@ test('#clickLink finds a link by its text and clicks it', function(assert) {
test('#clickRadioByLabel adds checked attribute to corresponding input', (assert) => {
andThen(clickRadioByLabel('Label for first radio'));
andThen(() => {
- const checkedInput = find('input:checked');
+ let checkedInput = find('input:checked');
assert.equal('radio_1', checkedInput.val(), 'expected radio 1 to be checked');
});
andThen(clickRadioByLabel('Label for second radio'));
andThen(() => {
- const checkedInput = find('input:checked');
+ let checkedInput = find('input:checked');
assert.equal('radio_2', checkedInput.val(), 'expected radio 2 to be checked');
});
});
test('#fillInByLabel enters text into an input corresponding to a label', function(assert) {
- const targetInput = 'form input.node-2';
- const targetValue = 'Jane Doe';
+ let targetInput = 'form input.node-2';
+ let targetValue = 'Jane Doe';
assert.expect(2);
andThen(() => {
- const val = find(targetInput).val();
+ let val = find(targetInput).val();
assert.notEqual(val, targetValue, 'did not expect the input to contain the target value yet');
});
andThen(fillInByLabel('Name', targetValue));
andThen(() => {
- const val = find(targetInput).val();
+ let val = find(targetInput).val();
assert.equal(val, targetValue, 'expected the input to contain the target value');
});
});
@@ -99,7 +99,7 @@ test('#fillInByLabel enters text into an input corresponding to a label', functi
test('#selectByLabel selects a dropdown option by label and option', (assert) => {
andThen(selectByLabel('Label for first select', 'Value 2'));
andThen(() => {
- const selectedOption = find('option:selected');
+ let selectedOption = find('option:selected');
assert.equal('value2', selectedOption.val(), 'expected option 2 to be selected');
});
});
diff --git a/tests/dummy/app/app.js b/tests/dummy/app/app.js
index 831ad61..570bcc4 100644
--- a/tests/dummy/app/app.js
+++ b/tests/dummy/app/app.js
@@ -3,11 +3,13 @@ import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';
+const { Application } = Ember;
+
let App;
Ember.MODEL_FACTORY_INJECTIONS = true;
-App = Ember.Application.extend({
+App = Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver
diff --git a/tests/dummy/app/controllers/index.js b/tests/dummy/app/controllers/index.js
index b3d5513..1387d55 100644
--- a/tests/dummy/app/controllers/index.js
+++ b/tests/dummy/app/controllers/index.js
@@ -1,6 +1,6 @@
import Ember from 'ember';
-let { Controller } = Ember;
+const { Controller } = Ember;
export default Controller.extend({
buttonClickedText: null
diff --git a/tests/dummy/app/router.js b/tests/dummy/app/router.js
index 6c75e1e..3d623f0 100644
--- a/tests/dummy/app/router.js
+++ b/tests/dummy/app/router.js
@@ -1,7 +1,9 @@
import Ember from 'ember';
import config from './config/environment';
-let Router = Ember.Router.extend({
+const { Router: emberRouter } = Ember;
+
+let Router = emberRouter.extend({
location: config.locationType
});
diff --git a/tests/dummy/app/routes/index.js b/tests/dummy/app/routes/index.js
index 049e87d..0114a71 100644
--- a/tests/dummy/app/routes/index.js
+++ b/tests/dummy/app/routes/index.js
@@ -1,7 +1,9 @@
import Ember from 'ember';
-const { Route } = Ember;
-const set = Ember.set;
+const {
+ Route,
+ set
+} = Ember;
export default Route.extend({
actions: {
diff --git a/tests/dummy/app/templates/application.hbs b/tests/dummy/app/templates/application.hbs
index 5b17ba6..e4cea3f 100644
--- a/tests/dummy/app/templates/application.hbs
+++ b/tests/dummy/app/templates/application.hbs
@@ -14,4 +14,4 @@
{{partial "elements/select"}}
{{partial "elements/table"}}
{{partial "elements/ul"}}
-{{link-to 'First link' 'firstLink'}}
+{{link-to "First link" "firstLink"}}
diff --git a/tests/dummy/app/templates/elements/article.hbs b/tests/dummy/app/templates/elements/article.hbs
index bffb7a1..99aaa40 100644
--- a/tests/dummy/app/templates/elements/article.hbs
+++ b/tests/dummy/app/templates/elements/article.hbs
@@ -1,11 +1,3 @@
-