From 6894ebe16c67bf3f022ebe8375cd3b15a9940d2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20K=C3=BChnel?= Date: Mon, 3 Apr 2017 21:11:25 +0200 Subject: [PATCH] Add `**/templates` to .eslintignore --- __tests__/app.js | 5 +++++ app/index.js | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/__tests__/app.js b/__tests__/app.js index 402181f9..f2708f81 100644 --- a/__tests__/app.js +++ b/__tests__/app.js @@ -30,6 +30,7 @@ describe('generator:app', () => { it('creates files', () => { const expected = [ + '.eslintignore', 'README.md', 'package.json', 'generators/app/index.js', @@ -63,5 +64,9 @@ describe('generator:app', () => { assert.fileContent('README.md', 'yo temp'); assert.fileContent('README.md', 'yeoman/generator-temp'); }); + + it('fills the .eslintignore with correct content', () => { + assert.fileContent('.eslintignore', '**/templates\n'); + }); }); }); diff --git a/app/index.js b/app/index.js index 3c7f1fca..86b41dc8 100644 --- a/app/index.js +++ b/app/index.js @@ -83,6 +83,10 @@ module.exports = class extends Generator { this.fs.writeJSON(this.destinationPath('package.json'), pkg); } + conflicts() { + this.fs.append(this.destinationPath('.eslintignore'), '**/templates\n'); + } + install() { this.installDependencies({bower: false}); }