Skip to content

Latest commit

 

History

History

plugin-extract-keywords-from-variables

@putout/plugin-extract-keywords-from-variables NPM version

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;

License

MIT