Repository: ember-cli/ember-cli
Pull request #8179 (2018-11-09 23:33:50)

Do not include `.jshintrc` and `.eslintrc` when generating `lib` or `packages`
Requested by `MU Blueprints` #7530; requirements on this [discussion](https://github.com/ember-cli/ember-cli/pull/7783#discussion_r188061985).

rwjblue: Restarted Travis jobs (unsure what happened to them, they just timed out which seems unrelated to the changes)
Turbo87: @ppcano can you rebase? CI (at least Travis) should work again

Patch:
diff --git a/blueprints/lib/files/lib/.eslintrc.js b/blueprints/lib/files/lib/.eslintrc.js
deleted file mode 100755
index 104718c32..000000000
--- a/blueprints/lib/files/lib/.eslintrc.js
+++ /dev/null
@@ -1,6 +0,0 @@
-module.exports = {
-  env: {
-    node: true,
-    browser: false
-  }
-};
diff --git a/blueprints/lib/files/lib/.jshintrc b/blueprints/lib/files/lib/.jshintrc
deleted file mode 100644
index 839c191fa..000000000
--- a/blueprints/lib/files/lib/.jshintrc
+++ /dev/null
@@ -1,4 +0,0 @@
-{
-  "node": true,
-  "browser": false
-}
diff --git a/blueprints/lib/index.js b/blueprints/lib/index.js
index 68ce2c687..8155b9466 100755
--- a/blueprints/lib/index.js
+++ b/blueprints/lib/index.js
@@ -8,17 +8,7 @@ module.exports = {
   normalizeEntityName(name) { return name; },
 
   beforeInstall() {
-    // make sure to create `lib` directory even if .jshintrc is not created
+    // make sure to create `lib` directory
     fs.mkdirsSync('lib');
   },
-
-  files() {
-    return [this.hasJSHint() ? 'lib/.jshintrc' : 'lib/.eslintrc.js'];
-  },
-
-  hasJSHint() {
-    if (this.project) {
-      return 'ember-cli-jshint' in this.project.dependencies();
-    }
-  },
 };
diff --git a/blueprints/packages/files/packages/.eslintrc.js b/blueprints/packages/files/packages/.eslintrc.js
deleted file mode 100644
index 104718c32..000000000
--- a/blueprints/packages/files/packages/.eslintrc.js
+++ /dev/null
@@ -1,6 +0,0 @@
-module.exports = {
-  env: {
-    node: true,
-    browser: false
-  }
-};
diff --git a/blueprints/packages/files/packages/.jshintrc b/blueprints/packages/files/packages/.jshintrc
deleted file mode 100644
index 839c191fa..000000000
--- a/blueprints/packages/files/packages/.jshintrc
+++ /dev/null
@@ -1,4 +0,0 @@
-{
-  "node": true,
-  "browser": false
-}
diff --git a/blueprints/packages/index.js b/blueprints/packages/index.js
index 93fb3ef56..085eaa862 100644
--- a/blueprints/packages/index.js
+++ b/blueprints/packages/index.js
@@ -8,17 +8,7 @@ module.exports = {
   normalizeEntityName(name) { return name; },
 
   beforeInstall() {
-    // make sure to create `packages` directory even if .jshintrc is not created
+    // make sure to create `packages` directory
     fs.mkdirsSync('packages');
   },
-
-  files() {
-    return [this.hasJSHint() ? 'packages/.jshintrc' : 'packages/.eslintrc.js'];
-  },
-
-  hasJSHint() {
-    if (this.project) {
-      return 'ember-cli-jshint' in this.project.dependencies();
-    }
-  },
 };


Test patch:
diff --git a/tests/unit/blueprints/lib-test.js b/tests/unit/blueprints/lib-test.js
index a49d96fd9..0fe16fa1f 100644
--- a/tests/unit/blueprints/lib-test.js
+++ b/tests/unit/blueprints/lib-test.js
@@ -21,6 +21,7 @@ describe('Acceptance: ember generate and destroy lib', function() {
     return emberNew()
       .then(() => emberGenerateDestroy(args, file => {
         expect(dir('lib')).to.exist;
+        expect(file('lib/.eslintrc.js')).to.not.exist;
         expect(file('lib/.jshintrc')).to.not.exist;
       }));
   });
@@ -34,7 +35,7 @@ describe('Acceptance: ember generate and destroy lib', function() {
       ]))
       .then(() => emberGenerateDestroy(args, file => {
         expect(dir('lib')).to.exist;
-        expect(file('lib/.jshintrc')).to.exist;
+        expect(file('lib/.jshintrc')).to.not.exist;
       }));
   });
 });
diff --git a/tests/unit/blueprints/packages-test.js b/tests/unit/blueprints/packages-test.js
index b984d0e32..a450f01df 100644
--- a/tests/unit/blueprints/packages-test.js
+++ b/tests/unit/blueprints/packages-test.js
@@ -21,6 +21,7 @@ describe('Acceptance: ember generate and destroy packages', function() {
     return emberNew()
       .then(() => emberGenerateDestroy(args, file => {
         expect(dir('packages')).to.exist;
+        expect(file('lib/.eslintrc.js')).to.not.exist;
         expect(file('packages/.jshintrc')).to.not.exist;
       }));
   });
@@ -34,7 +35,7 @@ describe('Acceptance: ember generate and destroy packages', function() {
       ]))
       .then(() => emberGenerateDestroy(args, file => {
         expect(dir('packages')).to.exist;
-        expect(file('packages/.jshintrc')).to.exist;
+        expect(file('packages/.jshintrc')).to.not.exist;
       }));
   });
 });