prompts.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // these prompts are used if the plugin is late-installed into an existing
  2. // project and invoked by `vue invoke`.
  3. const { chalk, hasGit } = require('@vue/cli-shared-utils')
  4. module.exports = [
  5. {
  6. name: 'config',
  7. type: 'list',
  8. message: `Pick an ESLint config:`,
  9. choices: [
  10. {
  11. name: 'Error prevention only',
  12. value: 'base',
  13. short: 'Basic'
  14. },
  15. {
  16. name: 'Airbnb',
  17. value: 'airbnb',
  18. short: 'Airbnb'
  19. },
  20. {
  21. name: 'Standard',
  22. value: 'standard',
  23. short: 'Standard'
  24. },
  25. {
  26. name: 'Prettier',
  27. value: 'prettier',
  28. short: 'Prettier'
  29. }
  30. ]
  31. },
  32. {
  33. name: 'lintOn',
  34. type: 'checkbox',
  35. message: 'Pick additional lint features:',
  36. choices: [
  37. {
  38. name: 'Lint on save',
  39. value: 'save',
  40. checked: true
  41. },
  42. {
  43. name: 'Lint and fix on commit' + (hasGit() ? '' : chalk.red(' (requires Git)')),
  44. value: 'commit'
  45. }
  46. ]
  47. }
  48. ]