Skip to content

Commit a43bf98

Browse files
committed
chore: update docs
1 parent 54f309e commit a43bf98

File tree

4 files changed

+111
-1
lines changed

4 files changed

+111
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ Where rules are included in the configs `recommended`, or `all` it is indicated
8989
- [`@pandacss/prefer-shorthand-properties`](docs/rules/prefer-shorthand-properties.md) `all`
9090
- [`@pandacss/no-unsafe-token-fn-usage`](docs/rules/no-unsafe-token-fn-usage.md) `all`
9191
- [`@pandacss/prefer-atomic-properties`](docs/rules/prefer-atomic-properties.md) `all`
92+
- [`@pandacss/prefer-composite-properties`](docs/rules/prefer-composite-properties.md) `all`
93+
- [`@pandacss/prefer-unified-property-style`](docs/rules/prefer-unified-property-style.md) `all`, `recommended`
9294

9395
## Settings
9496

docs/rules/prefer-atomic-properties.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# prefer-atomic-properties
44

5-
Encourage the use of atomic properties instead of composite shorthand properties in the codebase.
5+
Encourage the use of atomic properties instead of composite properties in the codebase.
66

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

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
[//]: # (This file is generated by eslint-docgen. Do not edit it directly.)
2+
3+
# prefer-composite-properties
4+
5+
Encourage the use of composite properties instead of atomic properties in the codebase.
6+
7+
📋 This rule is enabled in `plugin:@pandacss/all`.
8+
9+
## Rule details
10+
11+
❌ Examples of **incorrect** code:
12+
```js
13+
import { css } from './panda/css';
14+
15+
const styles = css({ rowGap: '4', columnGap: '4' });
16+
```
17+
```js
18+
19+
import { css } from './panda/css';
20+
21+
function App(){
22+
return <div className={css({ bgColor: 'red.100' })} />;
23+
};
24+
```
25+
```js
26+
27+
import { Circle } from './panda/jsx';
28+
29+
function App(){
30+
return <Circle _hover={{ borderTopStyle: 'solid', borderTopWidth: '1px', borderTopColor: 'blue' }} />;
31+
}
32+
```
33+
34+
✔️ Examples of **correct** code:
35+
```js
36+
import { css } from './panda/css';
37+
38+
const styles = css({ gap: '4' });
39+
```
40+
```js
41+
42+
import { css } from './panda/css';
43+
44+
function App(){
45+
return <div className={css({ background: 'red.100' })} />;
46+
};
47+
```
48+
```js
49+
50+
import { Circle } from './panda/jsx';
51+
52+
function App(){
53+
return <Circle _hover={{ borderTop: 'solid 1px blue' }} />;
54+
}
55+
```
56+
57+
## Resources
58+
59+
* [Rule source](/plugin/src/rules/prefer-composite-properties.ts)
60+
* [Test source](/tests/prefer-composite-properties.test.ts)
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
[//]: # (This file is generated by eslint-docgen. Do not edit it directly.)
2+
3+
# prefer-unified-property-style
4+
5+
Discourage against mixing atomic and composite forms of the same property in a style declaration. Atomic styles give more consistent results
6+
7+
📋 This rule is enabled in `plugin:@pandacss/all`.
8+
9+
📋 This rule is enabled in `plugin:@pandacss/recommended`.
10+
11+
## Rule details
12+
13+
❌ Examples of **incorrect** code:
14+
```js
15+
import { css } from './panda/css';
16+
17+
const color = 'red.100';
18+
const styles = css({ borderRadius:"lg", borderTopRightRadius: "0" });
19+
```
20+
```js
21+
22+
import { Circle } from './panda/jsx';
23+
24+
function App(){
25+
const bool = true;
26+
return <Circle border="solid 1px" borderColor="gray.800" />;
27+
}
28+
```
29+
30+
✔️ Examples of **correct** code:
31+
```js
32+
import { css } from './panda/css';
33+
34+
const styles = css({ borderColor: 'gray.900', borderWidth: '1px' });
35+
```
36+
```js
37+
38+
import { Circle } from './panda/jsx';
39+
40+
function App(){
41+
return <Circle marginTop="2" marginRight="3" />;
42+
}
43+
```
44+
45+
## Resources
46+
47+
* [Rule source](/plugin/src/rules/prefer-unified-property-style.ts)
48+
* [Test source](/tests/prefer-unified-property-style.test.ts)

0 commit comments

Comments
 (0)