3.0.0 β€’ Published 5 months ago

@putout/plugin-extract-keywords-from-variables v3.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

@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;

-export const packContent = (content) {
+export const packContent = (content) => {
    console.log(a);
}

License

MIT

3.0.0

5 months ago

2.2.0

9 months ago

2.1.0

9 months ago

2.0.0

9 months ago

1.6.0

10 months ago

1.5.1

10 months ago

1.5.0

10 months ago

1.4.0

10 months ago

1.3.0

10 months ago

1.2.0

10 months ago

1.1.0

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago