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.
Install this config package and Stylelint:
npm install stylelint-config-meetic --save-dev
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.
/* 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.
A configuration for linting JavaScript (ES5 & ES6) with eslint is available at eslint-config-meetic.
npm install && npm test