diff --git a/web/multinode/.stylelintrc.json b/web/multinode/.stylelintrc.json new file mode 100644 index 000000000..2e6880904 --- /dev/null +++ b/web/multinode/.stylelintrc.json @@ -0,0 +1,36 @@ +{ + "plugins": [ + "stylelint-scss" + ], + "extends": "stylelint-config-standard", + "rules": { + "indentation": 4, + "string-quotes": "single", + "no-duplicate-selectors": true, + "selector-max-attribute": 1, + "selector-combinator-space-after": "always", + "selector-attribute-operator-space-before": "never", + "selector-attribute-operator-space-after": "never", + "selector-attribute-brackets-space-inside": "never", + "declaration-block-trailing-semicolon": "always", + "declaration-colon-space-before": "never", + "declaration-colon-space-after": "always", + "number-leading-zero": "always", + "function-url-quotes": "always", + "font-family-name-quotes": "always-unless-keyword", + "comment-whitespace-inside": "always", + "comment-empty-line-before": "always", + "rule-empty-line-before": "always-multi-line", + "selector-pseudo-element-colon-notation": "single", + "selector-pseudo-class-parentheses-space-inside": "never", + "selector-max-type": 3, + "font-family-no-missing-generic-family-keyword": true, + "at-rule-no-unknown": null, + "scss/at-rule-no-unknown": true, + "media-feature-range-operator-space-before": "always", + "media-feature-range-operator-space-after": "always", + "media-feature-parentheses-space-inside": "never", + "media-feature-colon-space-before": "never", + "media-feature-colon-space-after": "always" + } +} diff --git a/web/multinode/package.json b/web/multinode/package.json index d81689653..faead0565 100644 --- a/web/multinode/package.json +++ b/web/multinode/package.json @@ -39,41 +39,5 @@ "vue-tslint": "0.3.2", "vue-tslint-loader": "3.5.6", "webpack": "4.41.5" - }, - "stylelint": { - "plugins": [ - "stylelint-scss" - ], - "extends": "stylelint-config-standard", - "rules": { - "indentation": 4, - "string-quotes": "single", - "no-duplicate-selectors": true, - "selector-max-attribute": 1, - "selector-combinator-space-after": "always", - "selector-attribute-operator-space-before": "never", - "selector-attribute-operator-space-after": "never", - "selector-attribute-brackets-space-inside": "never", - "declaration-block-trailing-semicolon": "always", - "declaration-colon-space-before": "never", - "declaration-colon-space-after": "always", - "number-leading-zero": "always", - "function-url-quotes": "always", - "font-family-name-quotes": "always-unless-keyword", - "comment-whitespace-inside": "always", - "comment-empty-line-before": "always", - "rule-empty-line-before": "always-multi-line", - "selector-pseudo-element-colon-notation": "single", - "selector-pseudo-class-parentheses-space-inside": "never", - "selector-max-type": 3, - "font-family-no-missing-generic-family-keyword": true, - "at-rule-no-unknown": null, - "scss/at-rule-no-unknown": true, - "media-feature-range-operator-space-before": "always", - "media-feature-range-operator-space-after": "always", - "media-feature-parentheses-space-inside": "never", - "media-feature-colon-space-before": "never", - "media-feature-colon-space-after": "always" - } } } diff --git a/web/storagenode/.stylelintrc.json b/web/storagenode/.stylelintrc.json new file mode 100644 index 000000000..4c98bbed9 --- /dev/null +++ b/web/storagenode/.stylelintrc.json @@ -0,0 +1,36 @@ +{ + "plugins": [ + "stylelint-scss" + ], + "extends": "stylelint-config-standard", + "rules": { + "indentation": 4, + "string-quotes": "single", + "no-duplicate-selectors": true, + "selector-max-attribute": 1, + "selector-combinator-space-after": "always", + "selector-attribute-operator-space-before": "never", + "selector-attribute-operator-space-after": "never", + "selector-attribute-brackets-space-inside": "never", + "declaration-block-trailing-semicolon": "always", + "declaration-colon-space-before": "never", + "declaration-colon-space-after": "always", + "number-leading-zero": "always", + "function-url-quotes": "always", + "font-family-name-quotes": "always-unless-keyword", + "comment-whitespace-inside": "always", + "comment-empty-line-before": "always", + "rule-empty-line-before": "always-multi-line", + "selector-pseudo-element-colon-notation": "single", + "selector-pseudo-class-parentheses-space-inside": "never", + "selector-max-type": 1, + "font-family-no-missing-generic-family-keyword": true, + "at-rule-no-unknown": null, + "scss/at-rule-no-unknown": true, + "media-feature-range-operator-space-before": "always", + "media-feature-range-operator-space-after": "always", + "media-feature-parentheses-space-inside": "never", + "media-feature-colon-space-before": "never", + "media-feature-colon-space-after": "always" + } +} diff --git a/web/storagenode/jestSetup.ts b/web/storagenode/jestSetup.ts index 17d01565c..4f7d6730f 100644 --- a/web/storagenode/jestSetup.ts +++ b/web/storagenode/jestSetup.ts @@ -3,7 +3,7 @@ import { GlobalWithFetchMock } from 'jest-fetch-mock'; -const customGlobal: GlobalWithFetchMock = global as GlobalWithFetchMock; +const customGlobal: GlobalWithFetchMock = global as unknown as GlobalWithFetchMock; customGlobal.fetch = require('jest-fetch-mock'); customGlobal.fetchMock = customGlobal.fetch; diff --git a/web/storagenode/package.json b/web/storagenode/package.json index 2529d6774..7a02d895c 100644 --- a/web/storagenode/package.json +++ b/web/storagenode/package.json @@ -61,42 +61,6 @@ "last 2 versions", "not ie <= 8" ], - "stylelint": { - "plugins": [ - "stylelint-scss" - ], - "extends": "stylelint-config-standard", - "rules": { - "indentation": 4, - "string-quotes": "single", - "no-duplicate-selectors": true, - "selector-max-attribute": 1, - "selector-combinator-space-after": "always", - "selector-attribute-operator-space-before": "never", - "selector-attribute-operator-space-after": "never", - "selector-attribute-brackets-space-inside": "never", - "declaration-block-trailing-semicolon": "always", - "declaration-colon-space-before": "never", - "declaration-colon-space-after": "always", - "number-leading-zero": "always", - "function-url-quotes": "always", - "font-family-name-quotes": "always-unless-keyword", - "comment-whitespace-inside": "always", - "comment-empty-line-before": "always", - "rule-empty-line-before": "always-multi-line", - "selector-pseudo-element-colon-notation": "single", - "selector-pseudo-class-parentheses-space-inside": "never", - "selector-max-type": 1, - "font-family-no-missing-generic-family-keyword": true, - "at-rule-no-unknown": null, - "scss/at-rule-no-unknown": true, - "media-feature-range-operator-space-before": "always", - "media-feature-range-operator-space-after": "always", - "media-feature-parentheses-space-inside": "never", - "media-feature-colon-space-before": "never", - "media-feature-colon-space-after": "always" - } - }, "jest": { "automock": false, "setupFiles": [ diff --git a/web/storagenode/src/main.ts b/web/storagenode/src/main.ts index bb895eecf..e7c14a26d 100644 --- a/web/storagenode/src/main.ts +++ b/web/storagenode/src/main.ts @@ -23,8 +23,7 @@ let clickOutsideEvent: EventListener; Vue.directive('click-outside', { bind: function (el: HTMLElement, binding: DirectiveBinding, vnode: VNode) { clickOutsideEvent = function(event: Event): void { - // TODO: improve and test this - if (el === event.target) { + if (el === event.target || el.contains((event.target as Node))) { return; }