/
validateConfig.spec.js.snap
152 lines (85 loc) Β· 4.86 KB
/
validateConfig.spec.js.snap
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`validateConfig should not throw and should print nothing for function task 1`] = `""`;
exports[`validateConfig should not throw and should print nothing for valid config 1`] = `""`;
exports[`validateConfig should not throw when config contains deprecated key but with valid task 1`] = `""`;
exports[`validateConfig should throw and should print validation errors for invalid config 1`] = `
"β Validation Error:
Invalid value for 'foo'.
Should be a string, a function, or an array of strings and functions.
Configured value is: false
Please refer to https://github.com/okonet/lint-staged#configuration for more information..."
`;
exports[`validateConfig should throw and should print validation errors for invalid config 1 1`] = `"Configuration should be an object!"`;
exports[`validateConfig should throw when detecting deprecated advanced configuration 1`] = `
"β Validation Error:
Invalid value for 'chunkSize'.
Advanced configuration has been deprecated. For more info, please visit: https://github.com/okonet/lint-staged.
Configured value is: 10
Please refer to https://github.com/okonet/lint-staged#configuration for more information...
β Validation Error:
Invalid value for 'chunkSize'.
Should be a string, a function, or an array of strings and functions.
Configured value is: 10
Please refer to https://github.com/okonet/lint-staged#configuration for more information...
β Validation Error:
Invalid value for 'concurrent'.
Advanced configuration has been deprecated. For more info, please visit: https://github.com/okonet/lint-staged.
Configured value is: false
Please refer to https://github.com/okonet/lint-staged#configuration for more information...
β Validation Error:
Invalid value for 'concurrent'.
Should be a string, a function, or an array of strings and functions.
Configured value is: false
Please refer to https://github.com/okonet/lint-staged#configuration for more information...
β Validation Error:
Invalid value for 'globOptions'.
Advanced configuration has been deprecated. For more info, please visit: https://github.com/okonet/lint-staged.
Configured value is: {matchBase: false}
Please refer to https://github.com/okonet/lint-staged#configuration for more information...
β Validation Error:
Invalid value for 'globOptions'.
Should be a string, a function, or an array of strings and functions.
Configured value is: {matchBase: false}
Please refer to https://github.com/okonet/lint-staged#configuration for more information...
β Validation Error:
Invalid value for 'ignore'.
Advanced configuration has been deprecated. For more info, please visit: https://github.com/okonet/lint-staged.
Configured value is: ['test.js']
Please refer to https://github.com/okonet/lint-staged#configuration for more information...
β Validation Error:
Invalid value for 'linters'.
Advanced configuration has been deprecated. For more info, please visit: https://github.com/okonet/lint-staged.
Configured value is: {'*.js': ['eslint']}
Please refer to https://github.com/okonet/lint-staged#configuration for more information...
β Validation Error:
Invalid value for 'linters'.
Should be a string, a function, or an array of strings and functions.
Configured value is: {'*.js': ['eslint']}
Please refer to https://github.com/okonet/lint-staged#configuration for more information...
β Validation Error:
Invalid value for 'relative'.
Advanced configuration has been deprecated. For more info, please visit: https://github.com/okonet/lint-staged.
Configured value is: true
Please refer to https://github.com/okonet/lint-staged#configuration for more information...
β Validation Error:
Invalid value for 'relative'.
Should be a string, a function, or an array of strings and functions.
Configured value is: true
Please refer to https://github.com/okonet/lint-staged#configuration for more information...
β Validation Error:
Invalid value for 'renderer'.
Advanced configuration has been deprecated. For more info, please visit: https://github.com/okonet/lint-staged.
Configured value is: 'silent'
Please refer to https://github.com/okonet/lint-staged#configuration for more information...
β Validation Error:
Invalid value for 'subTaskConcurrency'.
Advanced configuration has been deprecated. For more info, please visit: https://github.com/okonet/lint-staged.
Configured value is: 10
Please refer to https://github.com/okonet/lint-staged#configuration for more information...
β Validation Error:
Invalid value for 'subTaskConcurrency'.
Should be a string, a function, or an array of strings and functions.
Configured value is: 10
Please refer to https://github.com/okonet/lint-staged#configuration for more information..."
`;
exports[`validateConfig should throw when detecting deprecated advanced configuration 2`] = `""`;