@tenphi/eslint-plugin-tasty 0.1.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.
Files changed (79) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +117 -0
  3. package/dist/_virtual/_rolldown/runtime.mjs +7 -0
  4. package/dist/config.mjs +118 -0
  5. package/dist/config.mjs.map +1 -0
  6. package/dist/configs.d.mts +8 -0
  7. package/dist/configs.mjs +36 -0
  8. package/dist/configs.mjs.map +1 -0
  9. package/dist/constants.mjs +700 -0
  10. package/dist/constants.mjs.map +1 -0
  11. package/dist/context.mjs +180 -0
  12. package/dist/context.mjs.map +1 -0
  13. package/dist/create-rule.mjs +8 -0
  14. package/dist/create-rule.mjs.map +1 -0
  15. package/dist/index.d.mts +8 -0
  16. package/dist/index.mjs +83 -0
  17. package/dist/index.mjs.map +1 -0
  18. package/dist/parser.mjs +46 -0
  19. package/dist/parser.mjs.map +1 -0
  20. package/dist/property-expectations.mjs +168 -0
  21. package/dist/property-expectations.mjs.map +1 -0
  22. package/dist/rules/consistent-token-usage.mjs +88 -0
  23. package/dist/rules/consistent-token-usage.mjs.map +1 -0
  24. package/dist/rules/known-property.mjs +55 -0
  25. package/dist/rules/known-property.mjs.map +1 -0
  26. package/dist/rules/no-duplicate-state.mjs +51 -0
  27. package/dist/rules/no-duplicate-state.mjs.map +1 -0
  28. package/dist/rules/no-important.mjs +44 -0
  29. package/dist/rules/no-important.mjs.map +1 -0
  30. package/dist/rules/no-nested-selector.mjs +40 -0
  31. package/dist/rules/no-nested-selector.mjs.map +1 -0
  32. package/dist/rules/no-nested-state-map.mjs +44 -0
  33. package/dist/rules/no-nested-state-map.mjs.map +1 -0
  34. package/dist/rules/no-raw-color-values.mjs +84 -0
  35. package/dist/rules/no-raw-color-values.mjs.map +1 -0
  36. package/dist/rules/no-runtime-styles-mutation.mjs +52 -0
  37. package/dist/rules/no-runtime-styles-mutation.mjs.map +1 -0
  38. package/dist/rules/no-styles-prop.mjs +25 -0
  39. package/dist/rules/no-styles-prop.mjs.map +1 -0
  40. package/dist/rules/no-unknown-state-alias.mjs +49 -0
  41. package/dist/rules/no-unknown-state-alias.mjs.map +1 -0
  42. package/dist/rules/prefer-shorthand-property.mjs +45 -0
  43. package/dist/rules/prefer-shorthand-property.mjs.map +1 -0
  44. package/dist/rules/require-default-state.mjs +47 -0
  45. package/dist/rules/require-default-state.mjs.map +1 -0
  46. package/dist/rules/static-no-dynamic-values.mjs +54 -0
  47. package/dist/rules/static-no-dynamic-values.mjs.map +1 -0
  48. package/dist/rules/static-valid-selector.mjs +51 -0
  49. package/dist/rules/static-valid-selector.mjs.map +1 -0
  50. package/dist/rules/valid-boolean-property.mjs +45 -0
  51. package/dist/rules/valid-boolean-property.mjs.map +1 -0
  52. package/dist/rules/valid-color-token.mjs +84 -0
  53. package/dist/rules/valid-color-token.mjs.map +1 -0
  54. package/dist/rules/valid-custom-property.mjs +69 -0
  55. package/dist/rules/valid-custom-property.mjs.map +1 -0
  56. package/dist/rules/valid-custom-unit.mjs +62 -0
  57. package/dist/rules/valid-custom-unit.mjs.map +1 -0
  58. package/dist/rules/valid-directional-modifier.mjs +71 -0
  59. package/dist/rules/valid-directional-modifier.mjs.map +1 -0
  60. package/dist/rules/valid-preset.mjs +64 -0
  61. package/dist/rules/valid-preset.mjs.map +1 -0
  62. package/dist/rules/valid-radius-shape.mjs +77 -0
  63. package/dist/rules/valid-radius-shape.mjs.map +1 -0
  64. package/dist/rules/valid-recipe.mjs +51 -0
  65. package/dist/rules/valid-recipe.mjs.map +1 -0
  66. package/dist/rules/valid-state-key.mjs +71 -0
  67. package/dist/rules/valid-state-key.mjs.map +1 -0
  68. package/dist/rules/valid-styles-structure.mjs +79 -0
  69. package/dist/rules/valid-styles-structure.mjs.map +1 -0
  70. package/dist/rules/valid-sub-element.mjs +46 -0
  71. package/dist/rules/valid-sub-element.mjs.map +1 -0
  72. package/dist/rules/valid-transition.mjs +62 -0
  73. package/dist/rules/valid-transition.mjs.map +1 -0
  74. package/dist/rules/valid-value.mjs +123 -0
  75. package/dist/rules/valid-value.mjs.map +1 -0
  76. package/dist/types.d.mts +25 -0
  77. package/dist/utils.mjs +152 -0
  78. package/dist/utils.mjs.map +1 -0
  79. package/package.json +90 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Andrey Yamanov
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,117 @@
1
+ # @tenphi/eslint-plugin-tasty
2
+
3
+ ESLint plugin for validating `tasty()`, `tastyStatic()`, `useStyles()`, `useGlobalStyles()`, and related APIs from `@tenphi/tasty`.
4
+
5
+ Catch typos, invalid syntax, and enforce best practices in your tasty style objects at lint time.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ pnpm add -D @tenphi/eslint-plugin-tasty
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ### ESLint Flat Config (ESLint 9+)
16
+
17
+ ```js
18
+ // eslint.config.js
19
+ import tasty from '@tenphi/eslint-plugin-tasty';
20
+
21
+ export default [
22
+ tasty.configs.recommended,
23
+ // your other configs...
24
+ ];
25
+ ```
26
+
27
+ For stricter checks:
28
+
29
+ ```js
30
+ import tasty from '@tenphi/eslint-plugin-tasty';
31
+
32
+ export default [
33
+ tasty.configs.strict,
34
+ ];
35
+ ```
36
+
37
+ ### Manual Rule Configuration
38
+
39
+ ```js
40
+ import tasty from '@tenphi/eslint-plugin-tasty';
41
+
42
+ export default [
43
+ {
44
+ plugins: { tasty },
45
+ rules: {
46
+ 'tasty/known-property': 'warn',
47
+ 'tasty/valid-value': 'error',
48
+ 'tasty/valid-color-token': 'error',
49
+ // ...
50
+ },
51
+ },
52
+ ];
53
+ ```
54
+
55
+ ## Project Configuration
56
+
57
+ Create a `tasty.config.ts` (or `.js`, `.json`) at your project root to configure validation:
58
+
59
+ ```ts
60
+ // tasty.config.ts
61
+ export default {
62
+ tokens: ['#primary', '#danger', '#surface', '$spacing', '$gap'],
63
+ units: ['cols'],
64
+ states: ['@mobile', '@tablet', '@dark'],
65
+ presets: ['h1', 'h2', 'h3', 't1', 't2', 't3'],
66
+ recipes: ['card', 'elevated', 'reset'],
67
+ importSources: ['@my-org/design-system'],
68
+ };
69
+ ```
70
+
71
+ ## Rules
72
+
73
+ ### Recommended
74
+
75
+ | Rule | Severity | Description |
76
+ |------|----------|-------------|
77
+ | `tasty/known-property` | warn | Unknown style property names |
78
+ | `tasty/valid-value` | error | Malformed style values (unbalanced parens, !important) |
79
+ | `tasty/valid-color-token` | error | Invalid color token syntax or unknown tokens |
80
+ | `tasty/valid-custom-unit` | error | Unknown custom units |
81
+ | `tasty/valid-boolean-property` | error | `true` on properties that don't support it |
82
+ | `tasty/valid-state-key` | error | Invalid state key syntax in style mappings |
83
+ | `tasty/valid-styles-structure` | error | Invalid styles object structure |
84
+ | `tasty/no-nested-state-map` | error | Nested state maps (not supported) |
85
+ | `tasty/no-important` | error | `!important` usage (breaks tasty specificity) |
86
+ | `tasty/valid-sub-element` | error | Sub-element values must be style objects |
87
+ | `tasty/valid-directional-modifier` | error | Directional modifiers on wrong properties |
88
+ | `tasty/valid-radius-shape` | error | Unknown radius shape keywords |
89
+ | `tasty/no-nested-selector` | warn | `&`-prefixed nested selectors (use sub-elements) |
90
+ | `tasty/static-no-dynamic-values` | error | Dynamic values in `tastyStatic()` |
91
+ | `tasty/static-valid-selector` | error | Invalid selector in `tastyStatic(selector, ...)` |
92
+
93
+ ### Strict (includes all recommended rules)
94
+
95
+ | Rule | Severity | Description |
96
+ |------|----------|-------------|
97
+ | `tasty/prefer-shorthand-property` | warn | Use tasty shorthand over native CSS |
98
+ | `tasty/valid-preset` | error | Unknown preset names |
99
+ | `tasty/valid-recipe` | error | Unknown recipe names |
100
+ | `tasty/valid-transition` | warn | Unknown transition names |
101
+ | `tasty/valid-custom-property` | warn | Unknown `$name` custom properties |
102
+ | `tasty/no-unknown-state-alias` | warn | Unknown `@name` state aliases |
103
+ | `tasty/no-duplicate-state` | warn | Duplicate state keys in mappings |
104
+ | `tasty/no-styles-prop` | warn | Direct `styles` prop usage |
105
+ | `tasty/no-raw-color-values` | warn | Raw hex/rgb instead of tokens |
106
+ | `tasty/consistent-token-usage` | warn | Raw px values when tokens exist |
107
+ | `tasty/no-runtime-styles-mutation` | warn | Dynamic values in style objects |
108
+
109
+ ### Off by Default
110
+
111
+ | Rule | Description |
112
+ |------|-------------|
113
+ | `tasty/require-default-state` | Missing `''` key in state mappings |
114
+
115
+ ## License
116
+
117
+ MIT
@@ -0,0 +1,7 @@
1
+ import { createRequire } from "node:module";
2
+
3
+ //#region \0rolldown/runtime.js
4
+ var __require = /* @__PURE__ */ createRequire(import.meta.url);
5
+
6
+ //#endregion
7
+ export { __require };
@@ -0,0 +1,118 @@
1
+ import { __require } from "./_virtual/_rolldown/runtime.mjs";
2
+ import { DEFAULT_IMPORT_SOURCES } from "./constants.mjs";
3
+ import { existsSync, readFileSync, statSync } from "fs";
4
+ import { dirname, join, resolve } from "path";
5
+
6
+ //#region src/config.ts
7
+ const CONFIG_FILENAMES = [
8
+ "tasty.config.ts",
9
+ "tasty.config.js",
10
+ "tasty.config.mjs",
11
+ "tasty.config.json"
12
+ ];
13
+ let cachedConfig = null;
14
+ function findProjectRoot(startDir) {
15
+ let dir = startDir;
16
+ while (dir !== dirname(dir)) {
17
+ if (existsSync(join(dir, "package.json"))) return dir;
18
+ dir = dirname(dir);
19
+ }
20
+ return null;
21
+ }
22
+ function findConfigFile(projectRoot) {
23
+ for (const name of CONFIG_FILENAMES) {
24
+ const path = join(projectRoot, name);
25
+ if (existsSync(path)) return path;
26
+ }
27
+ return null;
28
+ }
29
+ function loadRawConfig(configPath) {
30
+ const content = readFileSync(configPath, "utf-8");
31
+ if (configPath.endsWith(".json")) return JSON.parse(content);
32
+ const jsonMatch = content.match(/export\s+default\s+({[\s\S]*?})\s*(?:;|\n|$)/);
33
+ if (jsonMatch) try {
34
+ return new Function(`return (${jsonMatch[1]})`)();
35
+ } catch {}
36
+ return {};
37
+ }
38
+ function mergeConfigs(parent, child) {
39
+ const result = { ...parent };
40
+ for (const key of [
41
+ "tokens",
42
+ "units",
43
+ "funcs",
44
+ "states",
45
+ "presets",
46
+ "recipes",
47
+ "styles",
48
+ "importSources"
49
+ ]) {
50
+ const childVal = child[key];
51
+ if (childVal === void 0) continue;
52
+ if (childVal === false) {
53
+ result[key] = false;
54
+ continue;
55
+ }
56
+ const parentVal = parent[key];
57
+ if (Array.isArray(parentVal) && Array.isArray(childVal)) result[key] = [...new Set([...parentVal, ...childVal])];
58
+ else result[key] = childVal;
59
+ }
60
+ return result;
61
+ }
62
+ function resolveConfigChain(configPath, visited = /* @__PURE__ */ new Set()) {
63
+ const absPath = resolve(configPath);
64
+ if (visited.has(absPath)) return {};
65
+ visited.add(absPath);
66
+ const config = loadRawConfig(absPath);
67
+ if (!config.extends) return config;
68
+ let parentPath;
69
+ if (config.extends.startsWith(".") || config.extends.startsWith("/")) parentPath = resolve(dirname(absPath), config.extends);
70
+ else try {
71
+ parentPath = __require.resolve(config.extends);
72
+ } catch {
73
+ return config;
74
+ }
75
+ return mergeConfigs(resolveConfigChain(parentPath, visited), config);
76
+ }
77
+ function toResolved(config) {
78
+ return {
79
+ tokens: config.tokens ?? [],
80
+ units: config.units ?? [],
81
+ funcs: config.funcs ?? [],
82
+ states: config.states ?? [],
83
+ presets: config.presets ?? [],
84
+ recipes: config.recipes ?? [],
85
+ styles: config.styles ?? [],
86
+ importSources: config.importSources ?? DEFAULT_IMPORT_SOURCES
87
+ };
88
+ }
89
+ const DEFAULT_CONFIG = {
90
+ tokens: [],
91
+ units: [],
92
+ funcs: [],
93
+ states: [],
94
+ presets: [],
95
+ recipes: [],
96
+ styles: [],
97
+ importSources: DEFAULT_IMPORT_SOURCES
98
+ };
99
+ function loadConfig(filePath) {
100
+ const projectRoot = findProjectRoot(dirname(resolve(filePath)));
101
+ if (!projectRoot) return DEFAULT_CONFIG;
102
+ const configFile = findConfigFile(projectRoot);
103
+ if (!configFile) return DEFAULT_CONFIG;
104
+ const currentMtime = statSync(configFile).mtimeMs;
105
+ if (cachedConfig) {
106
+ if (cachedConfig.mtimes.get(configFile) === currentMtime) return cachedConfig.config;
107
+ }
108
+ const resolved = toResolved(resolveConfigChain(configFile));
109
+ cachedConfig = {
110
+ config: resolved,
111
+ mtimes: new Map([[configFile, currentMtime]])
112
+ };
113
+ return resolved;
114
+ }
115
+
116
+ //#endregion
117
+ export { loadConfig };
118
+ //# sourceMappingURL=config.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.mjs","names":[],"sources":["../src/config.ts"],"sourcesContent":["import { existsSync, readFileSync, statSync } from 'fs';\nimport { dirname, join, resolve } from 'path';\nimport type { ResolvedConfig, TastyValidationConfig } from './types.js';\nimport { DEFAULT_IMPORT_SOURCES } from './constants.js';\n\nconst CONFIG_FILENAMES = [\n 'tasty.config.ts',\n 'tasty.config.js',\n 'tasty.config.mjs',\n 'tasty.config.json',\n];\n\ninterface CachedConfig {\n config: ResolvedConfig;\n mtimes: Map<string, number>;\n}\n\nlet cachedConfig: CachedConfig | null = null;\n\nfunction findProjectRoot(startDir: string): string | null {\n let dir = startDir;\n while (dir !== dirname(dir)) {\n if (existsSync(join(dir, 'package.json'))) {\n return dir;\n }\n dir = dirname(dir);\n }\n return null;\n}\n\nfunction findConfigFile(projectRoot: string): string | null {\n for (const name of CONFIG_FILENAMES) {\n const path = join(projectRoot, name);\n if (existsSync(path)) {\n return path;\n }\n }\n return null;\n}\n\nfunction loadRawConfig(configPath: string): TastyValidationConfig {\n const content = readFileSync(configPath, 'utf-8');\n\n if (configPath.endsWith('.json')) {\n return JSON.parse(content) as TastyValidationConfig;\n }\n\n // For TS/JS files, extract JSON-like config or use a simple parser.\n // In a real implementation, we'd use jiti or tsx to load TS configs.\n // For now, attempt JSON parse of the default export pattern.\n const jsonMatch = content.match(\n /export\\s+default\\s+({[\\s\\S]*?})\\s*(?:;|\\n|$)/,\n );\n if (jsonMatch) {\n try {\n const fn = new Function(`return (${jsonMatch[1]})`);\n return fn() as TastyValidationConfig;\n } catch {\n // fall through\n }\n }\n\n return {};\n}\n\nfunction mergeConfigs(\n parent: TastyValidationConfig,\n child: TastyValidationConfig,\n): TastyValidationConfig {\n const result: TastyValidationConfig = { ...parent };\n\n const arrayKeys = [\n 'tokens',\n 'units',\n 'funcs',\n 'states',\n 'presets',\n 'recipes',\n 'styles',\n 'importSources',\n ] as const;\n\n for (const key of arrayKeys) {\n const childVal = child[key];\n if (childVal === undefined) continue;\n\n if (childVal === false) {\n (result as Record<string, unknown>)[key] = false;\n continue;\n }\n\n const parentVal = parent[key];\n if (Array.isArray(parentVal) && Array.isArray(childVal)) {\n (result as Record<string, unknown>)[key] = [\n ...new Set([...parentVal, ...childVal]),\n ];\n } else {\n (result as Record<string, unknown>)[key] = childVal;\n }\n }\n\n return result;\n}\n\nfunction resolveConfigChain(\n configPath: string,\n visited = new Set<string>(),\n): TastyValidationConfig {\n const absPath = resolve(configPath);\n if (visited.has(absPath)) return {};\n visited.add(absPath);\n\n const config = loadRawConfig(absPath);\n\n if (!config.extends) return config;\n\n let parentPath: string;\n if (config.extends.startsWith('.') || config.extends.startsWith('/')) {\n parentPath = resolve(dirname(absPath), config.extends);\n } else {\n try {\n parentPath = require.resolve(config.extends);\n } catch {\n return config;\n }\n }\n\n const parentConfig = resolveConfigChain(parentPath, visited);\n return mergeConfigs(parentConfig, config);\n}\n\nfunction toResolved(config: TastyValidationConfig): ResolvedConfig {\n return {\n tokens: config.tokens ?? [],\n units: config.units ?? [],\n funcs: config.funcs ?? [],\n states: config.states ?? [],\n presets: config.presets ?? [],\n recipes: config.recipes ?? [],\n styles: config.styles ?? [],\n importSources: config.importSources ?? DEFAULT_IMPORT_SOURCES,\n };\n}\n\nconst DEFAULT_CONFIG: ResolvedConfig = {\n tokens: [],\n units: [],\n funcs: [],\n states: [],\n presets: [],\n recipes: [],\n styles: [],\n importSources: DEFAULT_IMPORT_SOURCES,\n};\n\nexport function loadConfig(filePath: string): ResolvedConfig {\n const projectRoot = findProjectRoot(dirname(resolve(filePath)));\n if (!projectRoot) return DEFAULT_CONFIG;\n\n const configFile = findConfigFile(projectRoot);\n if (!configFile) return DEFAULT_CONFIG;\n\n const currentMtime = statSync(configFile).mtimeMs;\n\n if (cachedConfig) {\n const cachedMtime = cachedConfig.mtimes.get(configFile);\n if (cachedMtime === currentMtime) {\n return cachedConfig.config;\n }\n }\n\n const rawConfig = resolveConfigChain(configFile);\n const resolved = toResolved(rawConfig);\n\n cachedConfig = {\n config: resolved,\n mtimes: new Map([[configFile, currentMtime]]),\n };\n\n return resolved;\n}\n"],"mappings":";;;;;;AAKA,MAAM,mBAAmB;CACvB;CACA;CACA;CACA;CACD;AAOD,IAAI,eAAoC;AAExC,SAAS,gBAAgB,UAAiC;CACxD,IAAI,MAAM;AACV,QAAO,QAAQ,QAAQ,IAAI,EAA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strict: TSESLint.SharedConfig.RulesRecord;
6
+ //#endregion
7
+ export { recommended, strict };
8
+ //# sourceMappingURL=configs.d.mts.map
@@ -0,0 +1,36 @@
1
+ //#region src/configs.ts
2
+ const recommended = {
3
+ "tasty/known-property": "warn",
4
+ "tasty/valid-value": "error",
5
+ "tasty/valid-color-token": "error",
6
+ "tasty/valid-custom-unit": "error",
7
+ "tasty/valid-boolean-property": "error",
8
+ "tasty/valid-state-key": "error",
9
+ "tasty/valid-styles-structure": "error",
10
+ "tasty/no-nested-state-map": "error",
11
+ "tasty/no-important": "error",
12
+ "tasty/valid-sub-element": "error",
13
+ "tasty/valid-directional-modifier": "error",
14
+ "tasty/valid-radius-shape": "error",
15
+ "tasty/no-nested-selector": "warn",
16
+ "tasty/static-no-dynamic-values": "error",
17
+ "tasty/static-valid-selector": "error"
18
+ };
19
+ const strict = {
20
+ ...recommended,
21
+ "tasty/prefer-shorthand-property": "warn",
22
+ "tasty/valid-preset": "error",
23
+ "tasty/valid-recipe": "error",
24
+ "tasty/valid-transition": "warn",
25
+ "tasty/valid-custom-property": "warn",
26
+ "tasty/no-unknown-state-alias": "warn",
27
+ "tasty/no-duplicate-state": "warn",
28
+ "tasty/no-styles-prop": "warn",
29
+ "tasty/no-raw-color-values": "warn",
30
+ "tasty/consistent-token-usage": "warn",
31
+ "tasty/no-runtime-styles-mutation": "warn"
32
+ };
33
+
34
+ //#endregion
35
+ export { recommended, strict };
36
+ //# sourceMappingURL=configs.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configs.mjs","names":[],"sources":["../src/configs.ts"],"sourcesContent":["import type { TSESLint } from '@typescript-eslint/utils';\n\nexport const recommended: TSESLint.SharedConfig.RulesRecord = {\n 'tasty/known-property': 'warn',\n 'tasty/valid-value': 'error',\n 'tasty/valid-color-token': 'error',\n 'tasty/valid-custom-unit': 'error',\n 'tasty/valid-boolean-property': 'error',\n 'tasty/valid-state-key': 'error',\n 'tasty/valid-styles-structure': 'error',\n 'tasty/no-nested-state-map': 'error',\n 'tasty/no-important': 'error',\n 'tasty/valid-sub-element': 'error',\n 'tasty/valid-directional-modifier': 'error',\n 'tasty/valid-radius-shape': 'error',\n 'tasty/no-nested-selector': 'warn',\n 'tasty/static-no-dynamic-values': 'error',\n 'tasty/static-valid-selector': 'error',\n};\n\nexport const strict: TSESLint.SharedConfig.RulesRecord = {\n ...recommended,\n 'tasty/prefer-shorthand-property': 'warn',\n 'tasty/valid-preset': 'error',\n 'tasty/valid-recipe': 'error',\n 'tasty/valid-transition': 'warn',\n 'tasty/valid-custom-property': 'warn',\n 'tasty/no-unknown-state-alias': 'warn',\n 'tasty/no-duplicate-state': 'warn',\n 'tasty/no-styles-prop': 'warn',\n 'tasty/no-raw-color-values': 'warn',\n 'tasty/consistent-token-usage': 'warn',\n 'tasty/no-runtime-styles-mutation': 'warn',\n};\n"],"mappings":";AAEA,MAAa,cAAiD;CAC5D,wBAAwB;CACxB,qBAAqB;CACrB,2BAA2B;CAC3B,2BAA2B;CAC3B,gCAAgC;CAChC,yBAAyB;CACzB,gCAAgC;CAChC,6BAA6B;CAC7B,sBAAsB;CACtB,2BAA2B;CAC3B,oCAAoC;CACpC,4BAA4B;CAC5B,4BAA4B;CAC5B,kCAAkC;CAClC,+BAA+B;CAChC;AAED,MAAa,SAA4C;CACvD,GAAG;CACH,mCAAmC;CACnC,sBAAsB;CACtB,sBAAsB;CACtB,0BAA0B;CAC1B,+BAA+B;CAC/B,gCAAgC;CAChC,4BAA4B;CAC5B,wBAAwB;CACxB,6BAA6B;CAC7B,gCAAgC;CAChC,oCAAoC;CACrC"}