Skip to content

Commit

Permalink
refactor(eslint): updated to match updated rules
Browse files Browse the repository at this point in the history
  • Loading branch information
travi committed Jun 23, 2018
1 parent c180978 commit dac68f5
Show file tree
Hide file tree
Showing 11 changed files with 129 additions and 168 deletions.
178 changes: 67 additions & 111 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ export default {
'spdx-license-list/simple',
'util',
'write-yaml',
'git-config'
'git-config',
'joi',
'hoek'
],
output: [
{file: 'lib/index.cjs.js', format: 'cjs', sourcemap: true},
Expand Down
2 changes: 1 addition & 1 deletion src/prompt-conditionals.js → src/prompts/conditionals.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {questionNames} from './prompts';
import {questionNames} from './question-names';

export function vcsHostPromptShouldBePresented(answers) {
return answers[questionNames.GIT_REPO];
Expand Down
14 changes: 14 additions & 0 deletions src/prompts/question-names.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export const questionNames = {
PROJECT_NAME: 'projectName',
DESCRIPTION: 'description',
VISIBILITY: 'visibility',
GIT_REPO: 'gitRepo',
REPO_HOST: 'repoHost',
REPO_OWNER: 'repoOwner',
UNLICENSED: 'unlicensed',
LICENSE: 'license',
COPYRIGHT_HOLDER: 'copyrightHolder',
COPYRIGHT_YEAR: 'copyrightYear',
PROJECT_TYPE: 'projectType',
CI: 'ci'
};
18 changes: 2 additions & 16 deletions src/prompts.js → src/prompts/questions.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,8 @@ import {
licenseChoicesShouldBePresented,
unlicensedConfirmationShouldBePresented,
vcsHostPromptShouldBePresented
} from './prompt-conditionals';

export const questionNames = {
PROJECT_NAME: 'projectName',
DESCRIPTION: 'description',
VISIBILITY: 'visibility',
GIT_REPO: 'gitRepo',
REPO_HOST: 'repoHost',
REPO_OWNER: 'repoOwner',
UNLICENSED: 'unlicensed',
LICENSE: 'license',
COPYRIGHT_HOLDER: 'copyrightHolder',
COPYRIGHT_YEAR: 'copyrightYear',
PROJECT_TYPE: 'projectType',
CI: 'ci'
};
} from './conditionals';
import {questionNames} from './question-names';

function includeLicenseQuestions(copyrightHolder) {
return [
Expand Down
Loading

0 comments on commit dac68f5

Please sign in to comment.