From 101e6ca352f7f630f71e5229dc24c668f9e38b25 Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Tue, 26 Feb 2019 22:01:37 -0600 Subject: [PATCH] FIx eslint --- .eslintrc.yaml | 18 ++++++++++++++++++ .gitignore | 4 +--- boilerplate-card.js | 2 +- package.json | 3 ++- src/index.ts | 7 ++++--- tslint.json | 17 ----------------- 6 files changed, 26 insertions(+), 25 deletions(-) create mode 100644 .eslintrc.yaml delete mode 100644 tslint.json diff --git a/.eslintrc.yaml b/.eslintrc.yaml new file mode 100644 index 00000000..6b60ded7 --- /dev/null +++ b/.eslintrc.yaml @@ -0,0 +1,18 @@ +extends: airbnb-base +parser: "@typescript-eslint/parser" +rules: + no-else-return: 0 + no-underscore-dangle: 0 + nonblock-statement-body-position: 0 + curly: 0 + no-return-assign: 0 + consistent-return: 0 + no-mixed-operators: 0 + class-methods-use-this: 0 + no-nested-ternary: 0 + camelcase: 0 + no-unused-vars: 0 +globals: + window: true + Event: true + customElements: true diff --git a/.gitignore b/.gitignore index c6dc7ae0..5d844880 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ /node_modules/ -/.rts2_cache_umd/ +/.rpt2_cache/ yarn.lock -/dist/boilerplate-card.js.map -/dist/index.d.ts \ No newline at end of file diff --git a/boilerplate-card.js b/boilerplate-card.js index 249f0402..02461d03 100644 --- a/boilerplate-card.js +++ b/boilerplate-card.js @@ -2326,5 +2326,5 @@ __decorate([ property() ], BoilerplateCard.prototype, "_config", void 0); BoilerplateCard = __decorate([ - customElement("boilerplate-card") + customElement('boilerplate-card') ], BoilerplateCard); diff --git a/package.json b/package.json index e7d4bcdb..3cfa4e36 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,9 @@ "devDependencies": { "@typescript-eslint/parser": "^1.4.1", "eslint": "^5.14.1", + "eslint-config-airbnb-base": "^13.1.0", + "eslint-plugin-import": "^2.16.0", "eslint-plugin-typescript": "^0.14.0", - "microbundle": "^0.10.1", "prettier": "^1.16.4", "rollup": "^1.2.3", "rollup-plugin-node-resolve": "^4.0.1", diff --git a/src/index.ts b/src/index.ts index e0621b8e..01ac6c9c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,16 +5,17 @@ import { property, CSSResult, TemplateResult, - css -} from "lit-element"; + css, +} from 'lit-element'; interface BoilerplateConfig { type: string; } -@customElement("boilerplate-card") +@customElement('boilerplate-card') class BoilerplateCard extends LitElement { @property() public hass?: any; + @property() private _config?: BoilerplateConfig; public setConfig(config: BoilerplateConfig): void { diff --git a/tslint.json b/tslint.json deleted file mode 100644 index a9442303..00000000 --- a/tslint.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": ["tslint:latest", "tslint-eslint-rules", "tslint-config-prettier"], - "rulesDirectory": ["tslint-plugin-prettier"], - "rules": { - "prettier": true, - "interface-name": false, - "no-submodule-imports": false, - "ordered-imports": false, - "object-literal-sort-keys": false, - "variable-name": [ - true, - "ban-keywords", - "check-format", - "allow-leading-underscore" - ] - } -}