Skip to content

Commit

Permalink
fix: fixed linters
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Feb 1, 2018
1 parent 1a63151 commit 5ac2d4c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
10 changes: 8 additions & 2 deletions src/generators/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,19 @@ class App extends Generator {
this.pjson.license = this.answers.license || defaults.license
this.pjson.repository = this.answers.github ? `${this.answers.github.user}/${this.answers.github.repo}` : defaults.repository
this.pjson.scripts.posttest = 'yarn run lint'
this.pjson.scripts.precommit = 'yarn run lint'
// this.pjson.scripts.precommit = 'yarn run lint'
this.pjson.scripts.lint = 'concurrently "eslint ."'
if (this.mocha) {
this.pjson.scripts.test = 'mocha --forbid-only "test/**/*.test.ts"'
} else {
this.pjson.scripts.test = 'echo NO TESTS'
}
if (this.ts) {
if (this.mocha) {
this.pjson.scripts.lint += ' "tsc -p test --noEmit" "tslint -p test"'
} else {
this.pjson.scripts.lint += ' "tsc -p . --noEmit" "tslint -p ."'
}
this.pjson.scripts.build = 'rm -rf lib && tsc'
this.pjson.scripts.prepublishOnly = 'yarn run build'
}
Expand Down Expand Up @@ -320,7 +326,7 @@ class App extends Generator {
install() {
const dependencies: string[] = []
const devDependencies = [
'husky',
'concurrently',
'eslint',
'eslint-config-anycli',
]
Expand Down
2 changes: 1 addition & 1 deletion templates/bin/run
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env node

require('..').run()
require('@anycli/engine').run()
6 changes: 3 additions & 3 deletions test/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ function build(type, features) {
sh.rm('-rf', dir)
generate(`${type} ${dir} --defaults ${options}`)
sh.cd(dir)
sh.exec('git add .')
sh.exec('git commit -nm init')
sh.exec('git checkout -B origin/master')
// sh.exec('git add .')
// sh.exec('git commit -nm init')
// sh.exec('git checkout -B origin/master')
process.env = npmPath.env({env: process.env})
}

Expand Down

0 comments on commit 5ac2d4c

Please sign in to comment.