@@ -68,6 +68,8 @@ export async function activate(context: vscode.ExtensionContext): Promise<IPower
68
68
vscode . languages . setLanguageConfiguration (
69
69
PowerShellLanguageId ,
70
70
{
71
+ // TODO: Remove the useless escapes
72
+ // eslint-disable-next-line no-useless-escape
71
73
wordPattern : / ( - ? \d * \. \d \w * ) | ( [ ^ \` \~ \! \@ \# \% \^ \& \* \( \) \= \+ \[ \{ \] \} \\ \| \; \' \" \, \. \< \> \/ \? \s ] + ) / g,
72
74
73
75
indentationRules : {
@@ -91,27 +93,33 @@ export async function activate(context: vscode.ExtensionContext): Promise<IPower
91
93
onEnterRules : [
92
94
{
93
95
// e.g. /** | */
96
+ // eslint-disable-next-line no-useless-escape
94
97
beforeText : / ^ \s * \/ \* \* (? ! \/ ) ( [ ^ \* ] | \* (? ! \/ ) ) * $ / ,
98
+ // eslint-disable-next-line no-useless-escape
95
99
afterText : / ^ \s * \* \/ $ / ,
96
100
action : { indentAction : vscode . IndentAction . IndentOutdent , appendText : " * " } ,
97
101
} ,
98
102
{
99
103
// e.g. /** ...|
104
+ // eslint-disable-next-line no-useless-escape
100
105
beforeText : / ^ \s * \/ \* \* (? ! \/ ) ( [ ^ \* ] | \* (? ! \/ ) ) * $ / ,
101
106
action : { indentAction : vscode . IndentAction . None , appendText : " * " } ,
102
107
} ,
103
108
{
104
109
// e.g. * ...|
110
+ // eslint-disable-next-line no-useless-escape
105
111
beforeText : / ^ ( \t | ( \ \ ) ) * \ \* ( \ ( [ ^ \* ] | \* (? ! \/ ) ) * ) ? $ / ,
106
112
action : { indentAction : vscode . IndentAction . None , appendText : "* " } ,
107
113
} ,
108
114
{
109
115
// e.g. */|
116
+ // eslint-disable-next-line no-useless-escape
110
117
beforeText : / ^ ( \t | ( \ \ ) ) * \ \* \/ \s * $ / ,
111
118
action : { indentAction : vscode . IndentAction . None , removeText : 1 } ,
112
119
} ,
113
120
{
114
121
// e.g. *-----*/|
122
+ // eslint-disable-next-line no-useless-escape
115
123
beforeText : / ^ ( \t | ( \ \ ) ) * \ \* [ ^ / ] * \* \/ \s * $ / ,
116
124
action : { indentAction : vscode . IndentAction . None , removeText : 1 } ,
117
125
} ,
0 commit comments