https://github.com/unocss-community/unocss-preset-block
Disable non-standard unocss class names
https://github.com/unocss-community/unocss-preset-block
unocss-community
Last synced: about 2 months ago
JSON representation
Disable non-standard unocss class names
- Host: GitHub
- URL: https://github.com/unocss-community/unocss-preset-block
- Owner: unocss-community
- License: mit
- Created: 2023-11-21T02:29:12.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-15T09:12:56.000Z (4 months ago)
- Last Synced: 2025-02-17T11:03:33.385Z (3 months ago)
- Topics: unocss-community
- Language: TypeScript
- Homepage:
- Size: 452 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-unocss - unocss-preset-block - Block some non-standard classnames by [@chizuki](https://github.com/chizukicn). (Community / Presets)
README
# unocss-preset-block [](https://npmjs.com/package/unocss-preset-block)
UnoCSS Preset Block.
## Features
- 🔥 Disable non-standard unocss class names## Usage
```shell
pnpm i -D unocss-preset-block unocss
``````ts
// uno.config.ts
import { defineConfig } from "unocss";
import { presetBlock } from "unocss-preset-block";export default defineConfig({
presets: [
// ...
presetBlock(),
],
});
```## Rules
Disable px/rem unit
```html......
```
Disable magic-number
```html......
```
Disable consecutive dashes
```html......
```## Lint
Recommended to work with [@unocss/eslint-plugin](https://github.com/unocss/unocss/tree/main/packages/eslint-plugin)```js
// .eslintrc.js
module.exports = {
plugins: [
// ...
"@unocss",
],
rules: {
// ...
"@unocss/blocklist": ["error"]
},
};
```## License
[MIT](./LICENSE) License © 2023 [Chizuki](https://github.com/chizukicn)