Skip to content

Commit

Permalink
fix: only push eslint if it is not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Jan 30, 2018
1 parent b6120d1 commit ef9a649
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/generators/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ class App extends Generator {

this.fs.write(this.destinationPath('.gitignore'), this._gitignore())
this.fs.copyTpl(this.templatePath('eslintrc'), this.destinationPath('.eslintrc'), this)
this.fs.write(this.destinationPath('.eslintignore'), this._eslintignore())
const eslintignore = this._eslintignore()
if (eslintignore.trim()) this.fs.write(this.destinationPath('.eslintignore'), this._eslintignore())
this.fs.copyTpl(this.templatePath('package-scripts.js.ejs'), this.destinationPath('package-scripts.js'), this)

switch (this.type) {
Expand Down

0 comments on commit ef9a649

Please sign in to comment.