File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1818// Helpers
1919//-----------------------------------------------------------------------------
2020
21- const importantPattern = / (?< important > ! \s * i m p o r t a n t ) / diu ;
21+ const importantPattern = / ! \s * i m p o r t a n t / iu ;
2222const commentPattern = / \/ \* [ \s \S ] * ?\* \/ / gu;
2323const trailingWhitespacePattern = / \s * $ / u;
2424
@@ -58,8 +58,9 @@ export default {
5858 ) ;
5959 const importantMatch =
6060 importantPattern . exec ( textWithoutComments ) ;
61- const [ importantStartOffset , importantEndOffset ] =
62- importantMatch . indices . groups . important ;
61+ const importantStartOffset = importantMatch . index ;
62+ const importantEndOffset =
63+ importantStartOffset + importantMatch [ 0 ] . length ;
6364 const nodeStartOffset = node . loc . start . offset ;
6465
6566 context . report ( {
You can’t perform that action at this time.
0 commit comments