-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1025.json
More file actions
19 lines (19 loc) 路 747 Bytes
/
Copy path1025.json
File metadata and controls
19 lines (19 loc) 路 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
"code": 1025,
"message": "An index signature cannot have a trailing comma.",
"regexFind": "/\\[([a-zA-Z_$][a-zA-Z0-9_$]*\\s*:\\s*[^,]+),\\]/",
"regexReplace": "[$1]",
"suggestion": "Remove trailing comma from index signature. Index signatures cannot have trailing commas.",
"example": [
{
"base": "interface MyInterface {\n [key: string,]: any\n}",
"fixed": "interface MyInterface {\n [key: string]: any\n}",
"description": "Remove trailing comma from index signature"
},
{
"base": "interface DataInterface {\n [prop: string,]: unknown\n}",
"fixed": "interface DataInterface {\n [prop: string]: unknown\n}",
"description": "Index signatures cannot have trailing commas"
}
]
}