Skip to content

Commit db8ac8e

Browse files
committed
Update recommended config
1 parent ce94e6f commit db8ac8e

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

.changeset/long-beans-juggle.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@pandacss/eslint-plugin": patch
3+
---
4+
5+
Update recommended config

docs/rules/prefer-unified-property-style.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,13 @@ Discourage against mixing atomic and composite forms of the same property in a s
1414
```js
1515
import { css } from './panda/css';
1616

17-
const color = 'red.100';
18-
const styles = css({ borderRadius:"lg", borderTopRightRadius: "0" });
17+
const styles = css({ margin:"2", marginLeft: "5" });
1918
```
2019
```js
2120

2221
import { Circle } from './panda/jsx';
2322

2423
function App(){
25-
const bool = true;
2624
return <Circle border="solid 1px" borderColor="gray.800" />;
2725
}
2826
```
@@ -31,14 +29,14 @@ function App(){
3129
```js
3230
import { css } from './panda/css';
3331

34-
const styles = css({ borderColor: 'gray.900', borderWidth: '1px' });
32+
const styles = css({ marginTop: "2", marginRight: "2", marginBottom: "2", marginLeft: "5" });
3533
```
3634
```js
3735

3836
import { Circle } from './panda/jsx';
3937

4038
function App(){
41-
return <Circle marginTop="2" marginRight="3" />;
39+
return <Circle borderStyle="solid" borderColor="gray.900" borderWidth="1px" />;
4240
}
4341
```
4442

plugin/src/configs/recommended.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ export default {
1010
'@pandacss/no-invalid-nesting': 'error',
1111
'@pandacss/no-invalid-token-paths': 'error',
1212
'@pandacss/no-property-renaming': 'warn',
13-
'@pandacss/prefer-unified-property-style': 'warn',
13+
'@pandacss/no-unsafe-token-fn-usage': 'warn',
1414
},
1515
}

plugin/tests/prefer-unified-property-style.test.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ const valids = [
88
code: javascript`
99
import { css } from './panda/css';
1010
11-
const styles = css({ borderColor: 'gray.900', borderWidth: '1px' })`,
11+
const styles = css({ marginTop: "2", marginRight: "2", marginBottom: "2", marginLeft: "5" })`,
1212
},
1313

1414
{
1515
code: javascript`
1616
import { Circle } from './panda/jsx';
1717
1818
function App(){
19-
return <Circle marginTop="2" marginRight="3" />;
19+
return <Circle borderStyle="solid" borderColor="gray.900" borderWidth="1px" />;
2020
}`,
2121
},
2222
]
@@ -26,16 +26,14 @@ const invalids = [
2626
code: javascript`
2727
import { css } from './panda/css';
2828
29-
const color = 'red.100';
30-
const styles = css({ borderRadius:"lg", borderTopRightRadius: "0" })`,
29+
const styles = css({ margin:"2", marginLeft: "5" })`,
3130
},
3231

3332
{
3433
code: javascript`
3534
import { Circle } from './panda/jsx';
3635
3736
function App(){
38-
const bool = true;
3937
return <Circle border="solid 1px" borderColor="gray.800" />;
4038
}`,
4139
},

0 commit comments

Comments
 (0)