File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -27,11 +27,23 @@ The following patterns are considered problems:
2727function quux () {}
2828// Message: Prefer a more specific type to `any`
2929
30+ /**
31+ * @param {*} abc
32+ */
33+ function quux () {}
34+ // Message: Prefer a more specific type to `*`
35+
3036/**
3137 * @param {string|Promise<any>} abc
3238 */
3339function quux () {}
3440// Message: Prefer a more specific type to `any`
41+
42+ /**
43+ * @param {Array<*>|number} abc
44+ */
45+ function quux () {}
46+ // Message: Prefer a more specific type to `*`
3547````
3648
3749
Original file line number Diff line number Diff line change @@ -14,6 +14,20 @@ export default {
1414 } ,
1515 ] ,
1616 } ,
17+ {
18+ code : `
19+ /**
20+ * @param {*} abc
21+ */
22+ function quux () {}
23+ ` ,
24+ errors : [
25+ {
26+ line : 3 ,
27+ message : 'Prefer a more specific type to `*`' ,
28+ } ,
29+ ] ,
30+ } ,
1731 {
1832 code : `
1933 /**
@@ -28,6 +42,20 @@ export default {
2842 } ,
2943 ] ,
3044 } ,
45+ {
46+ code : `
47+ /**
48+ * @param {Array<*>|number} abc
49+ */
50+ function quux () {}
51+ ` ,
52+ errors : [
53+ {
54+ line : 3 ,
55+ message : 'Prefer a more specific type to `*`' ,
56+ } ,
57+ ] ,
58+ } ,
3159 ] ,
3260 valid : [
3361 {
You can’t perform that action at this time.
0 commit comments