diff --git a/.eslintrc.json b/.eslintrc.json
index 8f0ba74d933..72ce9df08c6 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -14,14 +14,23 @@
},
"plugins": ["@typescript-eslint", "eslint-plugin-react", "prettier"],
"rules": {
+ "@stencil/ban-exported-const-enums": "warn",
+ "@stencil/decorators-style": "warn",
"@stencil/own-methods-must-be-private": "off",
"@stencil/own-props-must-be-private": "off",
+ "@stencil/strict-mutable": "warn",
+ "@stencil/prefer-vdom-listener": "warn",
"@stencil/required-jsdoc": "off",
"@stencil/strict-boolean-conditions": "off",
+ "@typescript-eslint/ban-types": "warn",
+ "@typescript-eslint/explicit-module-boundary-types": "warn",
"@typescript-eslint/no-explicit-any": "off",
- "@typescript-eslint/no-use-before-define": ["error", { "functions": false }],
- "lines-between-class-members": ["error", "always"],
+ "@typescript-eslint/no-inferrable-types": "warn",
+ "@typescript-eslint/no-use-before-define": ["warn", { "functions": false }],
+ "lines-between-class-members": ["warn", "always"],
"no-multiple-empty-lines": ["error", { "max": 1 }],
+ "no-var": "warn",
+ "prefer-const": "warn",
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error"
},
diff --git a/.lintstagedrc.json b/.lintstagedrc.json
index 722a6449a30..b06713e1429 100644
--- a/.lintstagedrc.json
+++ b/.lintstagedrc.json
@@ -1,5 +1,5 @@
{
"*.{json,md}": ["prettier --write"],
- "*.scss": ["prettier --write"],
- "*.{ts,tsx}": ["prettier --write"]
+ "*.scss": ["stylelint --fix", "prettier --write"],
+ "*.{ts,tsx}": ["tslint --project tsconfig-tslint.json --fix", "eslint --ext .ts,.tsx --fix", "prettier --write"]
}
diff --git a/.stylelintrc.json b/.stylelintrc.json
index 00c5ac9753e..79e6ca57662 100644
--- a/.stylelintrc.json
+++ b/.stylelintrc.json
@@ -1,4 +1,5 @@
{
+ "defaultSeverity": "warning",
"extends": "stylelint-config-recommended-scss",
"rules": {
"declaration-block-semicolon-newline-after": "always-multi-line",
diff --git a/.travis.yml b/.travis.yml
index 8a941c2c819..456ccb90ec6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,6 +6,6 @@ node_js:
- lts/*
notifications:
webhooks:
- secure: "NmCqqWhKFtoNofWB8t09v6nTkUCrj5aWKV9/n4rNmdY7ee/gktqehR3P3zfJK1iSlvJ3ewgp/alqCpcgto1mM3QljHp5QAs3f9la8Klqihy5zrRp21N9nsdPJpgLlQd/FhWh5Ss+t0dJ/nPqSWH1j2kvFjjUK1fSxzAIZ2XP/mn9uogmUCiq2uzzmno+ucctgB9c9otAXPFijwTnOYHnUvvcclnUMMR+6hDW+i1rPXE07GslWQKwN4VicKSdC2W5KDEc2xjRbpeVodky6183uVIqB/6cy1t4Q7PiBoRpAQUa9pZBZCUuSQoR++bDIdczMP+LoqZ9IgLEkqneUwEJ4Tv/D1XPGDRyX01Vc86RT/9HAbaPGocpjxH+C/27YgLIZwvMKspd/w4ohJsXKbXf3p+2cRO37vayOt8SXV9l35f5wA4iBM+Pz/EqRZ7iHD/DUnh2MrLeWLmOIGUtjjgIs8r6n/1N3c+3Hv6DdlBnyttDAQX1EPW6rFdxmO4z8/bHdugPrYNsYeJhDWQru2gaQ/zTCgSRucUjjpCQzW0C1AGfp9IkiQ71s+uQJhGrnAkwBrf8qPjsKy2EzooMvQ0K2wPQ+W+ibUjmcThAu8A9wjx0tZDdyTQB8KzoJJvUuphh6V43a5ZWB5PyYbn3ldHBtlzjLno0xWlygvSuf3JHnas="
+ secure: "NtIaVttZMs7AUSzJHGriM2fdQcdzpg65d7f/10Hdeu0wSjhmKiV/74QRcwc60MhNdWSxgq4ecdsR/n1Bhm4e5RvPTxLKBZrjeUn72UefZ/B7Kt4QMQWhBMp6AxShsPQNBkSSuk7jL/QrbGuaLBjmquzxJBHp3et9BKth+Ew+T4NQk7J9EqNtrWlipV1acobkQW8nJZEg3Y1bESaVY69ebozVYJMDDjk0SL2XYCUAz2w9aZ2x/sodzjLLxC01Ouxd7G1h/Zvuvvhjqh3UmgH15E1QUcFI7X/zU+bwIg+trndALQbuVBuzSVpWiIM3Pe5+uiBtkSQqQRHkZj91OHDSKjTLwAsWhHHw6d+/GYTaZ0ful2riwxMyXpNR4Zv65aEnYMftZ4hk7okrVwkIBtpiUwwIe/F1RF2h+X0I8ontDevNqd492ZyXFUOtebOiWYOmgJPOso1dAl+ADnkoyJNY14o6ouBl4TPji71T8jGzGVGz3Cn5/Ww8sE60cFgLoHacXxtoe43nsx384skBfGKPrxujj2GoVRRInJCd2jECpNDVTVlXwnojtOoR0LUboJYpVHA40QAcm88YiscY+PZbIreF/kCcxEAmFw95CY5p9op93bfUgbetp7bGkbtAptRtiDA4Wz5EqUSSh5POSKUhCAqMpYU1It1Th7LHqRgelcU="
script:
- npm test
diff --git a/package.json b/package.json
index c6c5e8c5a91..9d08070b165 100644
--- a/package.json
+++ b/package.json
@@ -22,8 +22,11 @@
"start": "npm run copy-icons && stencil build --dev --watch --serve",
"test": "npm run copy-icons && stencil test --spec --e2e",
"test.watch": "npm run copy-icons && stencil test --spec --e2e --watchAll",
+ "lint": "npm-run-all --parallel lint:*",
+ "lint:ts": "concurrently \"tslint --project tsconfig-tslint.json\" \"eslint --ext .ts,.tsx .\"",
+ "lint:styles": "stylelint \"src/**/*.scss\"",
"posttest": "stencil build --prerender",
- "prettier": "npm-run-all --parallel prettier:**",
+ "prettier": "npm-run-all --parallel prettier:*",
"prettier:ts": "prettier --write \"src/**/*.ts?(x)\"",
"prettier:styles": "prettier --write \"src/**/*.scss\"",
"release:prepare": "npm version prerelease --preid=beta --no-git-tag-version ",
diff --git a/src/components/calcite-accordion-item/calcite-accordion-item.tsx b/src/components/calcite-accordion-item/calcite-accordion-item.tsx
index 9e5e2d5f314..123a9b5e605 100644
--- a/src/components/calcite-accordion-item/calcite-accordion-item.tsx
+++ b/src/components/calcite-accordion-item/calcite-accordion-item.tsx
@@ -1,20 +1,11 @@
-import {
- Component,
- Element,
- Event,
- EventEmitter,
- h,
- Host,
- Listen,
- Prop,
-} from "@stencil/core";
+import { Component, Element, Event, EventEmitter, h, Host, Listen, Prop } from "@stencil/core";
import { getElementDir, getElementProp } from "../../utils/dom";
import { getKey } from "../../utils/key";
@Component({
tag: "calcite-accordion-item",
styleUrl: "calcite-accordion-item.scss",
- shadow: true,
+ shadow: true
})
export class CalciteAccordionItem {
//--------------------------------------------------------------------------
@@ -23,7 +14,7 @@ export class CalciteAccordionItem {
//
//--------------------------------------------------------------------------
- @Element() el: HTMLElement;
+ @Element() el: HTMLCalciteAccordionItemElement;
//--------------------------------------------------------------------------
//
@@ -31,7 +22,7 @@ export class CalciteAccordionItem {
//
//--------------------------------------------------------------------------
- @Prop({ reflect: true, mutable: true }) active: boolean = false;
+ @Prop({ reflect: true, mutable: true }) active = false;
/** pass a title for the accordion item */
@Prop() itemTitle?: string;
@@ -49,8 +40,11 @@ export class CalciteAccordionItem {
//--------------------------------------------------------------------------
@Event() calciteAccordionItemKeyEvent: EventEmitter;
+
@Event() calciteAccordionItemSelect: EventEmitter;
+
@Event() calciteAccordionItemClose: EventEmitter;
+
@Event() calciteAccordionItemRegister: EventEmitter;
//--------------------------------------------------------------------------
@@ -63,7 +57,7 @@ export class CalciteAccordionItem {
this.itemPosition = this.getItemPosition();
this.calciteAccordionItemRegister.emit({
parent: this.parent,
- position: this.itemPosition,
+ position: this.itemPosition
});
}
@@ -71,13 +65,7 @@ export class CalciteAccordionItem {
const dir = getElementDir(this.el);
const iconScale = this.scale !== "l" ? "s" : "m";
- const iconEl = (
-
- );
+ const iconEl = ;
return (
-