Skip to content

Commit f5bf869

Browse files
committed
Prettify code
Signed-off-by: Alexis Rico <[email protected]>
1 parent 7a0f948 commit f5bf869

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/rules/no-system-props.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const { isPrimerComponent } = require('../utils/is-primer-component')
2-
const { pick } = require('@styled-system/props')
3-
const { some, last } = require('lodash')
1+
const {isPrimerComponent} = require('../utils/is-primer-component')
2+
const {pick} = require('@styled-system/props')
3+
const {some, last} = require('lodash')
44

55
// Components for which we allow all styled system props
66
const alwaysExcludedComponents = new Set([
@@ -107,15 +107,15 @@ module.exports = {
107107
...systemProps.map(node => fixer.remove(node)),
108108
...(stylesToAdd.size > 0
109109
? [
110-
existingSxProp
111-
? // Update an existing sx prop
112-
fixer.insertTextAfter(
113-
last(existingSxProp.value.expression.properties),
114-
`, ${objectEntriesStringFromStylesMap(stylesToAdd)}`
115-
)
116-
: // Insert new sx prop
117-
fixer.insertTextAfter(last(jsxNode.attributes), sxPropTextFromStylesMap(systemPropstylesMap))
118-
]
110+
existingSxProp
111+
? // Update an existing sx prop
112+
fixer.insertTextAfter(
113+
last(existingSxProp.value.expression.properties),
114+
`, ${objectEntriesStringFromStylesMap(stylesToAdd)}`
115+
)
116+
: // Insert new sx prop
117+
fixer.insertTextAfter(last(jsxNode.attributes), sxPropTextFromStylesMap(systemPropstylesMap))
118+
]
119119
: [])
120120
]
121121
}

0 commit comments

Comments
 (0)