|
| 1 | +# @trigen/stylelint-config |
| 2 | + |
| 3 | +[![NPM version][npm]][npm-url] |
| 4 | +[![Node version][node]][node-url] |
| 5 | +[![Dependencies status][deps]][deps-url] |
| 6 | +[![Install size][size]][size-url] |
| 7 | +[![Build status][build]][build-url] |
| 8 | + |
| 9 | +[npm]: https://img.shields.io/npm/v/%40trigen/stylelint-config.svg |
| 10 | +[npm-url]: https://www.npmjs.com/package/@trigen/stylelint-config |
| 11 | + |
| 12 | +[node]: https://img.shields.io/node/v/%40trigen/stylelint-config.svg |
| 13 | +[node-url]: https://nodejs.org |
| 14 | + |
| 15 | +[deps]: https://img.shields.io/librariesio/release/npm/@trigen/stylelint-config |
| 16 | +[deps-url]: https://libraries.io/npm/@trigen%2Fstylelint-config/tree |
| 17 | + |
| 18 | +[size]: https://packagephobia.com/badge?p=@trigen/stylelint-config |
| 19 | +[size-url]: https://packagephobia.com/result?p=@trigen/stylelint-config |
| 20 | + |
| 21 | +[build]: https://img.shields.io/github/actions/workflow/status/TrigenSoftware/scripts/tests.yml?branch=main |
| 22 | +[build-url]: https://github.com/TrigenSoftware/scripts/actions |
| 23 | + |
| 24 | +Trigen's Stylelint config. |
| 25 | + |
| 26 | +## Install |
| 27 | + |
| 28 | +```bash |
| 29 | +pnpm add -D @trigen/stylelint-config |
| 30 | +# or |
| 31 | +yarn add -D @trigen/stylelint-config |
| 32 | +# or |
| 33 | +npm i -D @trigen/stylelint-config |
| 34 | +``` |
| 35 | + |
| 36 | +## Configure |
| 37 | + |
| 38 | +Create `stylelint.config.js` with next content: |
| 39 | + |
| 40 | +```js |
| 41 | +export default { |
| 42 | + extends: ['@trigen/stylelint-config'] |
| 43 | +} |
| 44 | +``` |
| 45 | + |
| 46 | +### Additional configs |
| 47 | + |
| 48 | +There are additional configs for specific language features and strict mode: |
| 49 | + |
| 50 | +| Config | Description | |
| 51 | +|--------|-------------| |
| 52 | +| @trigen/stylelint-config/scss | Rules for SCSS code. | |
| 53 | +| @trigen/stylelint-config/logical | Rules with CSS logical properties support. | |
| 54 | +| @trigen/stylelint-config/strict | Strict rules for enhanced code quality. | |
| 55 | + |
| 56 | +Example: |
| 57 | + |
| 58 | +`stylelint.config.js`: |
| 59 | + |
| 60 | +```js |
| 61 | +export default { |
| 62 | + extends: [ |
| 63 | + '@trigen/stylelint-config', |
| 64 | + '@trigen/stylelint-config/scss', |
| 65 | + '@trigen/stylelint-config/logical' |
| 66 | + ] |
| 67 | +} |
| 68 | +``` |
0 commit comments