Commit e4ee5b7a authored by Nikolay Gromov's avatar Nikolay Gromov

stylelint test (1)

parent d93a4a15
{ {
"syntax": "less",
"plugins": [ "plugins": [
"stylelint-scss",
"stylelint-declaration-use-variable" "stylelint-declaration-use-variable"
], ],
# http://stylelint.io/user-guide/rules/ # http://stylelint.io/user-guide/rules/
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
"length-zero-no-unit": [true, { "length-zero-no-unit": [true, {
"message": "Нулю не нужны измерения единицы" "message": "Нулю не нужны измерения единицы"
}], }],
"time-min-milliseconds": [100, { "time-no-imperceptible": [true, {
"message": "Время менее 100мс — нет смысла использовать" "message": "Время менее 100мс — нет смысла использовать"
}], }],
# "unit-blacklist": [["px", "deg"], { # "unit-blacklist": [["px", "deg"], {
...@@ -180,6 +180,9 @@ ...@@ -180,6 +180,9 @@
"declaration-block-no-duplicate-properties": [true, { "declaration-block-no-duplicate-properties": [true, {
"message": "Правила повторять не следует" "message": "Правила повторять не следует"
}], }],
"declaration-block-no-ignored-properties": [true, {
"message": "Правило это не сработает"
}],
"declaration-block-no-shorthand-property-overrides": [true, { "declaration-block-no-shorthand-property-overrides": [true, {
"message": "Свойство это неочевидно перебивает другое для селектора этого" "message": "Свойство это неочевидно перебивает другое для селектора этого"
}], }],
...@@ -204,6 +207,10 @@ ...@@ -204,6 +207,10 @@
# "block-no-empty": [true, { # "block-no-empty": [true, {
# "message": "Пустые блоки писать не следует" # "message": "Пустые блоки писать не следует"
# }], # }],
"block-no-single-line": [true, {
"message": "Селекторы строкой одной писать не следует",
"severity": "warning"
}],
"block-opening-brace-newline-after": ["always", { "block-opening-brace-newline-after": ["always", {
"message": "После «{» перенос строки быть должен" "message": "После «{» перенос строки быть должен"
}], }],
...@@ -256,6 +263,9 @@ ...@@ -256,6 +263,9 @@
"selector-pseudo-element-no-unknown": [true, { "selector-pseudo-element-no-unknown": [true, {
"message": "Псевдоэлемента такого на светлой строне силы нет" "message": "Псевдоэлемента такого на светлой строне силы нет"
}], }],
"selector-root-no-composition": [true, {
"message": ":root всегда должен быть самостоятелен"
}],
"selector-type-case": ["lower", { "selector-type-case": ["lower", {
"message": "Селкторы буквами строчными набирать следует" "message": "Селкторы буквами строчными набирать следует"
}], }],
...@@ -277,10 +287,14 @@ ...@@ -277,10 +287,14 @@
"selector-list-comma-space-before": ["never", { "selector-list-comma-space-before": ["never", {
"message": "Перед запятой пробела быть не должно" "message": "Перед запятой пробела быть не должно"
}], }],
"rule-empty-line-before": ["always", { "rule-nested-empty-line-before": ["always", {
"message": "Перед селектором вложенным строку пустую оставь", "message": "Перед селектором вложенным строку пустую оставь",
ignore: ["after-comment"] ignore: ["after-comment"]
}], }],
"rule-non-nested-empty-line-before": ["always", {
"message": "Между селекторами строку пустую оставь",
ignore: ["after-comment"]
}],
"media-feature-colon-space-after": ["always", { "media-feature-colon-space-after": ["always", {
"message": "В @media после «:» пробелы необходимы" "message": "В @media после «:» пробелы необходимы"
}], }],
...@@ -294,6 +308,9 @@ ...@@ -294,6 +308,9 @@
"message": "Использовать вендорные префиксы не следует", "message": "Использовать вендорные префиксы не следует",
"severity": "warning" "severity": "warning"
}], }],
"media-feature-no-missing-punctuation": [true, {
"message": "Пунктуация в медиа нарушена в строке этой"
}],
"media-feature-parentheses-space-inside": ["never", { "media-feature-parentheses-space-inside": ["never", {
"message": "Пробелы после «(» и перед «)» нельзя использовать" "message": "Пробелы после «(» и перед «)» нельзя использовать"
}], }],
...@@ -353,9 +370,12 @@ ...@@ -353,9 +370,12 @@
}], }],
"max-nesting-depth": [3, { "max-nesting-depth": [3, {
"message": "Вложения боле 3 уровней — на тёмную сторону путь", "message": "Вложения боле 3 уровней — на тёмную сторону путь",
"ignore": ["blockless-at-rules"], "ignore": ["at-rules-without-declaration-blocks"],
"severity": "warning" "severity": "warning"
}], }],
"no-browser-hacks": [true, {
"message": "Браузерные хаки не используем мы"
}],
"no-duplicate-selectors": [true, { "no-duplicate-selectors": [true, {
"message": "Селкторы дублировать не хочешь ты" "message": "Селкторы дублировать не хочешь ты"
}], }],
...@@ -371,5 +391,12 @@ ...@@ -371,5 +391,12 @@
"no-missing-end-of-source-newline": [true, { "no-missing-end-of-source-newline": [true, {
"message": "Файл пустой строкой кончаться должен: https://goo.gl/Co2tZ8" "message": "Файл пустой строкой кончаться должен: https://goo.gl/Co2tZ8"
}], }],
"no-descending-specificity": [true, {
"message": "Осторожно, выше по коду есть более специфичный селектор",
"severity": "warning"
}],
"selector-no-empty": [true, {
"message": "Пустой селектор не хочешь ты"
}],
} }
} }
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
} }
}, },
"scripts": { "scripts": {
"test": "stylelint \"src/**/*.scss\"", "test": "stylelint \"src/**/*.scss\" --syntax scss",
"start": "gulp", "start": "gulp",
"deploy": "cross-env NODE_ENV=production ./node_modules/.bin/gulp build && cross-env ./node_modules/.bin/gulp deploy", "deploy": "cross-env NODE_ENV=production ./node_modules/.bin/gulp build && cross-env ./node_modules/.bin/gulp deploy",
"build": "cross-env NODE_ENV=production npm start build" "build": "cross-env NODE_ENV=production npm start build"
...@@ -110,13 +110,18 @@ ...@@ -110,13 +110,18 @@
"gulp-uglify": "^2.1.0", "gulp-uglify": "^2.1.0",
"gulp-wait": "0.0.2", "gulp-wait": "0.0.2",
"gulp.spritesmith": "^6.3.0", "gulp.spritesmith": "^6.3.0",
"husky": "^0.13.2",
"imagemin-pngquant": "^5.0.0", "imagemin-pngquant": "^5.0.0",
"ismobilejs": "^0.4.0", "ismobilejs": "^0.4.0",
"jquery": "^3.1.1", "jquery": "^3.1.1",
"jquery-migrate": "^3.0.0", "jquery-migrate": "^3.0.0",
"lint-staged": "^3.4.0",
"merge-stream": "^1.0.1", "merge-stream": "^1.0.1",
"postcss-import": "^9.1.0", "postcss-import": "^9.1.0",
"postcss-inline-svg": "^2.3.0", "postcss-inline-svg": "^2.3.0",
"stylelint": "^7.9.0",
"stylelint-declaration-use-variable": "^1.6.0",
"stylelint-scss": "^1.4.3",
"svg4everybody": "^2.1.7", "svg4everybody": "^2.1.7",
"vinyl-buffer": "^1.0.0" "vinyl-buffer": "^1.0.0"
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment