@advdominion/stylelint-config
This commit is contained in:
22
packages/stylelint-config/README.md
Normal file
22
packages/stylelint-config/README.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Конфигурация для Stylelint
|
||||
|
||||
Включает в себя:
|
||||
|
||||
- [stylelint-config-standard-scss](https://github.com/stylelint-scss/stylelint-config-standard-scss)
|
||||
- [stylelint-order](https://github.com/hudochenkov/stylelint-order)
|
||||
- Проверку кода тега `<style>` в файлах `.vue`
|
||||
|
||||
## Использование
|
||||
|
||||
### Требования
|
||||
|
||||
- [Stylelint](https://stylelint.io/) ^10.0.0
|
||||
|
||||
### Подключание
|
||||
|
||||
```js
|
||||
export default {
|
||||
extends: ['@advdominion/stylelint-config'],
|
||||
// Дополнительная конфигурация проекта
|
||||
};
|
||||
```
|
||||
54
packages/stylelint-config/index.js
Normal file
54
packages/stylelint-config/index.js
Normal file
@@ -0,0 +1,54 @@
|
||||
/* eslint-disable unicorn/no-null */
|
||||
|
||||
export default {
|
||||
extends: ['stylelint-config-standard-scss'],
|
||||
overrides: [
|
||||
{
|
||||
files: ['**/*.vue'],
|
||||
customSyntax: 'postcss-html',
|
||||
},
|
||||
],
|
||||
plugins: ['stylelint-order'],
|
||||
rules: {
|
||||
'block-no-empty': null,
|
||||
'no-invalid-double-slash-comments': null,
|
||||
'property-disallowed-list': [
|
||||
'animation',
|
||||
'background',
|
||||
'border',
|
||||
'flex',
|
||||
'font',
|
||||
'grid',
|
||||
'margin',
|
||||
'padding',
|
||||
'transition',
|
||||
],
|
||||
'color-hex-length': 'long',
|
||||
'font-weight-notation': 'named-where-possible',
|
||||
'container-name-pattern': null,
|
||||
'custom-media-pattern': null,
|
||||
'custom-property-pattern': null,
|
||||
'keyframes-name-pattern': null,
|
||||
'layer-name-pattern': null,
|
||||
'selector-class-pattern': null,
|
||||
'selector-id-pattern': null,
|
||||
'declaration-block-no-redundant-longhand-properties': null,
|
||||
'scss/double-slash-comment-empty-line-before': null,
|
||||
'order/order': [
|
||||
{
|
||||
type: 'at-rule',
|
||||
name: 'use',
|
||||
},
|
||||
'dollar-variables',
|
||||
'custom-properties',
|
||||
'declarations',
|
||||
{
|
||||
type: 'at-rule',
|
||||
name: 'include',
|
||||
},
|
||||
'at-rules',
|
||||
'rules',
|
||||
],
|
||||
'order/properties-alphabetical-order': true,
|
||||
},
|
||||
};
|
||||
22
packages/stylelint-config/package.json
Normal file
22
packages/stylelint-config/package.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "@advdominion/stylelint-config",
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://gitea.optiweb.ru/public/frontend.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"postcss-html": "^1.8.1",
|
||||
"stylelint-config-standard-scss": "^17.0.0",
|
||||
"stylelint-order": "^7.0.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"stylelint": "^17.0.0"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user