Fix package.json for windows (errors when runing yarn run lint and yarn run format) (#6762)

This commit is contained in:
Tomasz 2020-09-15 21:15:05 +02:00 committed by GitHub
parent d6aba040dd
commit c62ff85e73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 15 deletions

View File

@ -1,16 +1,17 @@
import "@polymer/app-layout/app-header-layout/app-header-layout"; import "@polymer/app-layout/app-header-layout/app-header-layout";
import "@polymer/app-layout/app-header/app-header"; import "@polymer/app-layout/app-header/app-header";
import "@polymer/app-layout/app-toolbar/app-toolbar"; import "@polymer/app-layout/app-toolbar/app-toolbar";
import "../../src/components/ha-icon-button";
import "../../src/components/ha-icon";
import "@polymer/paper-item/paper-item"; import "@polymer/paper-item/paper-item";
import "@polymer/paper-item/paper-item-body"; import "@polymer/paper-item/paper-item-body";
import { html } from "@polymer/polymer/lib/utils/html-tag"; import { html } from "@polymer/polymer/lib/utils/html-tag";
/* eslint-plugin-disable lit */ /* eslint-plugin-disable lit */
import { PolymerElement } from "@polymer/polymer/polymer-element"; import { PolymerElement } from "@polymer/polymer/polymer-element";
import "../../src/components/ha-card"; import "../../src/components/ha-card";
import "../../src/components/ha-icon";
import "../../src/components/ha-icon-button";
import "../../src/managers/notification-manager"; import "../../src/managers/notification-manager";
import "../../src/styles/polymer-ha-style"; import "../../src/styles/polymer-ha-style";
// eslint-disable-next-line import/extensions
import { DEMOS } from "../build/import-demos"; import { DEMOS } from "../build/import-demos";
const fixPath = (path) => path.substr(2, path.length - 5); const fixPath = (path) => path.substr(2, path.length - 5);

View File

@ -8,12 +8,12 @@
"version": "1.0.0", "version": "1.0.0",
"scripts": { "scripts": {
"build": "script/build_frontend", "build": "script/build_frontend",
"lint:eslint": "eslint '**/src/**/*.{js,ts,html}' --ignore-path .gitignore", "lint:eslint": "eslint \"**/src/**/*.{js,ts,html}\" --ignore-path .gitignore",
"format:eslint": "eslint '**/src/**/*.{js,ts,html}' --fix --ignore-path .gitignore", "format:eslint": "eslint \"**/src/**/*.{js,ts,html}\" --fix --ignore-path .gitignore",
"lint:prettier": "prettier '**/src/**/*.{js,ts,json,css,md}' --check", "lint:prettier": "prettier \"**/src/**/*.{js,ts,json,css,md}\" --check",
"format:prettier": "prettier '**/src/**/*.{js,ts,json,css,md}' --write", "format:prettier": "prettier \"**/src/**/*.{js,ts,json,css,md}\" --write",
"lint:types": "tsc", "lint:types": "tsc",
"lint:lit": "lit-analyzer '**/src/**/*.ts' --format markdown --outFile result.md", "lint:lit": "lit-analyzer \"**/src/**/*.ts\" --format markdown --outFile result.md",
"lint": "npm run lint:eslint && npm run lint:prettier && npm run lint:types", "lint": "npm run lint:eslint && npm run lint:prettier && npm run lint:types",
"format": "npm run format:eslint && npm run format:prettier", "format": "npm run format:eslint && npm run format:prettier",
"mocha": "node_modules/.bin/ts-mocha -p test-mocha/tsconfig.test.json --opts test-mocha/mocha.opts", "mocha": "node_modules/.bin/ts-mocha -p test-mocha/tsconfig.test.json --opts test-mocha/mocha.opts",

View File

@ -24,8 +24,7 @@ export const iconColorCSS = css`
ha-icon[data-domain="group"][data-state="home"], ha-icon[data-domain="group"][data-state="home"],
ha-icon[data-domain="group"][data-state="open"], ha-icon[data-domain="group"][data-state="open"],
ha-icon[data-domain="group"][data-state="locked"], ha-icon[data-domain="group"][data-state="locked"],
ha-icon[data-domain="group"][data-state="problem"] ha-icon[data-domain="group"][data-state="problem"] {
{
color: var(--paper-item-icon-active-color, #fdd835); color: var(--paper-item-icon-active-color, #fdd835);
} }

View File

@ -1,16 +1,16 @@
import type { HassEntity } from "home-assistant-js-websocket"; import type { HassEntity } from "home-assistant-js-websocket";
import { styleMap } from "lit-html/directives/style-map";
import { import {
css, css,
CSSResult, CSSResult,
html, html,
internalProperty,
LitElement, LitElement,
property, property,
internalProperty,
PropertyValues, PropertyValues,
TemplateResult, TemplateResult,
} from "lit-element"; } from "lit-element";
import { ifDefined } from "lit-html/directives/if-defined"; import { ifDefined } from "lit-html/directives/if-defined";
import { styleMap } from "lit-html/directives/style-map";
import { computeActiveState } from "../../common/entity/compute_active_state"; import { computeActiveState } from "../../common/entity/compute_active_state";
import { computeStateDomain } from "../../common/entity/compute_state_domain"; import { computeStateDomain } from "../../common/entity/compute_state_domain";
import { stateIcon } from "../../common/entity/state_icon"; import { stateIcon } from "../../common/entity/state_icon";
@ -73,10 +73,15 @@ export class StateBadge extends LitElement {
if (stateObj) { if (stateObj) {
// hide icon if we have entity picture // hide icon if we have entity picture
if ( if (
((stateObj.attributes.entity_picture_local || stateObj.attributes.entity_picture) && !this.overrideIcon) || ((stateObj.attributes.entity_picture_local ||
stateObj.attributes.entity_picture) &&
!this.overrideIcon) ||
this.overrideImage this.overrideImage
) { ) {
let imageUrl = this.overrideImage || stateObj.attributes.entity_picture_local || stateObj.attributes.entity_picture; let imageUrl =
this.overrideImage ||
stateObj.attributes.entity_picture_local ||
stateObj.attributes.entity_picture;
if (this.hass) { if (this.hass) {
imageUrl = this.hass.hassUrl(imageUrl); imageUrl = this.hass.hassUrl(imageUrl);
} }

View File

@ -5,9 +5,9 @@ import {
CSSResult, CSSResult,
customElement, customElement,
html, html,
internalProperty,
LitElement, LitElement,
property, property,
internalProperty,
PropertyValues, PropertyValues,
query, query,
TemplateResult, TemplateResult,
@ -191,7 +191,7 @@ class HuiAlarmPanelCard extends LitElement implements LovelaceCard {
: html` : html`
<paper-input <paper-input
id="alarmCode" id="alarmCode"
.label=${this.hass.localize('ui.card.alarm_control_panel.code')} .label=${this.hass.localize("ui.card.alarm_control_panel.code")}
type="password" type="password"
></paper-input> ></paper-input>
`} `}