Compare commits

...

8 Commits

Author SHA1 Message Date
1c32452e60 Publish
- @advdominion/babel-plugin-nunjucks@3.1.1
 - @advdominion/css-var@1.0.1
 - @advdominion/eslint-config@2.0.0
 - @advdominion/scroll-to@1.0.1
 - @advdominion/stylelint-config@1.1.0
2026-02-19 22:02:57 +04:00
2e18f11fcf Убраны предупреждения Yarn 2026-02-19 21:56:19 +04:00
17378965fd Доработки по Styelint 2026-02-19 21:51:05 +04:00
14d13915c9 Обновлены зависимости для ESLint 2026-02-19 21:49:52 +04:00
369595c2de Remove pinst 2026-02-12 23:03:18 +04:00
49ce40cd7f @advdominion/stylelint-config 2026-02-12 23:01:06 +04:00
1a8f77622b Prettier 2026-02-12 20:30:06 +04:00
8cf1ddbaf5 Проверяем код ESLint/Prettier перед коммитом 2026-02-12 20:28:25 +04:00
15 changed files with 1319 additions and 72 deletions

1
.husky/pre-commit Executable file
View File

@@ -0,0 +1 @@
yarn lint-staged

View File

@@ -4,5 +4,11 @@ packageExtensions:
'lerna@*': 'lerna@*':
dependencies: dependencies:
ci-info: '*' ci-info: '*'
'@advdominion/eslint-config@*':
dependencies:
eslint: '*'
'@advdominion/stylelint-config@*':
dependencies:
stylelint: '*'
yarnPath: .yarn/releases/yarn-4.12.0.cjs yarnPath: .yarn/releases/yarn-4.12.0.cjs

8
lint-staged.config.js Normal file
View File

@@ -0,0 +1,8 @@
export default {
'*.js': (filenames) => {
return [`eslint --max-warnings 10 --fix ${filenames.join(' ')}`, `prettier --write ${filenames.join(' ')}`];
},
'*.{json,md,yml}': (filenames) => {
return [`prettier --write ${filenames.join(' ')}`];
},
};

View File

@@ -5,10 +5,15 @@
"workspaces": [ "workspaces": [
"packages/*" "packages/*"
], ],
"scripts": {
"postinstall": "husky"
},
"devDependencies": { "devDependencies": {
"@advdominion/eslint-config": "workspace:*", "@advdominion/eslint-config": "workspace:*",
"eslint": "^10.0.0", "eslint": "^10.0.0",
"husky": "^9.1.7",
"lerna": "^9.0.4", "lerna": "^9.0.4",
"lint-staged": "^16.2.7",
"prettier": "^3.8.1" "prettier": "^3.8.1"
} }
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@advdominion/babel-plugin-nunjucks", "name": "@advdominion/babel-plugin-nunjucks",
"version": "3.1.0", "version": "3.1.1",
"type": "module", "type": "module",
"main": "index.js", "main": "index.js",
"repository": { "repository": {

View File

@@ -1,6 +1,6 @@
{ {
"name": "@advdominion/css-var", "name": "@advdominion/css-var",
"version": "1.0.0", "version": "1.0.1",
"type": "module", "type": "module",
"main": "index.js", "main": "index.js",
"repository": { "repository": {

View File

@@ -1,6 +1,6 @@
{ {
"name": "@advdominion/eslint-config", "name": "@advdominion/eslint-config",
"version": "1.1.3", "version": "2.0.0",
"type": "module", "type": "module",
"main": "index.js", "main": "index.js",
"repository": { "repository": {
@@ -16,9 +16,9 @@
"eslint-config-prettier": "^10.1.8", "eslint-config-prettier": "^10.1.8",
"eslint-plugin-simple-import-sort": "^12.1.1", "eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-unicorn": "^63.0.0", "eslint-plugin-unicorn": "^63.0.0",
"eslint-plugin-vue": "^10.7.0", "eslint-plugin-vue": "^10.8.0",
"globals": "^17.3.0", "globals": "^17.3.0",
"vue-eslint-parser": "^10.2.0" "vue-eslint-parser": "^10.4.0"
}, },
"peerDependencies": { "peerDependencies": {
"eslint": "^10.0.0" "eslint": "^10.0.0"

View File

@@ -20,7 +20,7 @@ await scrollTo(document.querySelector('#example'), 10);
## Параметры ## Параметры
| Параметр | Тип | По умолчанию | Описание | | Параметр | Тип | По умолчанию | Описание |
| :--- | :--- | :--- | :--- | | :------------- | :------------ | :----------- | :------------------------------------------------------------------------- |
| **$el** | `HTMLElement` | — | DOM-элемент, к которому нужно прокрутить страницу | | **$el** | `HTMLElement` | — | DOM-элемент, к которому нужно прокрутить страницу |
| **offset** | `number` | `0` | Величина отступа сверху от целевого элемента | | **offset** | `number` | `0` | Величина отступа сверху от целевого элемента |
| **offsetInPx** | `boolean` | `false` | Тип отступа: `true` — в пикселях, `false` — в процентах от высоты вьюпорта | | **offsetInPx** | `boolean` | `false` | Тип отступа: `true` — в пикселях, `false` — в процентах от высоты вьюпорта |

View File

@@ -1,6 +1,6 @@
{ {
"name": "@advdominion/scroll-to", "name": "@advdominion/scroll-to",
"version": "1.0.0", "version": "1.0.1",
"type": "module", "type": "module",
"main": "index.js", "main": "index.js",
"repository": { "repository": {

View 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'],
// Дополнительная конфигурация проекта
};
```

View File

@@ -0,0 +1,55 @@
/* 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,
'no-invalid-position-declaration': [true, { ignoreAtRules: ['media'] }],
'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,
},
};

View File

@@ -0,0 +1,23 @@
{
"name": "@advdominion/stylelint-config",
"version": "1.1.0",
"type": "module",
"main": "index.js",
"repository": {
"type": "git",
"url": "https://gitea.optiweb.ru/public/frontend.git"
},
"license": "MIT",
"publishConfig": {
"access": "public"
},
"dependencies": {
"postcss": "^8.5.6",
"postcss-html": "^1.8.1",
"stylelint-config-standard-scss": "^17.0.0",
"stylelint-order": "^7.0.1"
},
"peerDependencies": {
"stylelint": "^17.0.0"
}
}

1239
yarn.lock

File diff suppressed because it is too large Load Diff