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

@pragmatics/stylelint-config-order

v2.2.3

Published

Opinionated stylelint config pragmatically ordering css properties

Downloads

918

Readme

Stylelint Config Order

NPM version Maintenance Package size
Release Status Dependencies Issues open Code coverage Quality Gate Status

Stylelint config enforcing an understandable and consistent code order.

Summary

Getting started

Installation

@pragmatics/stylelint-config-order does not install Stylelint for you.

Install stylelint and this config as part of your devDependencies.

yarn add stylelint @pragmatics/stylelint-config-order -D

Usage

Stylelint config

Add @pragmatics/stylelint-config-order to your Stylelint configuration file:

extends:
  - '@pragmatics/stylelint-config-order'

Use @pragmatics/stylelint-config to apply pragmatic code style to the full extend (@pragmatics/stylelint-config-order is already a part of that config).

Learn more about Stylelint.

Automation

We recommend configuring your editor to automatically format your code by on save.

You can use Stylelint with a pre-commit tool. This can re-format your files that are marked as “staged” via git add before you commit.

Make sure Stylelint is installed and in your devDependencies before you proceed

npx mrm lint-staged

This will install husky and lint-staged, then add a configuration to the project’s package.json that will automatically format supported files in a pre-commit hook.

Testing

We use Jest for testing, use npm test to run all tests.

System test

By running this stylelint config in tests/system/system.test.js on an unformatted fixture.scss we test whether it matches our expected.scss file. We are planning to:

Vision

Inspired by pragmatism and pracmatics, the aim of this stylelint config is:

  • to format css/scss to be understandable, scannable and consistent
  • to let developers focus on writing code, instead of adhering to a styleguide

Rationale

Properties with the largest impact (scope and/or importance) are put first. Using concepts from both Idiomatic CSS and ITCSS we setup our config by:

  1. Ordering on impact
    Rules with a larger scope or more effect on the layout and box size have more impact on the UI. Seeing rules with more impact first increases understanding.
  2. Grouping by relationship
    Grouping all properties related to typography and theming makes them easier to find.

Groups

Related property declarations are grouped in the following order:

  1. Specials
  2. Positioning
  3. Display
  4. Box
  5. Box model
  6. Table
  7. Typography
  8. Theming
  9. Accessibility & Interactions
  10. SVG presentation
  11. Transition & animation

Built With

Contributing

Please read CONTRIBUTING.md for details on our the process for submitting issues and pull requests to us. This repository has a code of conduct, we will remove things that do not respect it.

Versioning

We use SemVer for versioning. For the available versions, see the tags on this repository.

Authors

See the list of contributors who participated in this project.

License

This project is licensed under the ISC License.

Acknowledgements

The name is inspired by pragmatism and pracmatics.

The following guidelines, methodologies and architectures have been used as inspiration for this config:

Ordering

General