Skip to content

Commit

Permalink
chore: use eslint in favor of tslint
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Dec 19, 2019
1 parent 667bc69 commit e520e66
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 55 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
5 changes: 5 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": [
"plugin:adonis/typescriptPackage"
]
}
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"mrm": "mrm --preset=@adonisjs/mrm-preset",
"pretest": "npm run lint",
"test": "node japaFile.js",
"lint": "tslint --project tsconfig.json",
"lint": "eslint . --ext=.ts",
"clean": "del build",
"compile": "npm run lint && npm run clean && tsc",
"build": "npm run compile && typedoc --theme markdown --excludePrivate --hideSources && git add docs",
Expand All @@ -35,23 +35,23 @@
},
"homepage": "https://github.com/poppinss/prompts#readme",
"devDependencies": {
"@adonisjs/mrm-preset": "^2.1.0",
"@types/node": "^12.12.7",
"@adonisjs/mrm-preset": "^2.2.3",
"@types/node": "^12.12.21",
"commitizen": "^4.0.3",
"cz-conventional-changelog": "^3.0.2",
"del-cli": "^3.0.0",
"doctoc": "^1.4.0",
"husky": "^3.0.9",
"eslint": "^6.7.2",
"eslint-plugin-adonis": "^1.0.4",
"husky": "^3.1.0",
"japa": "^3.0.1",
"mrm": "^1.2.2",
"np": "^5.1.3",
"ts-node": "^8.4.1",
"tslint": "^5.20.1",
"tslint-eslint-rules": "^5.4.0",
"typedoc": "^0.15.0",
"mrm": "^2.0.2",
"np": "^5.2.1",
"ts-node": "^8.5.4",
"typedoc": "^0.15.5",
"typedoc-plugin-external-module-name": "^2.1.0",
"typedoc-plugin-markdown": "^2.2.11",
"typescript": "^3.7.2"
"typedoc-plugin-markdown": "^2.2.14",
"typescript": "^3.7.3"
},
"nyc": {
"exclude": [
Expand Down
74 changes: 37 additions & 37 deletions test/prompt.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ test.group('Prompts | input', () => {
test('test input prompt', async (assert) => {
const prompt = new EmitterPrompt()

prompt.on('prompt', (prompt) => {
assert.equal(prompt.name, 'prompt')
prompt.answer('virk')
prompt.on('prompt', (question) => {
assert.equal(question.name, 'prompt')
question.answer('virk')
})

const username = await prompt.ask('What\'s your username?')
Expand All @@ -27,8 +27,8 @@ test.group('Prompts | input', () => {
assert.plan(2)

const prompt = new EmitterPrompt()
prompt.on('prompt', (prompt) => {
prompt.answer('')
prompt.on('prompt', (question) => {
question.answer('')
})

prompt.on('prompt:error', (message) => {
Expand All @@ -48,8 +48,8 @@ test.group('Prompts | input', () => {
test('invoke result function before returning the result', async (assert) => {
const prompt = new EmitterPrompt()

prompt.on('prompt', (prompt) => {
prompt.answer('virk')
prompt.on('prompt', (question) => {
question.answer('virk')
})

const username = await prompt.ask('What\'s your username?', {
Expand All @@ -67,8 +67,8 @@ test.group('Prompts | choice', () => {
test('test choice prompt', async (assert) => {
const prompt = new EmitterPrompt()

prompt.on('prompt', (prompt) => {
prompt.select(0)
prompt.on('prompt', (question) => {
question.select(0)
})

const client = await prompt.choice('Select the installation client', ['npm', 'yarn'])
Expand All @@ -79,8 +79,8 @@ test.group('Prompts | choice', () => {
assert.plan(2)

const prompt = new EmitterPrompt()
prompt.on('prompt', (prompt) => {
prompt.answer('')
prompt.on('prompt', (question) => {
question.answer('')
})

prompt.on('prompt:error', (message) => {
Expand All @@ -99,8 +99,8 @@ test.group('Prompts | choice', () => {
test('invoke result function before returning the value', async (assert) => {
const prompt = new EmitterPrompt()

prompt.on('prompt', (prompt) => {
prompt.select(0)
prompt.on('prompt', (question) => {
question.select(0)
})

const client = await prompt.choice('Select the installation client', ['npm', 'yarn'], {
Expand All @@ -117,8 +117,8 @@ test.group('Prompts | multiple', () => {
test('test multiple prompt', async (assert) => {
const prompt = new EmitterPrompt()

prompt.on('prompt', (prompt) => {
prompt.select(0)
prompt.on('prompt', (question) => {
question.select(0)
})

const clients = await prompt.multiple('Select the installation client', ['npm', 'yarn'])
Expand All @@ -129,8 +129,8 @@ test.group('Prompts | multiple', () => {
assert.plan(2)

const prompt = new EmitterPrompt()
prompt.on('prompt', (prompt) => {
prompt.answer([])
prompt.on('prompt', (question) => {
question.answer([])
})

prompt.on('prompt:error', (message) => {
Expand All @@ -149,8 +149,8 @@ test.group('Prompts | multiple', () => {
test('invoke result function before returning the value', async (assert) => {
const prompt = new EmitterPrompt()

prompt.on('prompt', (prompt) => {
prompt.select(0)
prompt.on('prompt', (question) => {
question.select(0)
})

const clients = await prompt.multiple('Select the installation client', ['npm', 'yarn'], {
Expand All @@ -166,8 +166,8 @@ test.group('Prompts | multiple', () => {
test.group('Prompts | toggle', () => {
test('test toggle prompt', async (assert) => {
const prompt = new EmitterPrompt()
prompt.on('prompt', (prompt) => {
prompt.accept()
prompt.on('prompt', (question) => {
question.accept()
})

const deleteFile = await prompt.toggle('Delete the file?', ['Yep', 'Nope'])
Expand All @@ -178,8 +178,8 @@ test.group('Prompts | toggle', () => {
assert.plan(2)
const prompt = new EmitterPrompt()

prompt.on('prompt', (prompt) => {
prompt.decline()
prompt.on('prompt', (question) => {
question.decline()
})

prompt.on('prompt:error', (message) => {
Expand All @@ -197,8 +197,8 @@ test.group('Prompts | toggle', () => {

test('invoke result function before returning the value', async (assert) => {
const prompt = new EmitterPrompt()
prompt.on('prompt', (prompt) => {
prompt.accept()
prompt.on('prompt', (question) => {
question.accept()
})

const deleteFile = await prompt.toggle('Delete the file?', ['Yep', 'Nope'], {
Expand All @@ -213,8 +213,8 @@ test.group('Prompts | toggle', () => {
test.group('Prompts | confirm', () => {
test('test confirm prompt', async (assert) => {
const prompt = new EmitterPrompt()
prompt.on('prompt', (prompt) => {
prompt.accept()
prompt.on('prompt', (question) => {
question.accept()
})

const deleteFile = await prompt.confirm('Delete the file?')
Expand All @@ -225,8 +225,8 @@ test.group('Prompts | confirm', () => {
assert.plan(2)
const prompt = new EmitterPrompt()

prompt.on('prompt', (prompt) => {
prompt.decline()
prompt.on('prompt', (question) => {
question.decline()
})

prompt.on('prompt:error', (message) => {
Expand All @@ -244,8 +244,8 @@ test.group('Prompts | confirm', () => {

test('invoke result function before returning the value', async (assert) => {
const prompt = new EmitterPrompt()
prompt.on('prompt', (prompt) => {
prompt.accept()
prompt.on('prompt', (question) => {
question.accept()
})

const deleteFile = await prompt.confirm('Delete the file?', {
Expand All @@ -260,8 +260,8 @@ test.group('Prompts | confirm', () => {
test.group('Prompts | secure', () => {
test('test secure prompt', async (assert) => {
const prompt = new EmitterPrompt()
prompt.on('prompt', (prompt) => {
prompt.answer('foo')
prompt.on('prompt', (question) => {
question.answer('foo')
})

const password = await prompt.secure('Enter password')
Expand All @@ -272,8 +272,8 @@ test.group('Prompts | secure', () => {
assert.plan(2)
const prompt = new EmitterPrompt()

prompt.on('prompt', (prompt) => {
prompt.answer('')
prompt.on('prompt', (question) => {
question.answer('')
})

prompt.on('prompt:error', (message) => {
Expand All @@ -291,8 +291,8 @@ test.group('Prompts | secure', () => {

test('invoke result function before returning the value', async (assert) => {
const prompt = new EmitterPrompt()
prompt.on('prompt', (prompt) => {
prompt.answer('foo')
prompt.on('prompt', (question) => {
question.answer('foo')
})

const password = await prompt.secure('Enter password', {
Expand Down
6 changes: 0 additions & 6 deletions tslint.json

This file was deleted.

0 comments on commit e520e66

Please sign in to comment.