@putout/plugin-extract-keywords-from-variables 
The JavaScript exceptions "unexpected token" occur when the parser does not see a token it recognizes at the given position, so it cannot make sense of the structure of the program. This might be a simple typo.
(c) MDN
🐊Putout plugin adds ability to extract keywords
from variables. Check out in 🐊Putout Editor.
Install
npm i @putout/plugin-extract-keywords-from-variables -D
Rule
{
"rules": {
"extract-keywords-from-variables": "on"
}
}
-export const isTemplateMiddle = (a) => a?.type === 'TemplateMiddle',
+export const isTemplateMiddle = (a) => a?.type === 'TemplateMiddle';
export const isTemplateTail = (a) => a?.type === 'TemplateTail';
-const a 5;
+const a = 5;
-export const packContent = (content) {
+export const packContent = (content) => {
console.log(a);
}
License
MIT