Registry / testing / csscombx

csscombx

JSON →
library4.2.1jsnpmunverified

CSScombx is a CSS coding style formatter (v4.2.1) that sorts CSS properties in a specific order and formats style sheets according to configurable rules. It is a fork of CSScomb specifically adapted for Drupal CMS coding standards, with default configuration in config/drupal.json. The tool is in maintenance mode with restricted support. It uses the Gonzales PE parser for robust CSS, SCSS, SASS, and LESS parsing. Key differentiators: property sorting, multiple predefined configs, and support for nested .csscombx.json config files. Unlike Prettier or Stylelint, it focuses on property ordering and Drupal compliance.

npm install csscombx
INSTALL
IMPORT
SIG · CSSCOMBX
C
csscombx
testingjavascriptv4.2.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Comb
import Comb from 'csscombx';
const Comb = require('csscombx');
ESM-friendly if bundler supports it; commonjs require works in Node.js
Comb
const Comb = require('csscombx');
import { Comb } from 'csscombx';
Default export – not a named export
processPath
comb.processPath('./src');
Comb.processPath('./src');
processPath is an instance method, not static

Initialize Comb with 'zen' config and process all CSS/SCSS/SASS/LESS files in './styles' directory.

const Comb = require('csscombx'); const comb = new Comb('zen'); comb.processPath('./styles', function(err, results) { if (err) console.error(err); console.log('Processed files:', results); });
Debug
Known issues
deprecatedTool is in maintenance mode with restricted support.
fix
Consider migrating to other CSS formatters like Prettier or Stylelint.
affects: >=4.0.0
gotchaConfig file must be named .csscombx.json (with leading dot) to be auto-detected.
fix
Ensure config file name is exactly .csscombx.json in project root.
affects: >=4.0.0
gotchaprocessPath callback is required; if omitted, errors may be swallowed.
fix
Always provide a callback function when calling processPath.
affects: >=4.0.0
Errors
Common errors & fixes
Error: Cannot find module 'gonzales-pe'
Missing dependency gonzales-pe.
fix
Run 'npm install csscombx --save' which installs gonzales-pe as a dependency.
TypeError: Comb is not a constructor
Importing Comb as a named export instead of default.
fix
Use 'const Comb = require('csscombx');' (CommonJS) or 'import Comb from 'csscombx';' (ESM).
Upgrade
Version history
4.2.1latest on npm
Audit
Dependencies
gonzales-perequiredCSS parser used by CSScombx
Agent activity
10 hits · last 30 days
node
8
OpenAI (training)
1
Resources
csscombx — npm install csscombx · libregistry