Since ESLint 8+ doesn't use CLIEngine anymore, and the alternative to it (ESLint) is async, I had to get creative with the quotes.
Instead of trying to determine which quotes the user will be using and converting the Jinja expression into a string, I just convert it to a regex expression - which is independent of quote type.
I make it all 0s to avoid invalid regex expressions, and pad it to the length of the original expression to avoid misaligning anything that comes after it.
Since ESLint 8+ doesn't use
CLIEngine
anymore, and the alternative to it (ESLint
) is async, I had to get creative with the quotes.Instead of trying to determine which quotes the user will be using and converting the Jinja expression into a string, I just convert it to a regex expression - which is independent of quote type.
I make it all 0s to avoid invalid regex expressions, and pad it to the length of the original expression to avoid misaligning anything that comes after it.