{"id":26444,"library":"stylelint-processor-glamorous","title":"stylelint-processor-glamorous","description":"A stylelint processor that extracts CSS-in-JS objects from glamorous and related libraries for linting with stylelint. Version 0.3.0 is the latest stable release, with irregular maintenance cadence. It supports glamorous component factories, CSS attributes, and annotated object literals (via @css comments). Unlike other CSS-in-JS linters that rely on template literal extraction, this processor parses JavaScript object syntax directly, though it ignores certain formatting rules that don't apply to inline styles. Requires stylelint and a stylelint config (e.g., stylelint-config-standard).","status":"maintenance","version":"0.3.0","language":"javascript","source_language":"en","source_url":"https://github.com/zabute/stylelint-processor-glamorous","tags":["javascript","stylelint","stylelint-processor","glamorous"],"install":[{"cmd":"npm install stylelint-processor-glamorous","lang":"bash","label":"npm"},{"cmd":"yarn add stylelint-processor-glamorous","lang":"bash","label":"yarn"},{"cmd":"pnpm add stylelint-processor-glamorous","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency; the processor runs as a stylelint plugin and requires stylelint to function","package":"stylelint","optional":false}],"imports":[{"note":"This package is not used via JS imports; it is loaded by stylelint as a processor string in .stylelintrc.","wrong":"import processor from 'stylelint-processor-glamorous';","symbol":"stylelint-processor-glamorous (processor)","correct":"Install and configure via stylelint config: \"processors\": [\"stylelint-processor-glamorous\"]"},{"note":"stylelint itself is the main dependency for running linting.","wrong":"","symbol":"stylelint (config)","correct":"import stylelint from 'stylelint'"},{"note":"Recommended config but optional; any stylelint config works.","wrong":"","symbol":"stylelint-config-standard","correct":"Install and extend in .stylelintrc: \"extends\": \"stylelint-config-standard\""}],"quickstart":{"code":"// 1. Install dependencies\n// yarn add stylelint stylelint-processor-glamorous stylelint-config-standard --dev\n\n// 2. Create .stylelintrc\n{\n  \"processors\": [\"stylelint-processor-glamorous\"],\n  \"extends\": \"stylelint-config-standard\"\n}\n\n// 3. Run stylelint on JavaScript files\n// yarn stylelint 'src/**/*.js'\n\n// 4. Example file that will be linted (e.g., src/Component.js)\nimport glamorous from 'glamorous';\n\nconst Button = glamorous.button({\n  fontSize: 14,\n  padding: '10px 20px',\n  backgroundColor: 'blue',\n  color: 'white'\n});\n\n// @css\nconst styles = {\n  container: {\n    display: 'flex',\n    justifyContent: 'center'\n  }\n};\n\nexport { Button, styles };","lang":"javascript","description":"Installation, configuration, and example of linting glamorous CSS-in-JS with stylelint."},"warnings":[{"fix":"Use a different processor for other libraries, e.g., stylelint-processor-styled-components.","message":"Only supports glamorous (not styled-components, emotion, or other CSS-in-JS libraries).","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"No action needed; these rules will be silently skipped. No warning is shown.","message":"Certain formatting rules (e.g., indentation, number-leading-zero) are ignored because inline style objects are not CSS files. The plugin ignores a predefined list of rules.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Ensure annotation is directly before the brace, e.g., // @css\n{ ... }","message":"The @css annotation must be placed immediately before the opening brace of the object literal, with no comments or whitespace in between.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Consider migrating to emotion or styled-components and use their respective stylelint processors.","message":"The glamorous library itself is deprecated in favor of emotion or styled-components.","severity":"deprecated","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run npm install stylelint-processor-glamorous --save-dev.","cause":"The processor is not installed or stylelint cannot find it.","error":"Unknown processor: stylelint-processor-glamorous"},{"fix":"Ensure the package is installed and the working directory is correct.","cause":"Module not installed or missing in node_modules.","error":"Cannot find module 'stylelint-processor-glamorous'"},{"fix":"Check that the glamorous call is a valid object literal with CSS properties.","cause":"The processor did not extract CSS from a glamorous call (e.g.,glamorous.div({...}) incorrectly formatted).","error":"syntax error: Unexpected token ."},{"fix":"Ignore this rule; it is in the ignored rules list. Add to stylelint config if needed.","cause":"The processor does not enforce indentation rules for inline styles.","error":"Expected indentation of 2 spaces but found 4 spaces"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}