-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1031.json
More file actions
19 lines (19 loc) 路 876 Bytes
/
Copy path1031.json
File metadata and controls
19 lines (19 loc) 路 876 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
"code": 1031,
"message": "'{0}' modifier cannot appear on class elements of this kind.",
"regexFind": "/(export|import)\\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\\s*\\(",
"regexReplace": "$2(",
"suggestion": "Remove invalid modifier from class method. Export and import modifiers cannot be used on class methods - they are only for module-level declarations.",
"example": [
{
"base": "class MyClass {\n export method() {\n return 'test'\n }\n}",
"fixed": "class MyClass {\n method() {\n return 'test'\n }\n}",
"description": "Remove export modifier from class method declaration"
},
{
"base": "class DataClass {\n import process() {\n return 'data'\n }\n}",
"fixed": "class DataClass {\n process() {\n return 'data'\n }\n}",
"description": "Remove import modifier from class method declaration"
}
]
}