Repository: ember-cli/ember-cli
Pull request #8220 (2018-11-28 21:23:19)

beta -> master


Patch:
diff --git a/blueprints/addon/files/addon-config/ember-try.js b/blueprints/addon/files/addon-config/ember-try.js
index 826ddcde2..df19d1fce 100644
--- a/blueprints/addon/files/addon-config/ember-try.js
+++ b/blueprints/addon/files/addon-config/ember-try.js
@@ -59,12 +59,6 @@ module.exports = function() {
             }
           }
         },
-        {
-          name: 'ember-default',
-          npm: {
-            devDependencies: {}
-          }
-        },
         {
           name: 'ember-default-with-jquery',
           env: {
diff --git a/blueprints/blueprint/files/blueprints/__name__/index.js b/blueprints/blueprint/files/blueprints/__name__/index.js
index e68f8d07e..ed5e510de 100644
--- a/blueprints/blueprint/files/blueprints/__name__/index.js
+++ b/blueprints/blueprint/files/blueprints/__name__/index.js
@@ -1,4 +1,5 @@
-/* eslint-env node */
+'use strict';
+
 module.exports = {
   description: ''
 
diff --git a/blueprints/http-mock/files/server/mocks/__name__.js b/blueprints/http-mock/files/server/mocks/__name__.js
index 5154c6133..169ecd4e0 100644
--- a/blueprints/http-mock/files/server/mocks/__name__.js
+++ b/blueprints/http-mock/files/server/mocks/__name__.js
@@ -1,4 +1,3 @@
-/* eslint-env node */
 'use strict';
 
 module.exports = function(app) {
diff --git a/blueprints/http-proxy/files/server/proxies/__name__.js b/blueprints/http-proxy/files/server/proxies/__name__.js
index 2c345fd13..5d6e246a8 100644
--- a/blueprints/http-proxy/files/server/proxies/__name__.js
+++ b/blueprints/http-proxy/files/server/proxies/__name__.js
@@ -1,4 +1,3 @@
-/* eslint-env node */
 'use strict';
 
 const proxyPath = '/<%=camelizedModuleName %>';
diff --git a/blueprints/in-repo-addon/files/__root__/__name__/index.js b/blueprints/in-repo-addon/files/__root__/__name__/index.js
index a95e33e22..57cf2c24d 100755
--- a/blueprints/in-repo-addon/files/__root__/__name__/index.js
+++ b/blueprints/in-repo-addon/files/__root__/__name__/index.js
@@ -1,4 +1,3 @@
-/* eslint-env node */
 'use strict';
 
 module.exports = {
diff --git a/blueprints/server/files/server/index.js b/blueprints/server/files/server/index.js
index c984ea225..24e9a440f 100644
--- a/blueprints/server/files/server/index.js
+++ b/blueprints/server/files/server/index.js
@@ -1,4 +1,3 @@
-/* eslint-env node */
 'use strict';
 
 // To use it create some files under `mocks/`


Test patch:
diff --git a/tests/acceptance/new-test.js b/tests/acceptance/new-test.js
index 5164bc114..742cf20c6 100644
--- a/tests/acceptance/new-test.js
+++ b/tests/acceptance/new-test.js
@@ -417,6 +417,11 @@ describe('Acceptance: ember new', function() {
   }));
 
   describe('verify fixtures', function() {
+    function checkEslintConfig(fixturePath) {
+      expect(file('.eslintrc.js'))
+        .to.equal(file(path.join(__dirname, '../fixtures', fixturePath, '.eslintrc.js')));
+    }
+
     function checkPackageJson(fixtureName) {
       let currentVersion = require('../../package').version;
       let fixturePath = path.join(__dirname, '../fixtures', fixtureName, 'package.json');
@@ -444,13 +449,15 @@ describe('Acceptance: ember new', function() {
         'src/ui/routes/application/template.hbs',
         '.travis.yml',
         'README.md',
-        '.eslintrc.js',
       ].forEach(filePath => {
         expect(file(filePath))
           .to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath)));
       });
 
       checkPackageJson(fixturePath);
+
+      // option independent, but piggy-backing on an existing generate for speed
+      checkEslintConfig('module-unification-app');
     }));
 
     it('module-unification-app + yarn + welcome', co.wrap(function *() {
@@ -470,7 +477,6 @@ describe('Acceptance: ember new', function() {
         'src/ui/routes/application/template.hbs',
         '.travis.yml',
         'README.md',
-        '.eslintrc.js',
       ].forEach(filePath => {
         expect(file(filePath))
           .to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath)));
@@ -495,13 +501,15 @@ describe('Acceptance: ember new', function() {
           'app/templates/application.hbs',
           '.travis.yml',
           'README.md',
-          '.eslintrc.js',
         ].forEach(filePath => {
           expect(file(filePath))
             .to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath)));
         });
 
         checkPackageJson(fixturePath);
+
+        // option independent, but piggy-backing on an existing generate for speed
+        checkEslintConfig('app');
       }));
 
       it('app + yarn + welcome', co.wrap(function *() {
@@ -519,7 +527,6 @@ describe('Acceptance: ember new', function() {
           'app/templates/application.hbs',
           '.travis.yml',
           'README.md',
-          '.eslintrc.js',
         ].forEach(filePath => {
           expect(file(filePath))
             .to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath)));
@@ -544,13 +551,15 @@ describe('Acceptance: ember new', function() {
           '.travis.yml',
           'README.md',
           'CONTRIBUTING.md',
-          '.eslintrc.js',
         ].forEach(filePath => {
           expect(file(filePath))
             .to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath)));
         });
 
         checkPackageJson(fixturePath);
+
+        // option independent, but piggy-backing on an existing generate for speed
+        checkEslintConfig('addon');
       }));
 
       it('addon + yarn + welcome', co.wrap(function *() {
@@ -571,7 +580,6 @@ describe('Acceptance: ember new', function() {
           '.travis.yml',
           'README.md',
           'CONTRIBUTING.md',
-          '.eslintrc.js',
         ].forEach(filePath => {
           expect(file(filePath))
             .to.equal(file(path.join(__dirname, '../fixtures', fixturePath, filePath)));
diff --git a/tests/fixtures/addon/npm/.eslintrc.js b/tests/fixtures/addon/.eslintrc.js
similarity index 100%
rename from tests/fixtures/addon/npm/.eslintrc.js
rename to tests/fixtures/addon/.eslintrc.js
diff --git a/tests/fixtures/addon/developing-addon/index.js b/tests/fixtures/addon/developing-addon/index.js
index 559cc9c19..57cf2c24d 100644
--- a/tests/fixtures/addon/developing-addon/index.js
+++ b/tests/fixtures/addon/developing-addon/index.js
@@ -1,4 +1,5 @@
-/* eslint-env node */
+'use strict';
+
 module.exports = {
   name: require('./package').name,
 
diff --git a/tests/fixtures/addon/external-dependency/index.coffee b/tests/fixtures/addon/external-dependency/index.coffee
index 538f6c111..c4a5a2e40 100644
--- a/tests/fixtures/addon/external-dependency/index.coffee
+++ b/tests/fixtures/addon/external-dependency/index.coffee
@@ -1,4 +1,5 @@
-/* eslint-env node */
+'use strict';
+
 module.exports = {
   name: 'external-dependency',
 
diff --git a/tests/fixtures/addon/external-dependency/index.js b/tests/fixtures/addon/external-dependency/index.js
index 559cc9c19..57cf2c24d 100644
--- a/tests/fixtures/addon/external-dependency/index.js
+++ b/tests/fixtures/addon/external-dependency/index.js
@@ -1,4 +1,5 @@
-/* eslint-env node */
+'use strict';
+
 module.exports = {
   name: require('./package').name,
 
diff --git a/tests/fixtures/addon/external-dependency/some/other/path.js b/tests/fixtures/addon/external-dependency/some/other/path.js
index 538f6c111..c4a5a2e40 100644
--- a/tests/fixtures/addon/external-dependency/some/other/path.js
+++ b/tests/fixtures/addon/external-dependency/some/other/path.js
@@ -1,4 +1,5 @@
-/* eslint-env node */
+'use strict';
+
 module.exports = {
   name: 'external-dependency',
 
diff --git a/tests/fixtures/addon/npm/config/ember-try.js b/tests/fixtures/addon/npm/config/ember-try.js
index 56e8d3626..a18fc9605 100644
--- a/tests/fixtures/addon/npm/config/ember-try.js
+++ b/tests/fixtures/addon/npm/config/ember-try.js
@@ -58,12 +58,6 @@ module.exports = function() {
             }
           }
         },
-        {
-          name: 'ember-default',
-          npm: {
-            devDependencies: {}
-          }
-        },
         {
           name: 'ember-default-with-jquery',
           env: {
diff --git a/tests/fixtures/addon/yarn/.eslintrc.js b/tests/fixtures/addon/yarn/.eslintrc.js
deleted file mode 100644
index ec0142c1b..000000000
--- a/tests/fixtures/addon/yarn/.eslintrc.js
+++ /dev/null
@@ -1,52 +0,0 @@
-module.exports = {
-  root: true,
-  parserOptions: {
-    ecmaVersion: 2017,
-    sourceType: 'module'
-  },
-  plugins: [
-    'ember'
-  ],
-  extends: [
-    'eslint:recommended',
-    'plugin:ember/recommended'
-  ],
-  env: {
-    browser: true
-  },
-  rules: {
-  },
-  overrides: [
-    // node files
-    {
-      files: [
-        '.eslintrc.js',
-        '.template-lintrc.js',
-        'ember-cli-build.js',
-        'index.js',
-        'testem.js',
-        'blueprints/*/index.js',
-        'config/**/*.js',
-        'tests/dummy/config/**/*.js'
-      ],
-      excludedFiles: [
-        'addon/**',
-        'addon-test-support/**',
-        'app/**',
-        'tests/dummy/app/**'
-      ],
-      parserOptions: {
-        sourceType: 'script',
-        ecmaVersion: 2015
-      },
-      env: {
-        browser: false,
-        node: true
-      },
-      plugins: ['node'],
-      rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
-        // add your custom rules and overrides for node files here
-      })
-    }
-  ]
-};
diff --git a/tests/fixtures/addon/yarn/config/ember-try.js b/tests/fixtures/addon/yarn/config/ember-try.js
index e0ba4712e..976c8f7a6 100644
--- a/tests/fixtures/addon/yarn/config/ember-try.js
+++ b/tests/fixtures/addon/yarn/config/ember-try.js
@@ -59,12 +59,6 @@ module.exports = function() {
             }
           }
         },
-        {
-          name: 'ember-default',
-          npm: {
-            devDependencies: {}
-          }
-        },
         {
           name: 'ember-default-with-jquery',
           env: {
diff --git a/tests/fixtures/app/npm/.eslintrc.js b/tests/fixtures/app/.eslintrc.js
similarity index 100%
rename from tests/fixtures/app/npm/.eslintrc.js
rename to tests/fixtures/app/.eslintrc.js
diff --git a/tests/fixtures/app/yarn/.eslintrc.js b/tests/fixtures/app/yarn/.eslintrc.js
deleted file mode 100644
index dd6462bcf..000000000
--- a/tests/fixtures/app/yarn/.eslintrc.js
+++ /dev/null
@@ -1,41 +0,0 @@
-module.exports = {
-  root: true,
-  parserOptions: {
-    ecmaVersion: 2017,
-    sourceType: 'module'
-  },
-  plugins: [
-    'ember'
-  ],
-  extends: [
-    'eslint:recommended',
-    'plugin:ember/recommended'
-  ],
-  env: {
-    browser: true
-  },
-  rules: {
-  },
-  overrides: [
-    // node files
-    {
-      files: [
-        '.eslintrc.js',
-        '.template-lintrc.js',
-        'ember-cli-build.js',
-        'testem.js',
-        'blueprints/*/index.js',
-        'config/**/*.js',
-        'lib/*/index.js'
-      ],
-      parserOptions: {
-        sourceType: 'script',
-        ecmaVersion: 2015
-      },
-      env: {
-        browser: false,
-        node: true
-      }
-    }
-  ]
-};
diff --git a/tests/fixtures/module-unification-app/npm/.eslintrc.js b/tests/fixtures/module-unification-app/.eslintrc.js
similarity index 100%
rename from tests/fixtures/module-unification-app/npm/.eslintrc.js
rename to tests/fixtures/module-unification-app/.eslintrc.js
diff --git a/tests/fixtures/module-unification-app/yarn/.eslintrc.js b/tests/fixtures/module-unification-app/yarn/.eslintrc.js
deleted file mode 100644
index 33b809b07..000000000
--- a/tests/fixtures/module-unification-app/yarn/.eslintrc.js
+++ /dev/null
@@ -1,42 +0,0 @@
-module.exports = {
-  root: true,
-  parserOptions: {
-    ecmaVersion: 2017,
-    sourceType: 'module'
-  },
-  plugins: [
-    'ember'
-  ],
-  extends: [
-    'eslint:recommended',
-    'plugin:ember/recommended'
-  ],
-  env: {
-    browser: true
-  },
-  rules: {
-  },
-  overrides: [
-    // node files
-    {
-      files: [
-        '.eslintrc.js',
-        '.template-lintrc.js',
-        'ember-cli-build.js',
-        'index.js',
-        'testem.js',
-        'blueprints/*/index.js',
-        'config/**/*.js',
-        'tests/dummy/config/**/*.js'
-      ],
-      parserOptions: {
-        sourceType: 'script',
-        ecmaVersion: 2015
-      },
-      env: {
-        browser: false,
-        node: true
-      }
-    }
-  ]
-};