Skip to content

A configurable stylelint configuration used in Meetic projects to lint PostCSS.

Notifications You must be signed in to change notification settings

Meetic/stylelint-config-meetic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stylelint-config-meetic

NPM version Build Status Code Climate

A configurable Stylelint configuration used in Meetic projects.

The purpose of this library is to promote code style consistency across complex projects in organizations of all sizes.

Installation

Install this config package and Stylelint:

npm install stylelint-config-meetic --save-dev

Usage

Create a .stylelintrc file with the following basic configuration:

{
  "extends": "stylelint-config-meetic"
}

This configuration is meant to be extended on a per-project basis as necessary using Stylelint's shareable configs feature. For more details about how shareable configs work, see the Stylelint documentation.

Example

/* colors.css */

:root {
  --my-color-a: #f00;
  --my-color-b: #00f;
}
/* media.css */

@custom-media --small (width >= 100px) and (width <= 200px);
/* main.css */

@import './colors';
@import './media';

.component-a,
.component-b {
  color: var(--my-color-a);
  box-shadow:
    0 0 0 1px #5b9dd9,
    0 0 2px 1px rgba(30, 140, 190, 0.8);
}

@media (--small) {
  .component-a {
    color: var(--my-color-b);
  }
}

A more comprehensive list of examples is available in the examples folder.

Similar projects

A configuration for linting JavaScript (ES5 & ES6) with eslint is available at eslint-config-meetic.

Tests

npm install && npm test

License

MIT License

About

A configurable stylelint configuration used in Meetic projects to lint PostCSS.

Resources

Stars

Watchers

Forks

Packages

No packages published