npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@pab78430/sass-lint-webpack-plugin

v1.0.5

Published

sass-lint plugin for webpack

Downloads

2

Readme

##Notice: We are no longer actively developing (or updating) this plugin, we have switch to using Stylelint via the Webpack Plugin here.

NOTE Due to how non-js files are handled via webpack, this has been forked from sasslint-loader and rewritten as plugin instead of a loader.

Sasslint Plugin

Sasslint plugin for Webpack

Install

$ npm install sasslint-webpack-plugin

Usage

In your webpack configuration

var sassLintPlugin = require('sasslint-webpack-plugin');


module.exports = {
  // ...
  plugins: [
    new sassLintPlugin(),
  ],
  // ...
}

Options

You can customize the lint settings via a .sass-lint.yml file. See sasslint options, for complete options.

  • configFile: You can change the config file location. Default: (.sass-lint.yml)
  • context: Array of strings or String, Change the root of your SCSS files. Default inherits from webpack config.
  • ignoreFiles: Array of files to ignore, must be full path, Default: none
  • ignorePlugins: Array of plugins to ignore, Default: none (example: extract-text-webpack-plugin)
  • glob: Change the glob pattern for finding files. Default: (**/*.s?(a|c)ss)
  • quiet: Suppress warnings, errors will still show. Default: false
  • failOnWarning: Have Webpack's build process die on warning. Default: false
  • failOnError: Have Webpack's build process die on error. Default: false
  • testing: Quites output normally for testing purposes, Default: 'false' Caution do not use this unless you are catching errors via Webpack CLI!
// Default settings
module.exports = {
  plugins: [
    new sassLintPlugin({
      configFile: '.sass-lint.yml',
      context: ['inherits from webpack'],
      ignoreFiles: [],
      ignorePlugins: [],
      glob: '**/*.s?(a|c)ss',
      quiet: false,
      failOnWarning: false,
      failOnError: false,
      testing: false
    }),
  ]
}

Errors and Warnings

The plugin will dump full reporting of errors and warnings. You can use the quiet option to hide files which only have warnings. quiet will not hide errors, nor will it hide warnings on files with errors.

Extract Text Plugin

You will can duplicate output of errors and warnings if you use the extract-text-webpack-plugin, add it to the ignorePlugins config option to prevent that.

NoErrorsPlugin

NoErrorsPlugin prevents Webpack from outputting anything into a bundle. So even sass-lint warnings will fail the build. No matter what error settings are used for sasslint-webpack-plugin.

So if you want to see sass-lint warnings in console during development using WebpackDevServer remove NoErrorsPlugin from webpack config.

License