🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@yummacss/canon

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yummacss/canon - npm Package Compare versions

Comparing version
3.28.2
to
3.28.3
+2
-2
package.json
{
"name": "@yummacss/canon",
"version": "3.28.2",
"version": "3.28.3",
"description": "Class validator for Yumma CSS",

@@ -39,3 +39,3 @@ "keywords": [

"tinyglobby": "^0.2.15",
"@yummacss/nitro": "3.28.2"
"@yummacss/nitro": "3.28.3"
},

@@ -42,0 +42,0 @@ "publishConfig": {

# @yummacss/canon
Class validator for [Yumma CSS](https://yummacss.com). Scans your source files & reports every class that is not part of the Yumma CSS canon - Tailwind habits, typos, & AI hallucinations like `gap-4` instead of `g-4`.
Class validator for [Yumma CSS](https://yummacss.com). Reports every class that is not part of the Yumma CSS canon.
If it's not canon, it doesn't ship.
Validity is checked against the Yumma CSS generator itself, so a class is canon exactly when it produces CSS. Variants (`@sm:`, `h:`), opacity (`/50`), negative values (`m--4`), custom theme colors, prefixes, & safelist entries are all understood.
## Installation

@@ -17,4 +13,2 @@

Run it in any project with a `yumma.config.mjs`:
```bash

@@ -24,17 +18,6 @@ npx @yummacss/canon

```
Scanned 42 files and found 128 unique classes.
Found 2 classes Yumma CSS does not recognize:
"gap-4"
- src/components/hero.tsx
"items-center"
- src/components/hero.tsx
```
Validates against the Yumma CSS generator itself. Variants, opacity, negative values, custom theme colors, prefixes, and safelist entries are all understood.
Exits with code `1` when unknown classes are found - wire it into CI or let your AI agent run it as a feedback loop.
Skip custom classes with `--allow`:
### Allow custom classes
Classes you define in your own CSS are not known to Yumma CSS. Skip them with `--allow`:
```bash

@@ -44,11 +27,4 @@ npx @yummacss/canon --allow "docs-container,brand-logo"

### Options
## API
| Flag | Description |
| ---------------- | ----------------------------------------------- |
| `--allow`, `-a` | Comma-separated class names to skip. |
| `--config`, `-c` | Path to the config file. |
## Programmatic API
```js

@@ -58,6 +34,6 @@ import { validate } from "@yummacss/canon";

const result = await validate({ allowlist: ["docs-container"] });
```
for (const { className, files } of result.invalid) {
console.log(className, files);
}
```
## Documentation
Learn more at [yummacss.com](https://yummacss.com)