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

stylelint-config-strict-mode

v0.0.5

Published

Stylelint configuration with strict settings

Downloads

2

Readme

Stylelint configuration with strict settings

Table of Contents

Overview

This Stylelint configuration package includes a generous number of Stylelint plugins. The default settings are meant to enforce strict design patterns for CSS / SCSS. Most of the plugins included by this configuration can be found on the GitHub Awesome list for Stylelint. We try to include every well-known and well-received plugin. Then, we customize the settings to our liking. This package is maintained by Megabyte Labs. You can refer to the Megabyte Labs Code Docs to learn more about the design patterns we recommend there. You can use this configuration as is or customize it to your liking so you can have your own shared Stylelint configuration package by forking this repository!

Requirements

If you are simply including this library in your project, all you need is a recent version of Node.js. Node.js >14.18.0 is sometimes required and is the only version range we actively support. Albeit, it is highly probable that lower versions will work as well depending on the requirements that this project imports.

Developer Requirements

The following versions of Node.js and Python are required for development:

Other versions may work, but only the above versions are supported. Most development dependencies are installed automatically by our Taskfile.yml set-up (even Node.js and Python). Run bash start.sh to install Bodega (an improved fork of go-task) and run the initialization sequence. The taskfiles will automatically install dependencies as they are needed, based on what development tasks you are running. For more information, check out the CONTRIBUTING.md or simply run:

npm run help

npm run help will ensure Bodega is installed and then open an interactive dialog where you can explore and learn about various developer commands.

Configuration

This configuration combines several popular shared configurations and also includes a handful of useful plugins. The configuration is defined in the src/main.js file. The configuration is:

module.exports = {
  plugins: [
    'stylelint-css-modules',
    'stylelint-config-rational-order',
    'stylelint-css-modules-no-global-scoped-selector',
    'stylelint-csstree-validator',
    'stylelint-declaration-block-no-ignored-properties',
    'stylelint-declaration-strict-value',
    'stylelint-gamut',
    'stylelint-group-selectors',
    'stylelint-high-performance-animation',
    'stylelint-images',
    'stylelint-no-nested-media',
    'stylelint-no-unresolved-module',
    'stylelint-no-unsupported-browser-features',
    'stylelint-rem-over-px',
    'stylelint-selector-no-empty',
    'stylelint-selector-tag-no-without-class',
    'stylelint-use-nesting'
  ],
  rules: {
    'css-modules/composed-class-names': true,
    'css-modules/css-variables': [
      true,
      {
        resolve: {
          extensions: ['.css', '.scss']
        }
      }
    ],
    'css-modules/no-global-scoped-selector': true,
    'csstools/use-nesting': true,
    'csstree/validator': true,
    'gamut/color-no-out-gamut-range': true,
    'images/broken': true,
    'images/prefer-data-uri': 2048,
    'pitcher/no-nested-media': true,
    'plugin/declaration-block-no-ignored-properties': true,
    'plugin/no-low-performance-animation-properties': true,
    'plugin/no-unresolved-module': {
      alias: {
        assets: 'pebbles'
      },
      modules: ['node_modules']
    },
    'plugin/no-unsupported-browser-features': [
      true,
      {
        browsers: ['> 1%', 'Last 2 versions'],
        ignore: ['rem'],
        ignorePartialSupport: true
      }
    ],
    'plugin/selector-tag-no-without-class': ['div', 'span'],
    'plugin/stylelint-group-selectors': true,
    'plugin/stylelint-selector-no-empty': true,
    'rem-over-px/rem-over-px': true,
    'scale-unlimited/declaration-strict-value': 'color'
  },
  extends: [
    'stylelint-config-html',
    'stylelint-stylus/standard',
    'stylelint-config-sass-guidelines',
    'stylelint-config-standard-scss',
    'stylelint-config-rational-order',
    'stylelint-config-prettier-scss'
  ]
}

Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page. If you would like to contribute, please take a look at the contributing guide.

Brian Zalewski

Affiliates

Below you will find a list of services we leverage that offer special incentives for signing up for their services through our special links:

License

Copyright © 2020-2021 Megabyte LLC. This project is MIT licensed.