An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

        

# unocss-preset-block [![npm](https://img.shields.io/npm/v/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)