Skip to content

Commit 2a61cf6

Browse files
committed
Add no-hardcoded-color rule to recommended config
1 parent df064e6 commit 2a61cf6

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

.changeset/mean-birds-kick.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@pandacss/eslint-plugin": patch
3+
---
4+
5+
Add `no-hardcoded-color` rule to recommended config

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ or `all` it is indicated below.
8585
| [`@pandacss/no-debug`](docs/rules/no-debug.md) | ✔️ |
8686
| [`@pandacss/no-dynamic-styling`](docs/rules/no-dynamic-styling.md) | ✔️ |
8787
| [`@pandacss/no-escape-hatch`](docs/rules/no-escape-hatch.md) | |
88-
| [`@pandacss/no-hardcoded-color`](docs/rules/no-hardcoded-color.md) ⚙️ | |
88+
| [`@pandacss/no-hardcoded-color`](docs/rules/no-hardcoded-color.md) ⚙️ | ✔️ |
8989
| [`@pandacss/no-important`](docs/rules/no-important.md) | |
9090
| [`@pandacss/no-invalid-token-paths`](docs/rules/no-invalid-token-paths.md) | ✔️ |
9191
| [`@pandacss/no-invalid-nesting`](docs/rules/no-invalid-nesting.md) | ✔️ |

docs/rules/no-hardcoded-color.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Enforce the exclusive use of design tokens as values for colors within the codeb
66

77
📋 This rule is enabled in `plugin:@pandacss/all`.
88

9+
📋 This rule is enabled in `plugin:@pandacss/recommended`.
10+
911
## Rule details
1012

1113
❌ Examples of **incorrect** code:

plugin/src/configs/recommended.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export default {
77
'@pandacss/no-config-function-in-source': 'error',
88
'@pandacss/no-debug': 'warn',
99
'@pandacss/no-dynamic-styling': 'warn',
10+
'@pandacss/no-hardcoded-color': 'warn',
1011
'@pandacss/no-invalid-nesting': 'error',
1112
'@pandacss/no-invalid-token-paths': 'error',
1213
'@pandacss/no-property-renaming': 'warn',

0 commit comments

Comments
 (0)