|
1 | 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
|
2 | 2 |
|
3 |
| -exports[`validateConfig should not throw and should print nothing for function config 1`] = `""`; |
| 3 | +exports[`validateConfig should throw and should print validation errors for invalid config 1`] = ` |
| 4 | +"× Validation Error: |
4 | 5 |
|
5 |
| -exports[`validateConfig should not throw and should print nothing for function task 1`] = `""`; |
| 6 | + Invalid value for 'foo': false |
6 | 7 |
|
7 |
| -exports[`validateConfig should not throw and should print nothing for valid config 1`] = `""`; |
| 8 | + Should be a string, a function, or an array of strings and functions." |
| 9 | +`; |
8 | 10 |
|
9 |
| -exports[`validateConfig should not throw when config contains deprecated key but with valid task 1`] = `""`; |
| 11 | +exports[`validateConfig should throw and should print validation errors for invalid config 1 1`] = `"Configuration should be an object or a function!"`; |
10 | 12 |
|
11 |
| -exports[`validateConfig should throw and should print validation errors for invalid config 1`] = ` |
12 |
| -"● Validation Error: |
| 13 | +exports[`validateConfig should throw when detecting deprecated advanced configuration 1`] = ` |
| 14 | +"× Validation Error: |
13 | 15 |
|
14 |
| - Invalid value for 'foo'. |
| 16 | + Invalid value for 'chunkSize': 10 |
15 | 17 |
|
16 |
| - Should be a string, a function, or an array of strings and functions. |
17 |
| - |
18 |
| - Configured value is: false |
| 18 | + Advanced configuration has been deprecated. |
19 | 19 |
|
20 |
| -Please refer to https://github.com/okonet/lint-staged#configuration for more information..." |
21 |
| -`; |
| 20 | +× Validation Error: |
22 | 21 |
|
23 |
| -exports[`validateConfig should throw and should print validation errors for invalid config 1 1`] = `"Configuration should be an object!"`; |
| 22 | + Invalid value for 'concurrent': false |
24 | 23 |
|
25 |
| -exports[`validateConfig should throw when detecting deprecated advanced configuration 1`] = ` |
26 |
| -"● Validation Error: |
| 24 | + Advanced configuration has been deprecated. |
27 | 25 |
|
28 |
| - Invalid value for 'chunkSize'. |
| 26 | +× Validation Error: |
29 | 27 |
|
30 |
| - Advanced configuration has been deprecated. For more info, please visit: https://github.com/okonet/lint-staged. |
31 |
| - |
32 |
| - Configured value is: 10 |
| 28 | + Invalid value for 'globOptions': {matchBase: false} |
33 | 29 |
|
34 |
| -Please refer to https://github.com/okonet/lint-staged#configuration for more information... |
35 |
| -● Validation Error: |
| 30 | + Advanced configuration has been deprecated. |
36 | 31 |
|
37 |
| - Invalid value for 'chunkSize'. |
| 32 | +× Validation Error: |
38 | 33 |
|
39 |
| - Should be a string, a function, or an array of strings and functions. |
40 |
| - |
41 |
| - Configured value is: 10 |
| 34 | + Invalid value for 'ignore': ['test.js'] |
42 | 35 |
|
43 |
| -Please refer to https://github.com/okonet/lint-staged#configuration for more information... |
44 |
| -● Validation Error: |
| 36 | + Advanced configuration has been deprecated. |
45 | 37 |
|
46 |
| - Invalid value for 'concurrent'. |
| 38 | +× Validation Error: |
47 | 39 |
|
48 |
| - Advanced configuration has been deprecated. For more info, please visit: https://github.com/okonet/lint-staged. |
49 |
| - |
50 |
| - Configured value is: false |
| 40 | + Invalid value for 'linters': {'*.js': ['eslint']} |
51 | 41 |
|
52 |
| -Please refer to https://github.com/okonet/lint-staged#configuration for more information... |
53 |
| -● Validation Error: |
| 42 | + Advanced configuration has been deprecated. |
54 | 43 |
|
55 |
| - Invalid value for 'concurrent'. |
| 44 | +× Validation Error: |
56 | 45 |
|
57 |
| - Should be a string, a function, or an array of strings and functions. |
58 |
| - |
59 |
| - Configured value is: false |
| 46 | + Invalid value for 'relative': true |
60 | 47 |
|
61 |
| -Please refer to https://github.com/okonet/lint-staged#configuration for more information... |
62 |
| -● Validation Error: |
| 48 | + Advanced configuration has been deprecated. |
63 | 49 |
|
64 |
| - Invalid value for 'globOptions'. |
| 50 | +× Validation Error: |
65 | 51 |
|
66 |
| - Advanced configuration has been deprecated. For more info, please visit: https://github.com/okonet/lint-staged. |
67 |
| - |
68 |
| - Configured value is: {matchBase: false} |
| 52 | + Invalid value for 'renderer': 'silent' |
69 | 53 |
|
70 |
| -Please refer to https://github.com/okonet/lint-staged#configuration for more information... |
71 |
| -● Validation Error: |
| 54 | + Advanced configuration has been deprecated. |
72 | 55 |
|
73 |
| - Invalid value for 'globOptions'. |
| 56 | +× Validation Error: |
74 | 57 |
|
75 |
| - Should be a string, a function, or an array of strings and functions. |
76 |
| - |
77 |
| - Configured value is: {matchBase: false} |
| 58 | + Invalid value for 'subTaskConcurrency': 10 |
78 | 59 |
|
79 |
| -Please refer to https://github.com/okonet/lint-staged#configuration for more information... |
80 |
| -● Validation Error: |
| 60 | + Advanced configuration has been deprecated." |
| 61 | +`; |
81 | 62 |
|
82 |
| - Invalid value for 'ignore'. |
| 63 | +exports[`validateConfig should throw when detecting deprecated advanced configuration 2`] = ` |
| 64 | +" |
| 65 | +ERROR Could not parse lint-staged config. |
83 | 66 |
|
84 |
| - Advanced configuration has been deprecated. For more info, please visit: https://github.com/okonet/lint-staged. |
85 |
| - |
86 |
| - Configured value is: ['test.js'] |
| 67 | +× Validation Error: |
87 | 68 |
|
88 |
| -Please refer to https://github.com/okonet/lint-staged#configuration for more information... |
89 |
| -● Validation Error: |
| 69 | + Invalid value for 'chunkSize': 10 |
90 | 70 |
|
91 |
| - Invalid value for 'linters'. |
| 71 | + Advanced configuration has been deprecated. |
92 | 72 |
|
93 |
| - Advanced configuration has been deprecated. For more info, please visit: https://github.com/okonet/lint-staged. |
94 |
| - |
95 |
| - Configured value is: {'*.js': ['eslint']} |
| 73 | +× Validation Error: |
96 | 74 |
|
97 |
| -Please refer to https://github.com/okonet/lint-staged#configuration for more information... |
98 |
| -● Validation Error: |
| 75 | + Invalid value for 'concurrent': false |
99 | 76 |
|
100 |
| - Invalid value for 'linters'. |
| 77 | + Advanced configuration has been deprecated. |
101 | 78 |
|
102 |
| - Should be a string, a function, or an array of strings and functions. |
103 |
| - |
104 |
| - Configured value is: {'*.js': ['eslint']} |
| 79 | +× Validation Error: |
105 | 80 |
|
106 |
| -Please refer to https://github.com/okonet/lint-staged#configuration for more information... |
107 |
| -● Validation Error: |
| 81 | + Invalid value for 'globOptions': {matchBase: false} |
108 | 82 |
|
109 |
| - Invalid value for 'relative'. |
| 83 | + Advanced configuration has been deprecated. |
110 | 84 |
|
111 |
| - Advanced configuration has been deprecated. For more info, please visit: https://github.com/okonet/lint-staged. |
112 |
| - |
113 |
| - Configured value is: true |
| 85 | +× Validation Error: |
114 | 86 |
|
115 |
| -Please refer to https://github.com/okonet/lint-staged#configuration for more information... |
116 |
| -● Validation Error: |
| 87 | + Invalid value for 'ignore': ['test.js'] |
117 | 88 |
|
118 |
| - Invalid value for 'relative'. |
| 89 | + Advanced configuration has been deprecated. |
119 | 90 |
|
120 |
| - Should be a string, a function, or an array of strings and functions. |
121 |
| - |
122 |
| - Configured value is: true |
| 91 | +× Validation Error: |
123 | 92 |
|
124 |
| -Please refer to https://github.com/okonet/lint-staged#configuration for more information... |
125 |
| -● Validation Error: |
| 93 | + Invalid value for 'linters': {'*.js': ['eslint']} |
126 | 94 |
|
127 |
| - Invalid value for 'renderer'. |
| 95 | + Advanced configuration has been deprecated. |
128 | 96 |
|
129 |
| - Advanced configuration has been deprecated. For more info, please visit: https://github.com/okonet/lint-staged. |
130 |
| - |
131 |
| - Configured value is: 'silent' |
| 97 | +× Validation Error: |
132 | 98 |
|
133 |
| -Please refer to https://github.com/okonet/lint-staged#configuration for more information... |
134 |
| -● Validation Error: |
| 99 | + Invalid value for 'relative': true |
135 | 100 |
|
136 |
| - Invalid value for 'subTaskConcurrency'. |
| 101 | + Advanced configuration has been deprecated. |
137 | 102 |
|
138 |
| - Advanced configuration has been deprecated. For more info, please visit: https://github.com/okonet/lint-staged. |
139 |
| - |
140 |
| - Configured value is: 10 |
| 103 | +× Validation Error: |
141 | 104 |
|
142 |
| -Please refer to https://github.com/okonet/lint-staged#configuration for more information... |
143 |
| -● Validation Error: |
| 105 | + Invalid value for 'renderer': 'silent' |
144 | 106 |
|
145 |
| - Invalid value for 'subTaskConcurrency'. |
| 107 | + Advanced configuration has been deprecated. |
146 | 108 |
|
147 |
| - Should be a string, a function, or an array of strings and functions. |
148 |
| - |
149 |
| - Configured value is: 10 |
| 109 | +× Validation Error: |
150 | 110 |
|
151 |
| -Please refer to https://github.com/okonet/lint-staged#configuration for more information..." |
152 |
| -`; |
| 111 | + Invalid value for 'subTaskConcurrency': 10 |
153 | 112 |
|
154 |
| -exports[`validateConfig should throw when detecting deprecated advanced configuration 2`] = `""`; |
| 113 | + Advanced configuration has been deprecated. |
| 114 | +
|
| 115 | +See https://github.com/okonet/lint-staged#configuration." |
| 116 | +`; |
0 commit comments