@alexlit/config-stylelint 61.3.2 → 61.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable unicorn/no-null */
2
2
 
3
- const ADDITIONAL_PLUGINS = {
3
+ const DEFAULT_PLUGINS = {
4
4
  'color-format': true,
5
5
  'declaration-block-no-ignored-properties': true,
6
6
  'high-performance-animation': true,
@@ -26,7 +26,7 @@ const OPTIONAL_PLUGINS = {
26
26
  const CODESTYLE_PLUGINS = { prettier: true };
27
27
 
28
28
  const PLUGINS = {
29
- ...ADDITIONAL_PLUGINS,
29
+ ...DEFAULT_PLUGINS,
30
30
  ...OPTIONAL_PLUGINS,
31
31
  ...CODESTYLE_PLUGINS,
32
32
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexlit/config-stylelint",
3
- "version": "61.3.2",
3
+ "version": "61.4.1",
4
4
  "private": false,
5
5
  "description": "Stylelint config",
6
6
  "keywords": [
@@ -38,10 +38,10 @@
38
38
  "dependencies": {
39
39
  "@double-great/stylelint-a11y": "^3.5.4",
40
40
  "@morev/stylelint-plugin": "^0.7.0",
41
- "postcss": "^8.5.28",
41
+ "postcss": "^8.5.29",
42
42
  "postcss-html": "^2.0.0",
43
- "prettier": "^3.9.8",
44
- "stylelint": "17.15.0",
43
+ "prettier": "^3.9.9",
44
+ "stylelint": "17.16.0",
45
45
  "stylelint-config-html": "^2.0.0",
46
46
  "stylelint-config-recommended-vue": "^2.0.0",
47
47
  "stylelint-config-standard": "^40.0.0",
@@ -69,20 +69,12 @@ const formatColor = (hex, format) => {
69
69
  const { a, b, g, r } = hexToRgb(hex);
70
70
 
71
71
  if (format === 'rgb' || format === 'rgba') {
72
- if (a < 1) {
73
- return `rgba(${r}, ${g}, ${b}, ${a})`;
74
- }
75
-
76
- return `rgb(${r}, ${g}, ${b})`;
72
+ return a < 1 ? `rgba(${r}, ${g}, ${b}, ${a})` : `rgb(${r}, ${g}, ${b})`;
77
73
  }
78
74
 
79
75
  const { h, l, s } = rgbToHsl({ b, g, r });
80
76
 
81
- if (a < 1) {
82
- return `hsla(${h}, ${s}%, ${l}%, ${a})`;
83
- }
84
-
85
- return `hsl(${h}, ${s}%, ${l}%)`;
77
+ return a < 1 ? `hsla(${h}, ${s}%, ${l}%, ${a})` : `hsl(${h}, ${s}%, ${l}%)`;
86
78
  };
87
79
 
88
80
  const styleSearch = (source, target, callback) => {
@@ -176,6 +168,7 @@ const rule = function (actual, options, context) {
176
168
  rule.ruleName = ruleName;
177
169
  rule.messages = messages;
178
170
 
171
+ /** @type {import('stylelint').Config} */
179
172
  export default {
180
173
  plugins: [createPlugin(ruleName, rule)],
181
174
  rules: { 'color-format/format': { format: 'rgb' } },
package/plugins/scss.js CHANGED
@@ -79,7 +79,7 @@ export default {
79
79
  'scss/function-quote-no-quoted-strings-inside': true,
80
80
  'scss/function-unquote-no-unquoted-strings-inside': true,
81
81
  'scss/load-no-partial-leading-underscore': true,
82
- 'scss/load-partial-extension': 'always',
82
+ 'scss/load-partial-extension': 'never',
83
83
  'scss/map-keys-quotes': 'always',
84
84
  'scss/no-duplicate-dollar-variables': true,
85
85
  'scss/no-duplicate-mixins': true,