-
-
Notifications
You must be signed in to change notification settings - Fork 343
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use same prettier config as Home Assistant Front-end (#1472)
- Loading branch information
Showing
206 changed files
with
14,509 additions
and
13,039 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,3 @@ | ||
module.exports = { | ||
arrowParens: "always", | ||
bracketSpacing: true, | ||
bracketSameLine: false, | ||
endOfLine: "lf", | ||
printWidth: 100, | ||
semi: true, | ||
singleQuote: false, | ||
tabWidth: 4, | ||
trailingComma: "es5", | ||
useTabs: false, | ||
trailingComma: "es5", | ||
}; |
57 changes: 37 additions & 20 deletions
57
src/cards/alarm-control-panel-card/alarm-control-panel-card-config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,47 @@ | ||
import { array, assign, boolean, deprecated, object, optional } from "superstruct"; | ||
import { | ||
array, | ||
assign, | ||
boolean, | ||
deprecated, | ||
object, | ||
optional, | ||
} from "superstruct"; | ||
import { LovelaceCardConfig } from "../../ha"; | ||
import { ActionsSharedConfig, actionsSharedConfigStruct } from "../../shared/config/actions-config"; | ||
import { | ||
AppearanceSharedConfig, | ||
appearanceSharedConfigStruct, | ||
ActionsSharedConfig, | ||
actionsSharedConfigStruct, | ||
} from "../../shared/config/actions-config"; | ||
import { | ||
AppearanceSharedConfig, | ||
appearanceSharedConfigStruct, | ||
} from "../../shared/config/appearance-config"; | ||
import { EntitySharedConfig, entitySharedConfigStruct } from "../../shared/config/entity-config"; | ||
import { | ||
EntitySharedConfig, | ||
entitySharedConfigStruct, | ||
} from "../../shared/config/entity-config"; | ||
import { lovelaceCardConfigStruct } from "../../shared/config/lovelace-card-config"; | ||
import { AlarmMode } from "../../ha/data/alarm_control_panel"; | ||
|
||
export type AlarmControlPanelCardConfig = LovelaceCardConfig & | ||
EntitySharedConfig & | ||
AppearanceSharedConfig & | ||
ActionsSharedConfig & { | ||
states?: AlarmMode[]; | ||
}; | ||
EntitySharedConfig & | ||
AppearanceSharedConfig & | ||
ActionsSharedConfig & { | ||
states?: AlarmMode[]; | ||
}; | ||
|
||
export const alarmControlPanelCardCardConfigStruct = assign( | ||
lovelaceCardConfigStruct, | ||
assign(entitySharedConfigStruct, appearanceSharedConfigStruct, actionsSharedConfigStruct), | ||
object({ | ||
states: optional(array()), | ||
show_keypad: deprecated(optional(boolean()), (_value, ctx) => { | ||
console.warn( | ||
`🍄 "${ctx.path}" option is deprecated and no longer available. Remove it from your YAML configuration or use the built-in Home Assistant alarm panel card if you want keypad.` | ||
); | ||
}), | ||
}) | ||
lovelaceCardConfigStruct, | ||
assign( | ||
entitySharedConfigStruct, | ||
appearanceSharedConfigStruct, | ||
actionsSharedConfigStruct | ||
), | ||
object({ | ||
states: optional(array()), | ||
show_keypad: deprecated(optional(boolean()), (_value, ctx) => { | ||
console.warn( | ||
`🍄 "${ctx.path}" option is deprecated and no longer available. Remove it from your YAML configuration or use the built-in Home Assistant alarm panel card if you want keypad.` | ||
); | ||
}), | ||
}) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.