Registry / testing / scsslint

scsslint

JSON →
library0.0.3jsnpmunverified

Legacy Node.js bindings for the Ruby-based scss-lint tool (v0.0.3). This package wraps the Ruby gem and provides a simple API to lint SCSS files programmatically from Node.js. It is part of the grunt-scsslint ecosystem and has not been updated since 2014. It requires Ruby and the scss-lint gem to be installed separately. Not to be confused with modern SCSS linters like stylelint-scss. Active development ceased; use at your own risk.

npm install scsslint
INSTALL
IMPORT
SIG · SCSSLINT
S
scsslint
testingjavascriptv0.0.3
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.

ScssLinter
const ScssLinter = require('scsslint');
import ScssLinter from 'scsslint';
ESM import will not work; this package only supports CommonJS `require`.
constructor
const linter = new ScssLinter();
const linter = ScssLinter();
Must use `new` keyword; calling without `new` will cause a runtime error.
lint method
linter.lint(files, options, callback);
linter.lint(files, callback, options);
Argument order is files, options, callback — not files, callback, options.

Shows how to install, require, instantiate, and call the lint method with files, options, and callback.

const ScssLinter = require('scsslint'); const linter = new ScssLinter(); linter.lint( ['path/to/file.scss', 'path/to/another.scss'], { colorize: true, verbose: true }, function(err, result) { if (err) { console.error('Lint error:', err); } else { console.log('Lint result:', result); } } );
Debug
Known issues
breakingRequires Ruby and scss-lint gem installed separately. Without them, the package will fail silently or throw a cryptic error.
fix
Install Ruby and run `gem install scss-lint` before using this package.
affects: >=0.0.0
gotchaThe package exports a constructor, not a factory. Calling `ScssLinter()` without `new` will not create a proper instance.
fix
Always use `new ScssLinter()`.
affects: >=0.0.0
deprecatedThe underlying scss-lint Ruby gem is deprecated and unmaintained. Use stylelint with scss plugin instead.
fix
Migrate to stylelint and @stylelint/postcss-css-in-js or similar modern tooling.
affects: >=0.0.0
gotchaThe `lint` method expects files as an array of strings, options object, and a callback. Incorrect argument ordering will cause unexpected behavior.
fix
Ensure arguments are: files (array), options (object), callback (function).
affects: >=0.0.0
gotchaNo error handling if the scss-lint gem is not installed; the callback may never be called or receive an error.
fix
Check for Ruby and scss-lint availability before using the package, or wrap call in try-catch.
affects: >=0.0.0
Errors
Common errors & fixes
Cannot find module 'scsslint'
Package not installed or npm failed to install due to missing Ruby dependencies.
fix
Run `npm install scsslint --save` and ensure Ruby is installed.
ScssLinter is not a constructor
Called `ScssLinter()` without `new`.
fix
Change to `new ScssLinter()`.
sh: scss-lint: command not found
Ruby gem scss-lint is not installed or not in PATH.
fix
Install Ruby, then run `gem install scss-lint`.
TypeError: linter.lint is not a function
Import failed or the package didn't load correctly (e.g., due to CJS/ESM mismatch).
fix
Use CommonJS `require` and ensure the package is installed properly.
Upgrade
Version history
0.0.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
scsslint — npm install scsslint · libregistry