Repository: ember-cli/ember-cli
Pull request #7452 (2017-11-21 05:12:30)

Add `lint:js` scripts.
Add `lint` and `lint:fix` scripts, and add `lint` script to default test run for apps and addons.

This addresses an annoying hole in the default setup where the various "node land" files are not linted as part of CI.

twokul: wondering if we should add a section about these new commands to `README.md` in blueprint
rwjblue: OK, finally got this updated (sorry for the delay). Addressed the following:

* Remove usage of `yarn run lint` (you can just `yarn lint`).
* Renamed `lint` script to `lint:js` to clarify that its only for JS files (and I suspect many apps would add their own `lint:css` script)
* Made the `lint:js:fix` variant only present on non-yarn addons.
* Move `yarn lint` / `npm run lint` earlier in list of CI scripts (to fail faster).
rwjblue: > My remaining concern is, is it worth it to have the extra script in npm to save the extra "--"?

Not sure. I’d be happy to remove the second one and just document it in the README’s.  Think that is good enough?
kellyselden: I like that idea.
rwjblue: @kellyselden - 💨 POOF, DONE!
ro0gr: Recent [module-unification-app](https://github.com/ember-cli/ember-cli/pull/7488) blueprint is missing lint run script.
rwjblue: Thanks @ro0gr (also grumble grumble 😜)

Patch:
diff --git a/blueprints/addon/files/.travis.yml b/blueprints/addon/files/.travis.yml
index 6971fe52f..dad9720ff 100644
--- a/blueprints/addon/files/.travis.yml
+++ b/blueprints/addon/files/.travis.yml
@@ -49,6 +49,7 @@ install:
   - npm --version
 <% } %>
 script:
+  - <% if (yarn) { %>yarn lint:js<% } else { %>npm run lint:js<% } %>
   # Usually, it's ok to finish the test scenario without reverting
   #  to the addon's original dependency state, skipping "cleanup".
   - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup
diff --git a/blueprints/addon/files/README.md b/blueprints/addon/files/README.md
index 292815c90..dfd3bdbff 100644
--- a/blueprints/addon/files/README.md
+++ b/blueprints/addon/files/README.md
@@ -26,6 +26,11 @@ Contributing
 * `cd <%= addonName %>`
 * `<% if (yarn) { %>yarn<% } else { %>npm<% } %> install`
 
+### Linting
+
+* `<% if (yarn) { %>yarn lint:js<% } else { %>npm run lint:js<% } %>`
+* `<% if (yarn) { %>yarn lint:js --fix<% } else { %>npm run lint:js -- --fix<% } %>`
+
 ### Running tests
 
 * `ember test` – Runs the test suite on the current Ember version
@@ -39,7 +44,6 @@ Contributing
 
 For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
 
-
 License
 ------------------------------------------------------------------------------
 
diff --git a/blueprints/addon/files/npmignore b/blueprints/addon/files/npmignore
index 135c7b1f2..e07b07831 100644
--- a/blueprints/addon/files/npmignore
+++ b/blueprints/addon/files/npmignore
@@ -7,8 +7,8 @@
 .bowerrc
 .editorconfig
 .ember-cli
-.eslintrc.js
 .gitignore
+.eslintrc.js
 .watchmanconfig
 .travis.yml
 bower.json
diff --git a/blueprints/addon/index.js b/blueprints/addon/index.js
index fab616769..911f3ed15 100644
--- a/blueprints/addon/index.js
+++ b/blueprints/addon/index.js
@@ -65,6 +65,9 @@ module.exports = {
     // use `ember-try` as test script in addons by default
     contents.scripts.test = 'ember try:each';
 
+    // add addon specific directories to lint:js script
+    contents.scripts['lint:js'] = 'eslint ./*.js addon addon-test-support app config lib server test-support tests';
+
     contents['ember-addon'] = contents['ember-addon'] || {};
     contents['ember-addon'].configPath = 'tests/dummy/config';
 
diff --git a/blueprints/app/files/.travis.yml b/blueprints/app/files/.travis.yml
index 75eef5779..24bfe322e 100644
--- a/blueprints/app/files/.travis.yml
+++ b/blueprints/app/files/.travis.yml
@@ -21,13 +21,14 @@ env:
     # See https://git.io/vdao3 for details.
     - JOBS=1
 
-before_install:<% if (yarn) { %>
+before_install:<% if (!yarn) { %>
+  - npm config set spin false<% } else { %>
   - curl -o- -L https://yarnpkg.com/install.sh | bash
   - export PATH=$HOME/.yarn/bin:$PATH
 
 install:
-  - yarn install --non-interactive
+  - yarn install --non-interactive<% } %>
 
 script:
-  - yarn test<% } else { %>
-  - npm config set spin false<% } %>
+  - <% if (yarn) { %>yarn lint:js<% } else { %>npm run lint:js<% } %>
+  - <% if (yarn) { %>yarn<% } else { %>npm<% } %> test
diff --git a/blueprints/app/files/README.md b/blueprints/app/files/README.md
index a49d422b4..265530bed 100644
--- a/blueprints/app/files/README.md
+++ b/blueprints/app/files/README.md
@@ -34,6 +34,11 @@ Make use of the many generators for code, try `ember help generate` for more det
 * `ember test`
 * `ember test --server`
 
+### Linting
+
+* `<% if (yarn) { %>yarn lint:js<% } else { %>npm run lint:js<% } %>`
+* `<% if (yarn) { %>yarn lint:js --fix<% } else { %>npm run lint:js -- --fix<% } %>`
+
 ### Building
 
 * `ember build` (development)
diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json
index 431c05005..ef2edb601 100644
--- a/blueprints/app/files/package.json
+++ b/blueprints/app/files/package.json
@@ -12,6 +12,7 @@
   "repository": "",
   "scripts": {
     "build": "ember build",
+    "lint:js": "eslint ./*.js app config lib server tests",
     "start": "ember serve",
     "test": "ember test"
   },
diff --git a/blueprints/module-unification-app/files/.travis.yml b/blueprints/module-unification-app/files/.travis.yml
index 9fa264afc..b758016bc 100644
--- a/blueprints/module-unification-app/files/.travis.yml
+++ b/blueprints/module-unification-app/files/.travis.yml
@@ -11,29 +11,28 @@ addons:
 <% if (yarn) { %>
 cache:
   yarn: true
+<% } else { %>
+cache:
+  directories:
+    - $HOME/.npm
+<% } %>
+env:
+  global:
+    # See https://git.io/vdao3 for details.
+    - JOBS=1
 
-before_install:
+before_install:<% if (!yarn) { %>
+  - npm config set spin false<% } else { %>
   - curl -o- -L https://yarnpkg.com/install.sh | bash
   - export PATH=$HOME/.yarn/bin:$PATH
 
 install:
-  - yarn install --non-interactive
+  - yarn install --non-interactive<% } %>
 
 before_script:
-  - npm install -g bower
+  - <% if (yarn) { %>yarn global add bower<% } else { %>npm install -g bower<% } %>
   - bower install
 
 script:
-  - yarn test
-<% } else { %>
-cache:
-  directories:
-    - $HOME/.npm
-
-before_install:
-  - npm config set spin false
-
-before_script:
-  - npm install -g bower
-  - bower install
-<% } %>
+  - <% if (yarn) { %>yarn lint:js<% } else { %>npm run lint:js<% } %>
+  - <% if (yarn) { %>yarn<% } else { %>npm<% } %> test
diff --git a/blueprints/module-unification-app/files/README.md b/blueprints/module-unification-app/files/README.md
index 0223e5eb5..265530bed 100644
--- a/blueprints/module-unification-app/files/README.md
+++ b/blueprints/module-unification-app/files/README.md
@@ -9,7 +9,7 @@ You will need the following things properly installed on your computer.
 
 * [Git](https://git-scm.com/)
 * [Node.js](https://nodejs.org/)<% if (yarn) { %>
-* [Yarn](https://yarnpkg.com/)<% } else { %> (with NPM)<% } %>
+* [Yarn](https://yarnpkg.com/)<% } else { %> (with npm)<% } %>
 * [Ember CLI](https://ember-cli.com/)
 * [Google Chrome](https://google.com/chrome/)
 
@@ -23,6 +23,7 @@ You will need the following things properly installed on your computer.
 
 * `ember serve`
 * Visit your app at [http://localhost:4200](http://localhost:4200).
+* Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests).
 
 ### Code Generators
 
@@ -33,6 +34,11 @@ Make use of the many generators for code, try `ember help generate` for more det
 * `ember test`
 * `ember test --server`
 
+### Linting
+
+* `<% if (yarn) { %>yarn lint:js<% } else { %>npm run lint:js<% } %>`
+* `<% if (yarn) { %>yarn lint:js --fix<% } else { %>npm run lint:js -- --fix<% } %>`
+
 ### Building
 
 * `ember build` (development)
diff --git a/blueprints/module-unification-app/files/package.json b/blueprints/module-unification-app/files/package.json
index 54dbb2242..5598b07df 100644
--- a/blueprints/module-unification-app/files/package.json
+++ b/blueprints/module-unification-app/files/package.json
@@ -12,7 +12,8 @@
   "repository": "",
   "scripts": {
     "build": "ember build",
-    "start": "ember server",
+    "lint:js": "eslint ./*.js app config lib server tests",
+    "start": "ember serve",
     "test": "ember test"
   },
   "devDependencies": {
diff --git a/blueprints/module-unification-app/files/src/ui/routes/application/template.hbs b/blueprints/module-unification-app/files/src/ui/routes/application/template.hbs
index 8a64bd03d..347236121 100644
--- a/blueprints/module-unification-app/files/src/ui/routes/application/template.hbs
+++ b/blueprints/module-unification-app/files/src/ui/routes/application/template.hbs
@@ -3,4 +3,4 @@
 {{!-- Feel free to remove this! --}}
 <% } else { %><h2 id="title">Welcome to Ember</h2>
 <% } %>
-{{outlet}}
+{{outlet}}
\ No newline at end of file


Test patch:
diff --git a/tests/acceptance/new-test.js b/tests/acceptance/new-test.js
index 0450443e3..a5e100b87 100644
--- a/tests/acceptance/new-test.js
+++ b/tests/acceptance/new-test.js
@@ -379,6 +379,66 @@ describe('Acceptance: ember new', function() {
   }));
 
   describe('verify fixtures', function() {
+    function checkPackageJson(fixtureName) {
+      let currentVersion = require('../../package').version;
+      let fixturePath = path.join(__dirname, '../fixtures', fixtureName, 'package.json');
+      let fixtureContents = fs.readFileSync(fixturePath, { encoding: 'utf-8' })
+        .replace("<%= emberCLIVersion %>", currentVersion);
+
+      expect(file('package.json'))
+        .to.equal(fixtureContents);
+    }
+
+    it('module-unification-app + npm + !welcome', co.wrap(function *() {
+      yield ember([
+        'new',
+        'foo',
+        '--blueprint',
+        'module-unification-app',
+        '--skip-npm',
+        '--skip-bower',
+        '--skip-git',
+        '--no-welcome',
+      ]);
+
+      let fixturePath = 'module-unification-app/npm';
+      [
+        'src/ui/routes/application/template.hbs',
+        '.travis.yml',
+        'README.md',
+      ].forEach(filePath => {
+        expect(file(filePath))
+          .to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath)));
+      });
+
+      checkPackageJson(fixturePath);
+    }));
+
+    it('module-unification-app + yarn + welcome', co.wrap(function *() {
+      yield ember([
+        'new',
+        'foo',
+        '--blueprint',
+        'module-unification-app',
+        '--skip-npm',
+        '--skip-bower',
+        '--skip-git',
+        '--yarn',
+      ]);
+
+      let fixturePath = 'module-unification-app/yarn';
+      [
+        'src/ui/routes/application/template.hbs',
+        '.travis.yml',
+        'README.md',
+      ].forEach(filePath => {
+        expect(file(filePath))
+          .to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath)));
+      });
+
+      checkPackageJson(fixturePath);
+    }));
+
     it('app + npm + !welcome', co.wrap(function *() {
       yield ember([
         'new',
@@ -389,14 +449,17 @@ describe('Acceptance: ember new', function() {
         '--no-welcome',
       ]);
 
+      let fixturePath = 'app/npm';
       [
         'app/templates/application.hbs',
         '.travis.yml',
         'README.md',
       ].forEach(filePath => {
         expect(file(filePath))
-          .to.equal(file(path.join(__dirname, '../fixtures/app/npm', filePath)));
+          .to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath)));
       });
+
+      checkPackageJson(fixturePath);
     }));
 
     it('app + yarn + welcome', co.wrap(function *() {
@@ -409,14 +472,17 @@ describe('Acceptance: ember new', function() {
         '--yarn',
       ]);
 
+      let fixturePath = 'app/yarn';
       [
         'app/templates/application.hbs',
         '.travis.yml',
         'README.md',
       ].forEach(filePath => {
         expect(file(filePath))
-          .to.equal(file(path.join(__dirname, '../fixtures/app/yarn', filePath)));
+          .to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath)));
       });
+
+      checkPackageJson(fixturePath);
     }));
 
     it('addon + npm + !welcome', co.wrap(function *() {
@@ -428,6 +494,7 @@ describe('Acceptance: ember new', function() {
         '--skip-git',
       ]);
 
+      let fixturePath = 'addon/npm';
       [
         'config/ember-try.js',
         'tests/dummy/app/templates/application.hbs',
@@ -435,8 +502,10 @@ describe('Acceptance: ember new', function() {
         'README.md',
       ].forEach(filePath => {
         expect(file(filePath))
-          .to.equal(file(path.join(__dirname, '../fixtures/addon/npm', filePath)));
+          .to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath)));
       });
+
+      checkPackageJson(fixturePath);
     }));
 
     it('addon + yarn + welcome', co.wrap(function *() {
@@ -450,6 +519,7 @@ describe('Acceptance: ember new', function() {
         '--welcome',
       ]);
 
+      let fixturePath = 'addon/yarn';
       [
         'config/ember-try.js',
         'tests/dummy/app/templates/application.hbs',
@@ -457,8 +527,10 @@ describe('Acceptance: ember new', function() {
         'README.md',
       ].forEach(filePath => {
         expect(file(filePath))
-          .to.equal(file(path.join(__dirname, '../fixtures/addon/yarn', filePath)));
+          .to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath)));
       });
+
+      checkPackageJson(fixturePath);
     }));
   });
 
diff --git a/tests/fixtures/addon/npm/.travis.yml b/tests/fixtures/addon/npm/.travis.yml
index 38b4be764..5b24d5f1d 100644
--- a/tests/fixtures/addon/npm/.travis.yml
+++ b/tests/fixtures/addon/npm/.travis.yml
@@ -40,6 +40,7 @@ before_install:
   - npm --version
 
 script:
+  - npm run lint:js
   # Usually, it's ok to finish the test scenario without reverting
   #  to the addon's original dependency state, skipping "cleanup".
   - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup
diff --git a/tests/fixtures/addon/npm/README.md b/tests/fixtures/addon/npm/README.md
index 744417746..872a2c4b7 100644
--- a/tests/fixtures/addon/npm/README.md
+++ b/tests/fixtures/addon/npm/README.md
@@ -26,6 +26,11 @@ Contributing
 * `cd foo`
 * `npm install`
 
+### Linting
+
+* `npm run lint:js`
+* `npm run lint:js -- --fix`
+
 ### Running tests
 
 * `ember test` – Runs the test suite on the current Ember version
@@ -39,7 +44,6 @@ Contributing
 
 For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
 
-
 License
 ------------------------------------------------------------------------------
 
diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json
new file mode 100644
index 000000000..03459db49
--- /dev/null
+++ b/tests/fixtures/addon/npm/package.json
@@ -0,0 +1,51 @@
+{
+  "name": "foo",
+  "version": "0.0.0",
+  "description": "The default blueprint for ember-cli addons.",
+  "keywords": [
+    "ember-addon"
+  ],
+  "license": "MIT",
+  "author": "",
+  "directories": {
+    "doc": "doc",
+    "test": "tests"
+  },
+  "repository": "",
+  "scripts": {
+    "build": "ember build",
+    "lint:js": "eslint ./*.js addon addon-test-support app config lib server test-support tests",
+    "start": "ember serve",
+    "test": "ember try:each"
+  },
+  "dependencies": {
+    "ember-cli-babel": "^6.6.0"
+  },
+  "devDependencies": {
+    "broccoli-asset-rev": "^2.4.5",
+    "ember-ajax": "^3.0.0",
+    "ember-cli": "~<%= emberCLIVersion %>",
+    "ember-cli-dependency-checker": "^2.0.0",
+    "ember-cli-eslint": "^4.2.1",
+    "ember-cli-htmlbars": "^2.0.1",
+    "ember-cli-htmlbars-inline-precompile": "^1.0.0",
+    "ember-cli-inject-live-reload": "^1.4.1",
+    "ember-cli-qunit": "^4.1.1",
+    "ember-cli-shims": "^1.2.0",
+    "ember-cli-sri": "^2.1.0",
+    "ember-cli-uglify": "^2.0.0",
+    "ember-disable-prototype-extensions": "^1.1.2",
+    "ember-export-application-global": "^2.0.0",
+    "ember-load-initializers": "^1.0.0",
+    "ember-resolver": "^4.0.0",
+    "ember-source": "~2.18.0-beta.3",
+    "eslint-plugin-ember": "^5.0.0",
+    "loader.js": "^4.2.3"
+  },
+  "engines": {
+    "node": "^4.5 || 6.* || >= 7.*"
+  },
+  "ember-addon": {
+    "configPath": "tests/dummy/config"
+  }
+}
diff --git a/tests/fixtures/addon/yarn/.travis.yml b/tests/fixtures/addon/yarn/.travis.yml
index 9f30c1837..d44b7772a 100644
--- a/tests/fixtures/addon/yarn/.travis.yml
+++ b/tests/fixtures/addon/yarn/.travis.yml
@@ -41,6 +41,7 @@ install:
   - yarn install --no-lockfile --non-interactive
 
 script:
+  - yarn lint:js
   # Usually, it's ok to finish the test scenario without reverting
   #  to the addon's original dependency state, skipping "cleanup".
   - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup
diff --git a/tests/fixtures/addon/yarn/README.md b/tests/fixtures/addon/yarn/README.md
index df6379b26..823b73be5 100644
--- a/tests/fixtures/addon/yarn/README.md
+++ b/tests/fixtures/addon/yarn/README.md
@@ -26,6 +26,11 @@ Contributing
 * `cd foo`
 * `yarn install`
 
+### Linting
+
+* `yarn lint:js`
+* `yarn lint:js --fix`
+
 ### Running tests
 
 * `ember test` – Runs the test suite on the current Ember version
@@ -39,7 +44,6 @@ Contributing
 
 For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
 
-
 License
 ------------------------------------------------------------------------------
 
diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json
new file mode 100644
index 000000000..ba93ae687
--- /dev/null
+++ b/tests/fixtures/addon/yarn/package.json
@@ -0,0 +1,52 @@
+{
+  "name": "foo",
+  "version": "0.0.0",
+  "description": "The default blueprint for ember-cli addons.",
+  "keywords": [
+    "ember-addon"
+  ],
+  "license": "MIT",
+  "author": "",
+  "directories": {
+    "doc": "doc",
+    "test": "tests"
+  },
+  "repository": "",
+  "scripts": {
+    "build": "ember build",
+    "lint:js": "eslint ./*.js addon addon-test-support app config lib server test-support tests",
+    "start": "ember serve",
+    "test": "ember try:each"
+  },
+  "dependencies": {
+    "ember-cli-babel": "^6.6.0"
+  },
+  "devDependencies": {
+    "broccoli-asset-rev": "^2.4.5",
+    "ember-ajax": "^3.0.0",
+    "ember-cli": "~<%= emberCLIVersion %>",
+    "ember-cli-dependency-checker": "^2.0.0",
+    "ember-cli-eslint": "^4.2.1",
+    "ember-cli-htmlbars": "^2.0.1",
+    "ember-cli-htmlbars-inline-precompile": "^1.0.0",
+    "ember-cli-inject-live-reload": "^1.4.1",
+    "ember-cli-qunit": "^4.1.1",
+    "ember-cli-shims": "^1.2.0",
+    "ember-cli-sri": "^2.1.0",
+    "ember-cli-uglify": "^2.0.0",
+    "ember-disable-prototype-extensions": "^1.1.2",
+    "ember-export-application-global": "^2.0.0",
+    "ember-load-initializers": "^1.0.0",
+    "ember-resolver": "^4.0.0",
+    "ember-source": "~2.18.0-beta.3",
+    "ember-welcome-page": "^3.0.0",
+    "eslint-plugin-ember": "^5.0.0",
+    "loader.js": "^4.2.3"
+  },
+  "engines": {
+    "node": "^4.5 || 6.* || >= 7.*"
+  },
+  "ember-addon": {
+    "configPath": "tests/dummy/config"
+  }
+}
diff --git a/tests/fixtures/app/npm/.travis.yml b/tests/fixtures/app/npm/.travis.yml
index 7a6dc7128..54dcdb2ab 100644
--- a/tests/fixtures/app/npm/.travis.yml
+++ b/tests/fixtures/app/npm/.travis.yml
@@ -20,3 +20,7 @@ env:
 
 before_install:
   - npm config set spin false
+
+script:
+  - npm run lint:js
+  - npm test
diff --git a/tests/fixtures/app/npm/README.md b/tests/fixtures/app/npm/README.md
index ab9c24be1..945ac35b7 100644
--- a/tests/fixtures/app/npm/README.md
+++ b/tests/fixtures/app/npm/README.md
@@ -33,6 +33,11 @@ Make use of the many generators for code, try `ember help generate` for more det
 * `ember test`
 * `ember test --server`
 
+### Linting
+
+* `npm run lint:js`
+* `npm run lint:js -- --fix`
+
 ### Building
 
 * `ember build` (development)
diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json
new file mode 100644
index 000000000..82fe8addd
--- /dev/null
+++ b/tests/fixtures/app/npm/package.json
@@ -0,0 +1,45 @@
+{
+  "name": "foo",
+  "version": "0.0.0",
+  "private": true,
+  "description": "Small description for foo goes here",
+  "license": "MIT",
+  "author": "",
+  "directories": {
+    "doc": "doc",
+    "test": "tests"
+  },
+  "repository": "",
+  "scripts": {
+    "build": "ember build",
+    "lint:js": "eslint ./*.js app config lib server tests",
+    "start": "ember serve",
+    "test": "ember test"
+  },
+  "devDependencies": {
+    "broccoli-asset-rev": "^2.4.5",
+    "ember-ajax": "^3.0.0",
+    "ember-cli": "~<%= emberCLIVersion %>",
+    "ember-cli-app-version": "^3.0.0",
+    "ember-cli-babel": "^6.6.0",
+    "ember-cli-dependency-checker": "^2.0.0",
+    "ember-cli-eslint": "^4.2.1",
+    "ember-cli-htmlbars": "^2.0.1",
+    "ember-cli-htmlbars-inline-precompile": "^1.0.0",
+    "ember-cli-inject-live-reload": "^1.4.1",
+    "ember-cli-qunit": "^4.1.1",
+    "ember-cli-shims": "^1.2.0",
+    "ember-cli-sri": "^2.1.0",
+    "ember-cli-uglify": "^2.0.0",
+    "ember-data": "~2.18.0-beta.1",
+    "ember-export-application-global": "^2.0.0",
+    "ember-load-initializers": "^1.0.0",
+    "ember-resolver": "^4.0.0",
+    "ember-source": "~2.18.0-beta.3",
+    "eslint-plugin-ember": "^5.0.0",
+    "loader.js": "^4.2.3"
+  },
+  "engines": {
+    "node": "^4.5 || 6.* || >= 7.*"
+  }
+}
diff --git a/tests/fixtures/app/yarn/.travis.yml b/tests/fixtures/app/yarn/.travis.yml
index 224eafc8b..68a25a16e 100644
--- a/tests/fixtures/app/yarn/.travis.yml
+++ b/tests/fixtures/app/yarn/.travis.yml
@@ -25,4 +25,5 @@ install:
   - yarn install --non-interactive
 
 script:
+  - yarn lint:js
   - yarn test
diff --git a/tests/fixtures/app/yarn/README.md b/tests/fixtures/app/yarn/README.md
index 6e440cbf2..9b51bda11 100644
--- a/tests/fixtures/app/yarn/README.md
+++ b/tests/fixtures/app/yarn/README.md
@@ -34,6 +34,11 @@ Make use of the many generators for code, try `ember help generate` for more det
 * `ember test`
 * `ember test --server`
 
+### Linting
+
+* `yarn lint:js`
+* `yarn lint:js --fix`
+
 ### Building
 
 * `ember build` (development)
diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json
new file mode 100644
index 000000000..c894b1a92
--- /dev/null
+++ b/tests/fixtures/app/yarn/package.json
@@ -0,0 +1,46 @@
+{
+  "name": "foo",
+  "version": "0.0.0",
+  "private": true,
+  "description": "Small description for foo goes here",
+  "license": "MIT",
+  "author": "",
+  "directories": {
+    "doc": "doc",
+    "test": "tests"
+  },
+  "repository": "",
+  "scripts": {
+    "build": "ember build",
+    "lint:js": "eslint ./*.js app config lib server tests",
+    "start": "ember serve",
+    "test": "ember test"
+  },
+  "devDependencies": {
+    "broccoli-asset-rev": "^2.4.5",
+    "ember-ajax": "^3.0.0",
+    "ember-cli": "~<%= emberCLIVersion %>",
+    "ember-cli-app-version": "^3.0.0",
+    "ember-cli-babel": "^6.6.0",
+    "ember-cli-dependency-checker": "^2.0.0",
+    "ember-cli-eslint": "^4.2.1",
+    "ember-cli-htmlbars": "^2.0.1",
+    "ember-cli-htmlbars-inline-precompile": "^1.0.0",
+    "ember-cli-inject-live-reload": "^1.4.1",
+    "ember-cli-qunit": "^4.1.1",
+    "ember-cli-shims": "^1.2.0",
+    "ember-cli-sri": "^2.1.0",
+    "ember-cli-uglify": "^2.0.0",
+    "ember-data": "~2.18.0-beta.1",
+    "ember-export-application-global": "^2.0.0",
+    "ember-load-initializers": "^1.0.0",
+    "ember-resolver": "^4.0.0",
+    "ember-source": "~2.18.0-beta.3",
+    "ember-welcome-page": "^3.0.0",
+    "eslint-plugin-ember": "^5.0.0",
+    "loader.js": "^4.2.3"
+  },
+  "engines": {
+    "node": "^4.5 || 6.* || >= 7.*"
+  }
+}
diff --git a/tests/fixtures/module-unification-app/npm/.travis.yml b/tests/fixtures/module-unification-app/npm/.travis.yml
new file mode 100644
index 000000000..f55a67fa5
--- /dev/null
+++ b/tests/fixtures/module-unification-app/npm/.travis.yml
@@ -0,0 +1,30 @@
+---
+language: node_js
+node_js:
+  - "6"
+
+sudo: false
+dist: trusty
+
+addons:
+  chrome: stable
+
+cache:
+  directories:
+    - $HOME/.npm
+
+env:
+  global:
+    # See https://git.io/vdao3 for details.
+    - JOBS=1
+
+before_install:
+  - npm config set spin false
+
+before_script:
+  - npm install -g bower
+  - bower install
+
+script:
+  - npm run lint:js
+  - npm test
diff --git a/tests/fixtures/module-unification-app/npm/README.md b/tests/fixtures/module-unification-app/npm/README.md
new file mode 100644
index 000000000..945ac35b7
--- /dev/null
+++ b/tests/fixtures/module-unification-app/npm/README.md
@@ -0,0 +1,56 @@
+# foo
+
+This README outlines the details of collaborating on this Ember application.
+A short introduction of this app could easily go here.
+
+## Prerequisites
+
+You will need the following things properly installed on your computer.
+
+* [Git](https://git-scm.com/)
+* [Node.js](https://nodejs.org/) (with npm)
+* [Ember CLI](https://ember-cli.com/)
+* [Google Chrome](https://google.com/chrome/)
+
+## Installation
+
+* `git clone <repository-url>` this repository
+* `cd foo`
+* `npm install`
+
+## Running / Development
+
+* `ember serve`
+* Visit your app at [http://localhost:4200](http://localhost:4200).
+* Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests).
+
+### Code Generators
+
+Make use of the many generators for code, try `ember help generate` for more details
+
+### Running Tests
+
+* `ember test`
+* `ember test --server`
+
+### Linting
+
+* `npm run lint:js`
+* `npm run lint:js -- --fix`
+
+### Building
+
+* `ember build` (development)
+* `ember build --environment production` (production)
+
+### Deploying
+
+Specify what it takes to deploy your app.
+
+## Further Reading / Useful Links
+
+* [ember.js](https://emberjs.com/)
+* [ember-cli](https://ember-cli.com/)
+* Development Browser Extensions
+  * [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)
+  * [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)
diff --git a/tests/fixtures/module-unification-app/npm/package.json b/tests/fixtures/module-unification-app/npm/package.json
new file mode 100644
index 000000000..1d31fa7ba
--- /dev/null
+++ b/tests/fixtures/module-unification-app/npm/package.json
@@ -0,0 +1,44 @@
+{
+  "name": "foo",
+  "version": "0.0.0",
+  "private": true,
+  "description": "Small description for foo goes here",
+  "license": "MIT",
+  "author": "",
+  "directories": {
+    "doc": "doc",
+    "test": "tests"
+  },
+  "repository": "",
+  "scripts": {
+    "build": "ember build",
+    "lint:js": "eslint ./*.js app config lib server tests",
+    "start": "ember serve",
+    "test": "ember test"
+  },
+  "devDependencies": {
+    "broccoli-asset-rev": "^2.4.5",
+    "ember-ajax": "^3.0.0",
+    "ember-cli": "github:ember-cli/ember-cli",
+    "ember-cli-app-version": "^3.0.0",
+    "ember-cli-babel": "^6.6.0",
+    "ember-cli-dependency-checker": "^2.0.0",
+    "ember-cli-eslint": "^4.2.1",
+    "ember-cli-htmlbars": "^2.0.1",
+    "ember-cli-htmlbars-inline-precompile": "^1.0.0",
+    "ember-cli-inject-live-reload": "^1.4.1",
+    "ember-cli-qunit": "^4.1.1",
+    "ember-cli-shims": "^1.2.0",
+    "ember-cli-sri": "^2.1.0",
+    "ember-cli-uglify": "^2.0.0",
+    "ember-data": "~2.18.0-beta.1",
+    "ember-export-application-global": "^2.0.0",
+    "ember-load-initializers": "^1.0.0",
+    "ember-resolver": "^4.0.0",
+    "eslint-plugin-ember": "^5.0.0",
+    "loader.js": "^4.2.3"
+  },
+  "engines": {
+    "node": "^4.5 || 6.* || >= 7.*"
+  }
+}
diff --git a/tests/fixtures/module-unification-app/npm/src/ui/routes/application/template.hbs b/tests/fixtures/module-unification-app/npm/src/ui/routes/application/template.hbs
new file mode 100644
index 000000000..5230580f8
--- /dev/null
+++ b/tests/fixtures/module-unification-app/npm/src/ui/routes/application/template.hbs
@@ -0,0 +1,3 @@
+<h2 id="title">Welcome to Ember</h2>
+
+{{outlet}}
\ No newline at end of file
diff --git a/tests/fixtures/module-unification-app/yarn/.travis.yml b/tests/fixtures/module-unification-app/yarn/.travis.yml
new file mode 100644
index 000000000..6f547727e
--- /dev/null
+++ b/tests/fixtures/module-unification-app/yarn/.travis.yml
@@ -0,0 +1,33 @@
+---
+language: node_js
+node_js:
+  - "6"
+
+sudo: false
+dist: trusty
+
+addons:
+  chrome: stable
+
+cache:
+  yarn: true
+
+env:
+  global:
+    # See https://git.io/vdao3 for details.
+    - JOBS=1
+
+before_install:
+  - curl -o- -L https://yarnpkg.com/install.sh | bash
+  - export PATH=$HOME/.yarn/bin:$PATH
+
+install:
+  - yarn install --non-interactive
+
+before_script:
+  - yarn global add bower
+  - bower install
+
+script:
+  - yarn lint:js
+  - yarn test
diff --git a/tests/fixtures/module-unification-app/yarn/README.md b/tests/fixtures/module-unification-app/yarn/README.md
new file mode 100644
index 000000000..9b51bda11
--- /dev/null
+++ b/tests/fixtures/module-unification-app/yarn/README.md
@@ -0,0 +1,57 @@
+# foo
+
+This README outlines the details of collaborating on this Ember application.
+A short introduction of this app could easily go here.
+
+## Prerequisites
+
+You will need the following things properly installed on your computer.
+
+* [Git](https://git-scm.com/)
+* [Node.js](https://nodejs.org/)
+* [Yarn](https://yarnpkg.com/)
+* [Ember CLI](https://ember-cli.com/)
+* [Google Chrome](https://google.com/chrome/)
+
+## Installation
+
+* `git clone <repository-url>` this repository
+* `cd foo`
+* `yarn install`
+
+## Running / Development
+
+* `ember serve`
+* Visit your app at [http://localhost:4200](http://localhost:4200).
+* Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests).
+
+### Code Generators
+
+Make use of the many generators for code, try `ember help generate` for more details
+
+### Running Tests
+
+* `ember test`
+* `ember test --server`
+
+### Linting
+
+* `yarn lint:js`
+* `yarn lint:js --fix`
+
+### Building
+
+* `ember build` (development)
+* `ember build --environment production` (production)
+
+### Deploying
+
+Specify what it takes to deploy your app.
+
+## Further Reading / Useful Links
+
+* [ember.js](https://emberjs.com/)
+* [ember-cli](https://ember-cli.com/)
+* Development Browser Extensions
+  * [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)
+  * [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)
diff --git a/tests/fixtures/module-unification-app/yarn/package.json b/tests/fixtures/module-unification-app/yarn/package.json
new file mode 100644
index 000000000..7706c5917
--- /dev/null
+++ b/tests/fixtures/module-unification-app/yarn/package.json
@@ -0,0 +1,45 @@
+{
+  "name": "foo",
+  "version": "0.0.0",
+  "private": true,
+  "description": "Small description for foo goes here",
+  "license": "MIT",
+  "author": "",
+  "directories": {
+    "doc": "doc",
+    "test": "tests"
+  },
+  "repository": "",
+  "scripts": {
+    "build": "ember build",
+    "lint:js": "eslint ./*.js app config lib server tests",
+    "start": "ember serve",
+    "test": "ember test"
+  },
+  "devDependencies": {
+    "broccoli-asset-rev": "^2.4.5",
+    "ember-ajax": "^3.0.0",
+    "ember-cli": "github:ember-cli/ember-cli",
+    "ember-cli-app-version": "^3.0.0",
+    "ember-cli-babel": "^6.6.0",
+    "ember-cli-dependency-checker": "^2.0.0",
+    "ember-cli-eslint": "^4.2.1",
+    "ember-cli-htmlbars": "^2.0.1",
+    "ember-cli-htmlbars-inline-precompile": "^1.0.0",
+    "ember-cli-inject-live-reload": "^1.4.1",
+    "ember-cli-qunit": "^4.1.1",
+    "ember-cli-shims": "^1.2.0",
+    "ember-cli-sri": "^2.1.0",
+    "ember-cli-uglify": "^2.0.0",
+    "ember-data": "~2.18.0-beta.1",
+    "ember-export-application-global": "^2.0.0",
+    "ember-load-initializers": "^1.0.0",
+    "ember-resolver": "^4.0.0",
+    "ember-welcome-page": "^3.0.0",
+    "eslint-plugin-ember": "^5.0.0",
+    "loader.js": "^4.2.3"
+  },
+  "engines": {
+    "node": "^4.5 || 6.* || >= 7.*"
+  }
+}
diff --git a/tests/fixtures/module-unification-app/yarn/src/ui/routes/application/template.hbs b/tests/fixtures/module-unification-app/yarn/src/ui/routes/application/template.hbs
new file mode 100644
index 000000000..1eac0a203
--- /dev/null
+++ b/tests/fixtures/module-unification-app/yarn/src/ui/routes/application/template.hbs
@@ -0,0 +1,5 @@
+{{!-- The following component displays Ember's default welcome message. --}}
+{{welcome-page}}
+{{!-- Feel free to remove this! --}}
+
+{{outlet}}
\ No newline at end of file
diff --git a/tests/unit/blueprints/addon-test.js b/tests/unit/blueprints/addon-test.js
index 51f4c6b5b..5c765a644 100644
--- a/tests/unit/blueprints/addon-test.js
+++ b/tests/unit/blueprints/addon-test.js
@@ -70,6 +70,7 @@ describe('blueprint - addon', function() {
     "ember-addon"\n\
   ],\n\
   "scripts": {\n\
+    "lint:js": "eslint ./*.js addon addon-test-support app config lib server test-support tests",\n\
     "test": "ember try:each"\n\
   },\n\
   "dependencies": {},\n\