Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
  • Loading branch information
philipp-spiess and RobinMalfait committed Oct 11, 2024
commit bcba32d6c3ade5cf38c7270fc98db677b407d6df
6 changes: 3 additions & 3 deletions packages/@tailwindcss-upgrade/src/migrate-js-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function isSimpleConfig(unresolvedConfig: Config, source: string): boolean {
}

// The file may not contain non-serializable values
const isSimpleValue = (value: unknown): boolean => {
function isSimpleValue (value: unknown): boolean {
if (typeof value === 'function') return false
if (Array.isArray(value)) return value.every(isSimpleValue)
if (typeof value === 'object' && value !== null) {
Expand All @@ -161,8 +161,8 @@ function isSimpleConfig(unresolvedConfig: Config, source: string): boolean {
return false
}

// The file may only contain known-migrateable high-level properties
const knownProperties = ['darkMode', 'content', 'theme', 'plugins', 'presets']
// The file may only contain known-migrateable top-level properties
let knownProperties = ['darkMode', 'content', 'theme', 'plugins', 'presets']
if (Object.keys(unresolvedConfig).some((key) => !knownProperties.includes(key))) {
return false
}
Expand Down