Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

broccoli-style-lint

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-style-lint

Broccoli stylelint plugin

  • 0.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Build Status downloads

Broccoli Style Lint

Add stylelint to your broccoli build pipeline with ease.

Currently doesn't support ignored files configuration

Installation

npm install --save-dev broccoli-style-lint

Usage

###Basic

var StyleLint = require('broccoli-style-lint');

// path to files that need linting
var node = new StyleLint('app/styles');

the default output will be the same SCSS files, in the same tree structure.

###Generating Tests

var node = new StyleLint('app/styles', {generateTests:true});

Instead of receiving a tree of scss files, the plugin will output a tree of test files

original tree

.
├── scssfile1.sscss
└── nested-dir/
    ├── scssfile2.scss

output tree

.
├── scssfile1.stylelint-test.js
└── nested-dir/
    ├── scssfile2.stylelint-test.js
var StyleLint = require('broccoli-style-lint');
var Funnel =      require('broccoli-funnel');
// path to files that need linting
var node = new StyleLint('app/styles');

// to extract tests from linter output
new Funnel(node, {
  srcDir:'tests',
});

See below for more advaned test configurations

Configuration

linterConfig {Object}

Hash as specified by stylelint

doesn't accept files option

onError {function}

A hook that allows you to do whatever you want

testFailingFiles {boolean}

If true it will generate a unit test if the file fails lint.

testPassingFiles {boolean}

If true it will generate a unit test if the passes fails lint.

generateTests {boolean}

If true it will generate tests for both passing and failing tests, overrides the testPassingFiles and testFailingFiles

disableConsoleLogging {boolean}

If true it will disable logging of errors to console

Keywords

FAQs

Package last updated on 20 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc