Registry / devops / broccoli-scss-linter

broccoli-scss-linter

JSON →
library3.1.0jsnpmunverified

Broccoli plugin that integrates sass-lint for linting SCSS/SASS files in Broccoli build pipelines. Version 3.1.0 is the latest, targeting Node ≥0.10.0. It wraps sass-lint, providing a config option for custom lint rules. Limited maintenance; the underlying sass-lint has been deprecated in favor of stylelint with SCSS plugin. Use this only for legacy Broccoli projects stuck on sass-lint.

npm install broccoli-scss-linter
INSTALL
IMPORT
SIG · BROCCOLI-SCSS-LINT
B
broccoli-scss-linter
devopsjavascriptv3.1.0
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.

default
var ScssLinter = require('broccoli-scss-linter');
import ScssLinter from 'broccoli-scss-linter';
Package is CommonJS-only; ESM import not supported. Use require().
ScssLinter
var ScssLinter = require('broccoli-scss-linter'); new ScssLinter(inputNodes, options);
new ScssLinter(inputNode);
Constructor expects an array of input nodes (or a single node wrapped in array). Passing a single node without array causes runtime error.
ScssLinter
var ScssLinter = require('broccoli-scss-linter').default;
var ScssLinter = require('broccoli-scss-linter').ScssLinter;
The module exports the class directly (not as named export). Accessing .ScssLinter yields undefined.

Shows basic usage: create a ScssLinter instance for a directory, optionally with a config file, and integrate into Broccoli pipeline.

var ScssLinter = require('broccoli-scss-linter'); var funnel = require('broccoli-funnel'); // Assuming 'app/styles' contains .scss files var linted = new ScssLinter(['app/styles'], { config: '.scss-lint.yml' // optional custom config }); // Merge with other trees var merge = require('broccoli-merge-trees'); module.exports = merge([linted, otherTrees]);
Debug
Known issues
gotchaConstructor expects an array of input nodes. Passing a single node (not wrapped in array) will throw: 'Expected an array of nodes'
fix
Wrap the input node in an array: new ScssLinter([inputNode], options)
affects: >=0.0.0
deprecatedsass-lint is deprecated in favor of stylelint with scss plugin. This package wraps sass-lint and will not receive updates.
fix
Migrate to stylelint with @stylelint/postcss-css-in-js or similar for Broccoli.
affects: >=0.0.0
gotchaThe package does not support ESM imports; using import will fail.
fix
Use CommonJS require() instead of ES import.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'sass-lint'
sass-lint is a peer dependency not automatically installed via npm install.
fix
Run: npm install sass-lint --save-dev
TypeError: ScssLinter is not a constructor
Using default import (ESM) or incorrect require path.
fix
Use require('broccoli-scss-linter') (CommonJS) and ensure to use new keyword.
Configuration file '.scss-lint.yml' not found
The config option points to a file that does not exist or is not relative to the project root.
fix
Provide absolute or relative path from the project root; ensure file exists.
Upgrade
Version history
3.1.0latest on npm
Audit
Dependencies
sass-lintrequiredCore linting engine; provides all lint rules and configuration parsing.
broccoli-persistent-filterrequiredUsed internally for caching and incremental builds.
Agent activity
5 hits · last 30 days
node
4
Resources
broccoli-scss-linter — npm install broccoli-scss-linter · libregistry