'Eslint custom rule - Is it possible to find a variable value defined in ember component?

For example, I want to restrict a specific class name usage across my product.

So, I had blocked that class name usage from .hbs files as template lint rules.

But, that classnames are being used as component classname variables.

So, Is this possible to get this specific component variable defined value and verify it?

I had checked all existing eslint rules to check whether any rule works as this. But, I couldn’t find one. If anyone know any existing rule works as my case please share that rule name also.

Any help would to appreciated!!!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source