mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
[misc] Disallow regex lookbehind during linting
GitOrigin-RevId: e4f4d9ac1f9b0dcc6572cf1b32304575c9bb0ac4
This commit is contained in:
parent
7c9971cce9
commit
608bca2610
1 changed files with 5 additions and 0 deletions
|
@ -133,6 +133,11 @@
|
|||
{
|
||||
"selector": "AssignmentExpression[left.object.object.name='window'][left.object.property.name='location'][left.property.name='href']",
|
||||
"message": "Modify location via useLocation instead of calling window.location methods directly"
|
||||
},
|
||||
// prohibit using lookbehinds due to incidents with Safari simply crashing when the script is parsed
|
||||
{
|
||||
"selector": "Literal[regex.pattern=/\\(\\?<[!=]/]",
|
||||
"message": "Lookbehind is not supported in older Safari versions."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue