-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.js
89 lines (89 loc) · 1.95 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
module.exports = {
defaults: {
eslint: {
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module',
},
extends: ['eslint:recommended', 'prettier'],
plugins: ['prettier'],
rules: {
'prettier/prettier': ['error'],
},
},
prettier: {
semi: true,
trailingComma: 'all',
singleQuote: true,
useTabs: true,
},
},
questions: [
{
type: 'list',
name: 'prettier.useTabs',
message: 'Do you use tabs or spaces?',
choices: [
{ name: 'Tabs', value: true },
{ name: 'Spaces', value: false },
],
},
{
type: 'list',
name: 'prettier.semi',
message: 'Print semicolons at the ends of statements?',
choices: [{ name: 'Yes', value: true }, { name: 'No', value: false }],
},
{
type: 'checkbox',
name: 'eslint.env',
message:
'What environments are you working in? These predefine some global variables.\n',
choices: [
{ name: 'browser', checked: true },
{ name: 'node', checked: true },
{ name: 'mocha', checked: false },
{ name: 'jest', checked: false },
],
},
{
type: 'list',
name: 'useReact',
message: 'Are you using React/JSX?',
choices: [{ name: 'Yes', value: true }, { name: 'No', value: false }],
},
{
type: 'list',
name: 'filenames.eslint',
message: 'What type of eslint config file would you like?',
choices: [
'.eslintrc.js',
'.eslintrc.json',
{
name: '.eslintrc (JSON syntax)',
value: '.eslintrc',
},
],
},
{
type: 'list',
name: 'filenames.prettier',
message: 'What type of prettier config file would you like?',
choices: [
'.prettierrc.js',
'.prettierrc.config.js',
'.prettierrc.json',
{
name: '.prettierrc (JSON syntax)',
value: '.prettierrc',
},
],
},
{
type: 'list',
name: 'saveGlobalConfig',
message: 'Would you like to save these globally so I won’t ask again?',
choices: [{ name: 'Yes', value: true }, { name: 'No', value: false }],
},
],
};