File tree Expand file tree Collapse file tree 2 files changed +57
-0
lines changed Expand file tree Collapse file tree 2 files changed +57
-0
lines changed Original file line number Diff line number Diff line change @@ -3249,6 +3249,17 @@ function quux (foo) {
3249
3249
}
3250
3250
// Message: Invalid JSDoc @license: "(MIT OR GPL-2.5)"; expected SPDX expression: https://spdx.org/licenses/.
3251
3251
3252
+ /**
3253
+ * @license MIT
3254
+ * Some extra text
3255
+ */
3256
+ function quux (foo ) {
3257
+
3258
+ }
3259
+ // Options: [{"licensePattern":"[\\s\\S]*"}]
3260
+ // Message: Invalid JSDoc @license: "MIT
3261
+ Some extra text" ; expected SPDX expression: https://spdx.org/licenses/.
3262
+
3252
3263
/**
3253
3264
* @author
3254
3265
*/
@@ -3322,6 +3333,15 @@ function quux (foo) {
3322
3333
}
3323
3334
// Options: [{" allowedLicenses" :true}]
3324
3335
3336
+ /**
3337
+ * @license MIT
3338
+ * Some extra text
3339
+ */
3340
+ function quux (foo) {
3341
+
3342
+ }
3343
+ // Options: [{" licensePattern" :" [^ \n]* " }]
3344
+
3325
3345
/**
3326
3346
* @author Gajus Kuizinas
3327
3347
*/
Original file line number Diff line number Diff line change @@ -148,6 +148,27 @@ export default {
148
148
} ,
149
149
] ,
150
150
} ,
151
+ {
152
+ code : `
153
+ /**
154
+ * @license MIT
155
+ * Some extra text
156
+ */
157
+ function quux (foo) {
158
+
159
+ }
160
+ ` ,
161
+ errors : [
162
+ {
163
+ message : 'Invalid JSDoc @license: "MIT\nSome extra text"; expected SPDX expression: https://spdx.org/licenses/.' ,
164
+ } ,
165
+ ] ,
166
+ options : [
167
+ {
168
+ licensePattern : '[\\s\\S]*' ,
169
+ } ,
170
+ ] ,
171
+ } ,
151
172
{
152
173
code : `
153
174
/**
@@ -268,6 +289,22 @@ export default {
268
289
} ,
269
290
] ,
270
291
} ,
292
+ {
293
+ code : `
294
+ /**
295
+ * @license MIT
296
+ * Some extra text
297
+ */
298
+ function quux (foo) {
299
+
300
+ }
301
+ ` ,
302
+ options : [
303
+ {
304
+ licensePattern : '[^\n]*' ,
305
+ } ,
306
+ ] ,
307
+ } ,
271
308
{
272
309
code : `
273
310
/**
You can’t perform that action at this time.
0 commit comments