Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Commit

Permalink
feat: add use-logical plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-lit committed Feb 4, 2021
1 parent 96ba7fc commit 15eb2ff
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 13 deletions.
12 changes: 6 additions & 6 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ module.exports = {

extends: [
'stylelint-config-standard',
require.resolve('./plugins/a11y.js'),
require.resolve('./plugins/declaration-block-no-ignored-properties.js'),
require.resolve('./plugins/high-performance-animation.js'),
require.resolve('./plugins/order.js'),
require.resolve('./plugins/scss.js'),
require.resolve('./plugins/prettier.js'),
require.resolve('./plugins/a11y'),
require.resolve('./plugins/declaration-block-no-ignored-properties'),
require.resolve('./plugins/high-performance-animation'),
require.resolve('./plugins/order'),
require.resolve('./plugins/scss'),
require.resolve('./plugins/prettier'),
],

rules: {
Expand Down
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
# Конфигурация StyleLint
# StyleLint Configuration

## Установка
## Installation

```sh
npm i @alexlit/config-stylelint -D
```

## Подключение
## Connection

```js
// .stylelintrc.js
module.exports = {
extends: ['@alexlit/config-stylelint'],
extends: [
'@alexlit/config-stylelint',

/* optional */
'@alexlit/config-stylelint/plugins/optional/use-logical',
],

ignoreFiles: [
...require('@alexlit/config-stylelint/.stylelintrc.js').ignoreFiles,
...require('@alexlit/config-stylelint/.stylelintrc').ignoreFiles,
],
};
```
20 changes: 18 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"stylelint-order": "^4.1.0",
"stylelint-prettier": "^1.1.2",
"stylelint-scss": "^3.18.0",
"stylelint-use-logical": "^1.1.0",
"stylelint-use-nesting": "^3.0.0"
},
"devDependencies": {
Expand Down
10 changes: 10 additions & 0 deletions plugins/optional/use-logical.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* @see [stylelint-use-logical](https://github.com/csstools/stylelint-use-logical)
*/
module.exports = {
plugins: ['stylelint-use-logical'],

rules: {
'csstools/use-logical': true,
},
};

0 comments on commit 15eb2ff

Please sign in to comment.