Code Monkey home page Code Monkey logo

stylelint's Introduction

Stylelint

npm version Build Status npm downloads

A mighty, modern linter that helps you avoid errors and enforce conventions in your styles.

Features

It's mighty as it:

  • has over 170 built-in rules for modern CSS syntax and features
  • supports plugins so you can create your own rules
  • automatically fixes problems where possible
  • is well tested with over 15000 unit tests
  • supports shareable configs that you can extend or create
  • is unopinionated so that you can customize it to your exact needs
  • complements pretty printers like Prettier
  • has a growing community and is used by Google, GitHub and WordPress

And can be extended to:

  • parse CSS-like syntaxes like SCSS, Sass, Less and SugarSS
  • extract embedded styles from HTML, Markdown and CSS-in-JS object & template literals

How it'll help you

It'll help you avoid errors, for example styles that are:

  • invalid, e.g. malformed hex colors and named grid areas
  • valid but with unintended consequences, e.g. duplicated selectors and overridden properties

And enforce conventions, for example:

  • what units, functions, at-rules etc are allowed
  • consistent patterns for selector names, at-rule names, custom properties etc
  • maximum specificity or maximum quantity of each selector type
  • your preferred notation for color functions, font weight etc

There are also rules for enforcing stylistic consistency, but we now recommend you use Stylelint alongside a pretty printer like Prettier. Linters and pretty printers are complementary tools that work together.

Example output

Example

Guides

Contributors

Stylelint is maintained by volunteers. Without the code contributions from all these fantastic people, Stylelint would not exist. Become a contributor.

Sponsors

Thank you to all our sponsors! Become a sponsor.

Backers

Thank you to all our backers! Become a backer.

Website hosting

Deploys by Netlify

License

The MIT License.

stylelint's People

Contributors

alexander-akait avatar bilie avatar caydenberg avatar davidtheclark avatar dependabot-preview[bot] avatar dependabot[bot] avatar dryoma avatar evilebottnawi avatar fanich37 avatar gaidarenko avatar greenkeeper[bot] avatar greenkeeperio-bot avatar gucong3000 avatar hudochenkov avatar jeddy3 avatar kangax avatar m-allanson avatar makotot avatar mattxwang avatar modosc avatar moox avatar nex3 avatar ntwb avatar onigoetz avatar ota-meshi avatar sendilkumarn avatar stephenwade avatar vankop avatar xhmikosr avatar ybiquitous avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.