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