Skip to content

Commit f993dc8

Browse files
docs: 📜 readme updates and description in deno.json
1 parent 76592dd commit f993dc8

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
[![JSR](https://jsr.io/badges/@intility/no-inline-styles)](https://jsr.io/@intility/no-inline-styles)
2+
13
# @intility/no-inline-styles
24

35
A Deno lint plugin that prevents inline styles in JSX/TSX components. This helps maintain a consistent styling approach by encouraging the use of CSS classes instead of inline styles.
46

57
## Installation
68

9+
Add the plugin to your `deno.json`:
10+
711
```json
812
{
913
"lint": {
@@ -17,6 +21,8 @@ A Deno lint plugin that prevents inline styles in JSX/TSX components. This helps
1721

1822
## Usage
1923

24+
Once configured, the plugin will flag any inline styles:
25+
2026
```tsx
2127
// ❌ Error
2228
<div style={{ color: 'red' }}>Content</div>
@@ -27,7 +33,9 @@ A Deno lint plugin that prevents inline styles in JSX/TSX components. This helps
2733

2834
## Ignoring Specific Cases
2935

36+
If you have legitimate use cases for inline styles, you can ignore specific lines:
37+
3038
```tsx
3139
// deno-lint-ignore no-inline-styles/no-inline-styles
3240
<div style={{ backgroundColor: dynamicColor }}>Content</div>
33-
```
41+
```

deno.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "@intility/no-inline-styles",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
4+
"description": "Deno lint plugin to prevent inline styles in JSX/TSX. Enforces consistent styling through CSS classes instead of style props.",
45
"license": "MIT",
56
"exports": "./plugin.ts",
67
"tasks": {

plugin.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@
3838
*
3939
* ## Ignoring Specific Cases
4040
*
41-
* If you have legitimate use cases for inline styles (e.g., dynamic colors from data),
42-
* you can ignore specific lines:
41+
* If you have legitimate use cases for inline styles, you can ignore specific lines:
4342
*
4443
* ```tsx
4544
* // deno-lint-ignore no-inline-styles/no-inline-styles

0 commit comments

Comments
 (0)