@tenphi/cookbook 0.12.0 → 0.13.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/README.md +18 -0
- package/dist/eslint-plugin.d.ts +3 -0
- package/dist/eslint-plugin.js +3 -0
- package/package.json +8 -3
- package/tasty.config.mjs +1 -0
package/README.md
CHANGED
|
@@ -25,3 +25,21 @@ named sub-elements. The `/styling` entry point also exports `tasty`, `useGlobalS
|
|
|
25
25
|
`resolveComponentStyles`, `mergeStyles`, and the `Styles` type. Cookbook extracts
|
|
26
26
|
the CSS automatically. See [Theme and components](https://cookbook.tenphi.me/theme-and-components/)
|
|
27
27
|
for a complete custom logo and site title example.
|
|
28
|
+
|
|
29
|
+
Lint these styles with the plugin and Cookbook validation preset from
|
|
30
|
+
`@tenphi/cookbook/eslint-plugin`:
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
// tasty.config.ts
|
|
34
|
+
export default {
|
|
35
|
+
extends: "@tenphi/cookbook",
|
|
36
|
+
tokens: ["$project-gap"], // Optional additions to the built-in theme names.
|
|
37
|
+
};
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The entry point exports the default Tasty ESLint plugin, `recommended` and `strict`
|
|
41
|
+
rule maps, and the upstream configuration types. The preset recognizes Cookbook's
|
|
42
|
+
theme names and custom styling helpers, including `defineComponent`. `extends`
|
|
43
|
+
merges your additional tokens, states, and presets with these built-ins.
|
|
44
|
+
See [Linting custom styles](https://cookbook.tenphi.me/theme-and-components/#linting-custom-styles)
|
|
45
|
+
for ESLint and oxlint configuration examples.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
|
|
2
|
+
import eslint_plugin_default, { ResolvedConfig, StyleFunctionConfig, TastyValidationConfig, recommended, strict, validationConfig } from "@tenphi/starlight/eslint-plugin";
|
|
3
|
+
export { type ResolvedConfig, type StyleFunctionConfig, type TastyValidationConfig, eslint_plugin_default as default, recommended, strict, validationConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tenphi/cookbook",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Repository-native static documentation for Astro",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -25,10 +25,15 @@
|
|
|
25
25
|
"./styling": {
|
|
26
26
|
"types": "./dist/styling.d.ts",
|
|
27
27
|
"import": "./dist/styling.js"
|
|
28
|
+
},
|
|
29
|
+
"./eslint-plugin": {
|
|
30
|
+
"types": "./dist/eslint-plugin.d.ts",
|
|
31
|
+
"import": "./dist/eslint-plugin.js"
|
|
28
32
|
}
|
|
29
33
|
},
|
|
30
34
|
"files": [
|
|
31
35
|
"dist",
|
|
36
|
+
"tasty.config.mjs",
|
|
32
37
|
"README.md",
|
|
33
38
|
"LICENSE"
|
|
34
39
|
],
|
|
@@ -50,8 +55,8 @@
|
|
|
50
55
|
"author": "Andrey Yamanov",
|
|
51
56
|
"license": "MIT",
|
|
52
57
|
"dependencies": {
|
|
53
|
-
"@tenphi/docs": "0.
|
|
54
|
-
"@tenphi/starlight": "0.
|
|
58
|
+
"@tenphi/docs": "0.13.0",
|
|
59
|
+
"@tenphi/starlight": "0.13.0",
|
|
55
60
|
"jiti": "^2.6.1"
|
|
56
61
|
},
|
|
57
62
|
"peerDependencies": {
|
package/tasty.config.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { validationConfig as default } from "./dist/eslint-plugin.js";
|