An ESLint plugin that enforces consistent naming conventions for styled-components variables. Version 1.0.1 is the current stable release. The plugin provides a single rule 'varname' that allows developers to define prefix, suffix, or regex patterns for styled-component variable names, differentiating between tag styles (e.g., styled.div) and extended styles (e.g., styled(FooComponent)). This helps reduce verbose naming and standardizes codebase patterns. Unlike generic naming rules, this plugin understands the context of styled-components, making it easier to enforce conventions specifically for styled components. No significant updates since initial release; project appears to be stable but may not be actively maintained.
npm install eslint-plugin-styled-components-varnameVerified import paths — ran on the pinned version, not inferred.
Configures ESLint to enforce prefix-based naming for styled-components: '_' for tag styles and '$' for extended styles.
Manually ensure naming consistency for complex styled-component usages.
Set a custom prefix or pattern that does not trigger other rules.
Ensure all styled-components assignments are plain variable declarations.
Run `npm install eslint-plugin-styled-components-varname --save-dev` and ensure plugins array contains 'styled-components-varname'.
Install the plugin: npm install eslint-plugin-styled-components-varname --save-dev
Ensure the option object only contains 'prefix', 'suffix', or 'pattern'. Example: { tagStyle: { prefix: '_' } }No dependency data recorded yet.