@alexlit/lint-kit 207.0.0 → 207.2.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexlit/config-eslint",
|
|
3
|
-
"version": "156.
|
|
3
|
+
"version": "156.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Sharable ESLint configuration",
|
|
6
6
|
"keywords": [
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
"@eslint/json": "^2.1.0",
|
|
44
44
|
"@intlify/eslint-plugin-vue-i18n": "^4.5.1",
|
|
45
45
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
46
|
-
"@tanstack/eslint-plugin-query": "^5.103.
|
|
46
|
+
"@tanstack/eslint-plugin-query": "^5.103.2",
|
|
47
47
|
"@unocss/eslint-config": "^66.10.5",
|
|
48
48
|
"@vitest/eslint-plugin": "^1.6.27",
|
|
49
49
|
"eslint": "^10.11.0",
|
|
50
50
|
"eslint-config-prettier": "^10.1.8",
|
|
51
|
-
"eslint-plugin-de-morgan": "^2.
|
|
51
|
+
"eslint-plugin-de-morgan": "^2.2.0",
|
|
52
52
|
"eslint-plugin-jsdoc": "^64.5.4",
|
|
53
|
-
"eslint-plugin-perfectionist": "^5.
|
|
53
|
+
"eslint-plugin-perfectionist": "^5.12.0",
|
|
54
54
|
"eslint-plugin-pinia": "^0.4.2",
|
|
55
55
|
"eslint-plugin-prettier": "^5.5.6",
|
|
56
56
|
"eslint-plugin-regexp": "^3.3.1",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"globals": "^17.12.0",
|
|
64
64
|
"jsonc-eslint-parser": "^3.3.0",
|
|
65
65
|
"typescript": "^6.0.3",
|
|
66
|
-
"typescript-eslint": "^8.70.
|
|
66
|
+
"typescript-eslint": "^8.70.1",
|
|
67
67
|
"yaml-eslint-parser": "^2.1.0"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable unicorn/no-null */
|
|
2
2
|
|
|
3
|
-
const
|
|
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
|
-
...
|
|
29
|
+
...DEFAULT_PLUGINS,
|
|
30
30
|
...OPTIONAL_PLUGINS,
|
|
31
31
|
...CODESTYLE_PLUGINS,
|
|
32
32
|
};
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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' } },
|