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-favoritemedium

v0.10.0

Published

FavoriteMedium's css linter config, following our style guide. Supports (css, less, sass) formats.

Downloads

48

Readme

Favorite Medium's Stylelint Plugin

Supercharged css, scss, less language style guide.

Getting started

Getting start is very simple; it is just 2 step process:

1. Installation

First you need to install stylelint & stylelint-config-favoritemedium modules as dev-dependencies, use one of following command based upon your package manager configurations:

# npm
npm i -D stylelint stylelint-config-favoritemedium

# yarn
yarn add -D stylelint stylelint-config-favoritemedium

2. Setup in project

Create .stylelintrc.json file in project source directory and extend rules from installed plugin like following:

// .stylelintrc.json
{
  "extends": "stylelint-config-favoritemedium"
}

now navigate to package.json file and add following into scripts section:

// package.json

"scripts": {
  "lint:style": "stylelint ./src"
},

Pro tips (optional but nice to have)

Controlling stylelint

Add .stylelintignore file into project root; to control style lint running on unwanted files and directories.

# .stylelintignore

node_modules
package.json
Performance boost

Use --cache flag with lint command; i.e.

  "lint:style": "stylelint ./src --cache" // note -cache flag

with this flag stylelint will ignore unchanged files and scan modified files only.

Upon running this command plugin will generate .stylelintcache file in project root and you might need to add that into .gitignore to avoid pushing to remote.

3. Running

Once you setup script into package.json file create some css files and run command npm run lint:style or yarn lint:style; you will be prompted with violations messages in console if there are any!

image

Contributions

You are welcome to contribute this (css, scss, less) language style guide line plugin.

For contribution you can either report an issue or fork project and create Pull Request. We will just review and merge proposed changes.

License

This project is licensed under MIT