@thednp/shorty 1.0.3 → 2.0.0-alpha10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.cjs +224 -0
- package/.lgtm.yml +9 -0
- package/.prettierrc.json +15 -0
- package/README.md +195 -198
- package/cypress/e2e/att.cy.ts +46 -0
- package/cypress/e2e/boolean.cy.ts +44 -0
- package/cypress/e2e/class.cy.ts +28 -0
- package/cypress/e2e/event.cy.ts +51 -0
- package/cypress/e2e/get.cy.ts +168 -0
- package/cypress/e2e/is.cy.ts +233 -0
- package/cypress/e2e/misc.cy.ts +331 -0
- package/cypress/e2e/selectors.cy.ts +85 -0
- package/cypress/fixtures/custom-elem.js +18 -0
- package/cypress/plugins/esbuild-istanbul.ts +50 -0
- package/cypress/plugins/tsCompile.ts +34 -0
- package/cypress/support/commands.ts +37 -0
- package/cypress/support/e2e.ts +21 -0
- package/cypress/support/index.js +22 -0
- package/cypress/test.html +63 -0
- package/cypress.config.ts +30 -0
- package/dist/shorty.cjs +2 -0
- package/dist/shorty.cjs.map +1 -0
- package/dist/shorty.d.ts +1502 -0
- package/dist/shorty.js +2 -2628
- package/dist/shorty.js.map +1 -0
- package/dist/shorty.mjs +552 -0
- package/dist/shorty.mjs.map +1 -0
- package/dts.config.ts +22 -0
- package/package.json +33 -38
- package/src/attr/getAttribute.ts +11 -0
- package/src/attr/getAttributeNS.ts +12 -0
- package/src/attr/hasAttribute.ts +10 -0
- package/src/attr/hasAttributeNS.ts +12 -0
- package/src/attr/removeAttribute.ts +9 -0
- package/src/attr/removeAttributeNS.ts +11 -0
- package/src/attr/setAttribute.ts +11 -0
- package/src/attr/setAttributeNS.ts +12 -0
- package/src/blocks/{documentBody.js → documentBody.ts} +0 -0
- package/src/blocks/{documentElement.js → documentElement.ts} +0 -0
- package/src/blocks/{documentHead.js → documentHead.ts} +0 -0
- package/src/boolean/isApple.ts +14 -0
- package/src/boolean/{isFirefox.js → isFirefox.ts} +2 -3
- package/src/boolean/{isMobile.js → isMobile.ts} +1 -2
- package/src/boolean/support3DTransform.ts +8 -0
- package/src/boolean/supportAnimation.ts +8 -0
- package/src/boolean/{supportPassive.js → supportPassive.ts} +3 -3
- package/src/boolean/supportTouch.ts +7 -0
- package/src/boolean/supportTransform.ts +8 -0
- package/src/boolean/supportTransition.ts +8 -0
- package/src/class/addClass.ts +11 -0
- package/src/class/hasClass.ts +11 -0
- package/src/class/removeClass.ts +11 -0
- package/src/event/off.ts +14 -0
- package/src/event/on.ts +14 -0
- package/src/event/one.ts +25 -0
- package/src/get/{getBoundingClientRect.js → getBoundingClientRect.ts} +14 -12
- package/src/get/{getDocument.js → getDocument.ts} +11 -7
- package/src/get/getDocumentBody.ts +13 -0
- package/src/get/getDocumentElement.ts +13 -0
- package/src/get/getDocumentHead.ts +12 -0
- package/src/get/{getElementAnimationDelay.js → getElementAnimationDelay.ts} +10 -9
- package/src/get/{getElementAnimationDuration.js → getElementAnimationDuration.ts} +10 -8
- package/src/get/getElementStyle.ts +25 -0
- package/src/get/{getElementTransitionDelay.js → getElementTransitionDelay.ts} +12 -8
- package/src/get/{getElementTransitionDuration.js → getElementTransitionDuration.ts} +12 -8
- package/src/get/{getNodeScroll.js → getNodeScroll.ts} +9 -5
- package/src/get/{getParentNode.js → getParentNode.ts} +11 -6
- package/src/get/{getRectRelativeToOffsetParent.js → getRectRelativeToOffsetParent.ts} +15 -7
- package/src/get/getUID.ts +42 -0
- package/src/get/{getWindow.js → getWindow.ts} +9 -6
- package/src/{index.js → index.ts} +37 -43
- package/src/interface/boundingClientRect.d.ts +10 -0
- package/src/interface/css4Declaration.d.ts +4 -0
- package/src/interface/customElement.d.ts +8 -0
- package/src/interface/navigatorUA.d.ts +15 -0
- package/src/interface/offsetRect.d.ts +6 -0
- package/src/interface/originalEvent.d.ts +4 -0
- package/src/is/isArray.ts +9 -0
- package/src/is/isCanvas.ts +13 -0
- package/src/is/isCustomElement.ts +13 -0
- package/src/is/isDocument.ts +13 -0
- package/src/is/{isElement.js → isElement.ts} +10 -5
- package/src/is/{isElementInScrollRange.js → isElementInScrollRange.ts} +4 -4
- package/src/is/{isElementInViewport.js → isElementInViewport.ts} +6 -12
- package/src/is/isElementsArray.ts +13 -0
- package/src/is/isFunction.ts +10 -0
- package/src/is/isHTMLCollection.ts +12 -0
- package/src/is/isHTMLElement.ts +13 -0
- package/src/is/isHTMLImageElement.ts +12 -0
- package/src/is/isJSON.ts +20 -0
- package/src/is/isMap.ts +11 -0
- package/src/is/isMedia.ts +20 -0
- package/src/is/isNode.ts +17 -0
- package/src/is/isNodeList.ts +13 -0
- package/src/is/isNumber.ts +9 -0
- package/src/is/isObject.ts +10 -0
- package/src/is/isRTL.ts +11 -0
- package/src/is/isSVGElement.ts +13 -0
- package/src/is/{isScaledElement.js → isScaledElement.ts} +9 -7
- package/src/is/isShadowRoot.ts +12 -0
- package/src/is/isString.ts +9 -0
- package/src/is/isTableElement.ts +14 -0
- package/src/is/isWeakMap.ts +11 -0
- package/src/is/isWindow.ts +13 -0
- package/src/misc/ArrayFrom.ts +11 -0
- package/src/misc/Float32ArrayFrom.ts +10 -0
- package/src/misc/Float64ArrayFrom.ts +10 -0
- package/src/misc/ObjectAssign.ts +43 -0
- package/src/misc/ObjectEntries.ts +11 -0
- package/src/misc/ObjectHasOwn.ts +17 -0
- package/src/misc/ObjectKeys.ts +10 -0
- package/src/misc/ObjectValues.ts +11 -0
- package/src/misc/createCustomEvent.ts +28 -0
- package/src/misc/createElement.ts +40 -0
- package/src/misc/createElementNS.ts +45 -0
- package/src/misc/data.ts +82 -0
- package/src/misc/dispatchEvent.ts +9 -0
- package/src/misc/distinct.ts +18 -0
- package/src/misc/{emulateAnimationEnd.js → emulateAnimationEnd.ts} +8 -9
- package/src/misc/{emulateTransitionEnd.js → emulateTransitionEnd.ts} +8 -9
- package/src/misc/focus.ts +9 -0
- package/src/misc/getInstance.ts +9 -0
- package/src/misc/{noop.js → noop.ts} +4 -1
- package/src/misc/normalizeOptions.ts +55 -0
- package/src/misc/normalizeValue.ts +30 -0
- package/src/misc/{passiveHandler.js → passiveHandler.ts} +1 -2
- package/src/misc/reflow.ts +9 -0
- package/src/misc/setElementStyle.ts +23 -0
- package/src/misc/timer.ts +84 -0
- package/src/misc/toLowerCase.ts +9 -0
- package/src/misc/toUpperCase.ts +9 -0
- package/src/selectors/closest.ts +20 -0
- package/src/selectors/{getCustomElements.js → getCustomElements.ts} +8 -4
- package/src/selectors/getElementById.ts +16 -0
- package/src/selectors/getElementsByClassName.ts +22 -0
- package/src/selectors/getElementsByTagName.ts +20 -0
- package/src/selectors/matches.ts +10 -0
- package/src/selectors/querySelector.ts +22 -0
- package/src/selectors/{querySelectorAll.js → querySelectorAll.ts} +7 -5
- package/src/strings/{DOMContentLoadedEvent.js → DOMContentLoadedEvent.ts} +0 -1
- package/src/strings/{DOMMouseScrollEvent.js → DOMMouseScrollEvent.ts} +0 -1
- package/src/strings/{abortEvent.js → abortEvent.ts} +0 -1
- package/src/strings/{addEventListener.js → addEventListener.ts} +0 -1
- package/src/strings/{animationDelay.js → animationDelay.ts} +0 -1
- package/src/strings/{animationDuration.js → animationDuration.ts} +0 -1
- package/src/strings/{animationEndEvent.js → animationEndEvent.ts} +0 -1
- package/src/strings/{animationName.js → animationName.ts} +0 -1
- package/src/strings/{ariaChecked.js → ariaChecked.ts} +0 -1
- package/src/strings/{ariaDescribedBy.js → ariaDescribedBy.ts} +0 -1
- package/src/strings/{ariaDescription.js → ariaDescription.ts} +0 -1
- package/src/strings/{ariaExpanded.js → ariaExpanded.ts} +0 -1
- package/src/strings/{ariaHasPopup.js → ariaHasPopup.ts} +0 -1
- package/src/strings/{ariaHidden.js → ariaHidden.ts} +0 -1
- package/src/strings/{ariaLabel.js → ariaLabel.ts} +0 -1
- package/src/strings/{ariaLabelledBy.js → ariaLabelledBy.ts} +0 -1
- package/src/strings/{ariaModal.js → ariaModal.ts} +0 -1
- package/src/strings/{ariaPressed.js → ariaPressed.ts} +0 -1
- package/src/strings/{ariaSelected.js → ariaSelected.ts} +0 -1
- package/src/strings/{ariaValueMax.js → ariaValueMax.ts} +0 -1
- package/src/strings/{ariaValueMin.js → ariaValueMin.ts} +0 -1
- package/src/strings/{ariaValueNow.js → ariaValueNow.ts} +0 -1
- package/src/strings/{ariaValueText.js → ariaValueText.ts} +0 -1
- package/src/strings/{beforeunloadEvent.js → beforeunloadEvent.ts} +0 -1
- package/src/strings/{bezierEasings.js → bezierEasings.ts} +0 -1
- package/src/strings/{blurEvent.js → blurEvent.ts} +0 -1
- package/src/strings/{changeEvent.js → changeEvent.ts} +0 -1
- package/src/strings/{contextmenuEvent.js → contextmenuEvent.ts} +0 -1
- package/src/strings/dragEvent.ts +5 -0
- package/src/strings/dragendEvent.ts +5 -0
- package/src/strings/dragenterEvent.ts +5 -0
- package/src/strings/dragleaveEvent.ts +5 -0
- package/src/strings/dragoverEvent.ts +5 -0
- package/src/strings/dragstartEvent.ts +5 -0
- package/src/strings/{errorEvent.js → errorEvent.ts} +0 -1
- package/src/strings/{focusEvent.js → focusEvent.ts} +0 -1
- package/src/strings/{focusEvents.js → focusEvents.ts} +0 -1
- package/src/strings/{focusinEvent.js → focusinEvent.ts} +0 -1
- package/src/strings/{focusoutEvent.js → focusoutEvent.ts} +0 -1
- package/src/strings/{gesturechangeEvent.js → gesturechangeEvent.ts} +0 -1
- package/src/strings/{gestureendEvent.js → gestureendEvent.ts} +0 -1
- package/src/strings/{gesturestartEvent.js → gesturestartEvent.ts} +0 -1
- package/src/strings/{keyAlt.js → keyAlt.ts} +1 -1
- package/src/strings/{keyArrowDown.js → keyArrowDown.ts} +1 -1
- package/src/strings/{keyArrowLeft.js → keyArrowLeft.ts} +1 -1
- package/src/strings/{keyArrowRight.js → keyArrowRight.ts} +1 -1
- package/src/strings/{keyArrowUp.js → keyArrowUp.ts} +1 -1
- package/src/strings/{keyBackspace.js → keyBackspace.ts} +1 -1
- package/src/strings/{keyCapsLock.js → keyCapsLock.ts} +1 -1
- package/src/strings/{keyControl.js → keyControl.ts} +1 -1
- package/src/strings/{keyDelete.js → keyDelete.ts} +1 -1
- package/src/strings/{keyEnter.js → keyEnter.ts} +1 -1
- package/src/strings/{keyEscape.js → keyEscape.ts} +1 -1
- package/src/strings/{keyInsert.js → keyInsert.ts} +1 -1
- package/src/strings/{keyMeta.js → keyMeta.ts} +1 -1
- package/src/strings/{keyPause.js → keyPause.ts} +1 -1
- package/src/strings/{keyScrollLock.js → keyScrollLock.ts} +1 -1
- package/src/strings/{keyShift.js → keyShift.ts} +1 -1
- package/src/strings/{keySpace.js → keySpace.ts} +1 -1
- package/src/strings/{keyTab.js → keyTab.ts} +1 -1
- package/src/strings/{keyboardEventKeys.js → keyboardEventKeys.ts} +0 -1
- package/src/strings/{keydownEvent.js → keydownEvent.ts} +0 -1
- package/src/strings/{keypressEvent.js → keypressEvent.ts} +0 -1
- package/src/strings/{keyupEvent.js → keyupEvent.ts} +0 -1
- package/src/strings/{loadEvent.js → loadEvent.ts} +0 -1
- package/src/strings/{loadstartEvent.js → loadstartEvent.ts} +0 -1
- package/src/strings/{mouseClickEvents.js → mouseClickEvents.ts} +0 -1
- package/src/strings/mouseHoverEvents.ts +8 -0
- package/src/strings/{mouseSwipeEvents.js → mouseSwipeEvents.ts} +4 -2
- package/src/strings/{mouseclickEvent.js → mouseclickEvent.ts} +0 -1
- package/src/strings/{mousedblclickEvent.js → mousedblclickEvent.ts} +0 -1
- package/src/strings/{mousedownEvent.js → mousedownEvent.ts} +0 -1
- package/src/strings/{mouseenterEvent.js → mouseenterEvent.ts} +0 -1
- package/src/strings/{mousehoverEvent.js → mousehoverEvent.ts} +0 -1
- package/src/strings/{mouseinEvent.js → mouseinEvent.ts} +0 -1
- package/src/strings/{mouseleaveEvent.js → mouseleaveEvent.ts} +0 -1
- package/src/strings/{mousemoveEvent.js → mousemoveEvent.ts} +0 -1
- package/src/strings/{mouseoutEvent.js → mouseoutEvent.ts} +0 -1
- package/src/strings/{mouseoverEvent.js → mouseoverEvent.ts} +0 -1
- package/src/strings/{mouseupEvent.js → mouseupEvent.ts} +0 -1
- package/src/strings/{mousewheelEvent.js → mousewheelEvent.ts} +0 -1
- package/src/strings/{moveEvent.js → moveEvent.ts} +0 -1
- package/src/strings/{nativeEvents.js → nativeEvents.ts} +0 -0
- package/src/strings/{offsetHeight.js → offsetHeight.ts} +0 -1
- package/src/strings/{offsetWidth.js → offsetWidth.ts} +0 -1
- package/src/strings/{orientationchangeEvent.js → orientationchangeEvent.ts} +0 -1
- package/src/strings/{pointercancelEvent.js → pointercancelEvent.ts} +0 -1
- package/src/strings/{pointerdownEvent.js → pointerdownEvent.ts} +0 -1
- package/src/strings/{pointerleaveEvent.js → pointerleaveEvent.ts} +0 -1
- package/src/strings/{pointermoveEvent.js → pointermoveEvent.ts} +0 -1
- package/src/strings/{pointerupEvent.js → pointerupEvent.ts} +0 -1
- package/src/strings/{readystatechangeEvent.js → readystatechangeEvent.ts} +0 -1
- package/src/strings/{removeEventListener.js → removeEventListener.ts} +0 -1
- package/src/strings/{resetEvent.js → resetEvent.ts} +0 -1
- package/src/strings/{resizeEvent.js → resizeEvent.ts} +0 -1
- package/src/strings/{scrollEvent.js → scrollEvent.ts} +0 -1
- package/src/strings/{scrollHeight.js → scrollHeight.ts} +0 -1
- package/src/strings/{scrollWidth.js → scrollWidth.ts} +0 -1
- package/src/strings/{selectEvent.js → selectEvent.ts} +0 -1
- package/src/strings/{selectendEvent.js → selectendEvent.ts} +0 -1
- package/src/strings/{selectstartEvent.js → selectstartEvent.ts} +0 -1
- package/src/strings/{submitEvent.js → submitEvent.ts} +0 -1
- package/src/strings/tabindex.ts +5 -0
- package/src/strings/touchEvents.ts +10 -0
- package/src/strings/{touchcancelEvent.js → touchcancelEvent.ts} +0 -1
- package/src/strings/{touchendEvent.js → touchendEvent.ts} +0 -1
- package/src/strings/{touchmoveEvent.js → touchmoveEvent.ts} +0 -1
- package/src/strings/{touchstartEvent.js → touchstartEvent.ts} +0 -1
- package/src/strings/{transitionDelay.js → transitionDelay.ts} +0 -1
- package/src/strings/{transitionDuration.js → transitionDuration.ts} +0 -1
- package/src/strings/{transitionEndEvent.js → transitionEndEvent.ts} +0 -1
- package/src/strings/{transitionProperty.js → transitionProperty.ts} +0 -2
- package/src/strings/{unloadEvent.js → unloadEvent.ts} +0 -1
- package/src/strings/{userAgent.js → userAgent.ts} +0 -0
- package/src/strings/userAgentData.ts +9 -0
- package/tsconfig.json +30 -0
- package/vite.config.ts +30 -0
- package/dist/shorty.esm.js +0 -2599
- package/dist/shorty.esm.min.js +0 -2
- package/dist/shorty.min.js +0 -2
- package/src/attr/getAttribute.js +0 -9
- package/src/attr/getAttributeNS.js +0 -10
- package/src/attr/hasAttribute.js +0 -9
- package/src/attr/hasAttributeNS.js +0 -10
- package/src/attr/removeAttribute.js +0 -9
- package/src/attr/removeAttributeNS.js +0 -10
- package/src/attr/setAttribute.js +0 -10
- package/src/attr/setAttributeNS.js +0 -11
- package/src/boolean/isApple.js +0 -13
- package/src/boolean/support3DTransform.js +0 -9
- package/src/boolean/supportAnimation.js +0 -9
- package/src/boolean/supportTouch.js +0 -7
- package/src/boolean/supportTransform.js +0 -9
- package/src/boolean/supportTransition.js +0 -9
- package/src/class/addClass.js +0 -10
- package/src/class/hasClass.js +0 -10
- package/src/class/removeClass.js +0 -10
- package/src/event/off.js +0 -9
- package/src/event/on.js +0 -9
- package/src/event/one.js +0 -23
- package/src/get/getDocumentBody.js +0 -10
- package/src/get/getDocumentElement.js +0 -11
- package/src/get/getDocumentHead.js +0 -10
- package/src/get/getElementAnimationDelayLegacy.js +0 -21
- package/src/get/getElementAnimationDurationLegacy.js +0 -21
- package/src/get/getElementStyle.js +0 -20
- package/src/get/getElementTransitionDelayLegacy.js +0 -21
- package/src/get/getElementTransitionDurationLegacy.js +0 -21
- package/src/get/getUID.js +0 -34
- package/src/is/isArray.js +0 -8
- package/src/is/isCustomElement.js +0 -8
- package/src/is/isDocument.js +0 -10
- package/src/is/isElementsArray.js +0 -12
- package/src/is/isFunction.js +0 -8
- package/src/is/isHTMLCollection.js +0 -8
- package/src/is/isHTMLElement.js +0 -9
- package/src/is/isHTMLImageElement.js +0 -8
- package/src/is/isMedia.js +0 -14
- package/src/is/isNode.js +0 -9
- package/src/is/isNodeList.js +0 -9
- package/src/is/isNumber.js +0 -8
- package/src/is/isObject.js +0 -8
- package/src/is/isRTL.js +0 -9
- package/src/is/isSVGElement.js +0 -11
- package/src/is/isShadowRoot.js +0 -9
- package/src/is/isString.js +0 -8
- package/src/is/isTableElement.js +0 -11
- package/src/is/isWindow.js +0 -9
- package/src/misc/ArrayFrom.js +0 -8
- package/src/misc/Float32ArrayFrom.js +0 -7
- package/src/misc/Float64ArrayFrom.js +0 -7
- package/src/misc/ObjectAssign.js +0 -7
- package/src/misc/ObjectEntries.js +0 -7
- package/src/misc/ObjectKeys.js +0 -7
- package/src/misc/ObjectValues.js +0 -7
- package/src/misc/OriginalEvent.js +0 -20
- package/src/misc/createElement.js +0 -27
- package/src/misc/createElementNS.js +0 -30
- package/src/misc/data.js +0 -78
- package/src/misc/dispatchEvent.js +0 -8
- package/src/misc/distinct.js +0 -10
- package/src/misc/emulateAnimationEndLegacy.js +0 -41
- package/src/misc/emulateTransitionEndLegacy.js +0 -41
- package/src/misc/focus.js +0 -7
- package/src/misc/normalizeOptions.js +0 -49
- package/src/misc/normalizeValue.js +0 -34
- package/src/misc/passiveHandlerLegacy.js +0 -10
- package/src/misc/reflow.js +0 -8
- package/src/misc/setElementStyle.js +0 -19
- package/src/misc/timer.js +0 -75
- package/src/misc/toLowerCase.js +0 -8
- package/src/misc/toUpperCase.js +0 -8
- package/src/misc/version.js +0 -8
- package/src/selectors/closest.js +0 -16
- package/src/selectors/getElementById.js +0 -14
- package/src/selectors/getElementsByClassName.js +0 -15
- package/src/selectors/getElementsByTagName.js +0 -15
- package/src/selectors/matches.js +0 -10
- package/src/selectors/matchesLegacy.js +0 -23
- package/src/selectors/querySelector.js +0 -19
- package/src/strings/animationDelayLegacy.js +0 -9
- package/src/strings/animationDurationLegacy.js +0 -9
- package/src/strings/animationEndEventLegacy.js +0 -9
- package/src/strings/animationNameLegacy.js +0 -9
- package/src/strings/mouseHoverEvents.js +0 -7
- package/src/strings/touchEvents.js +0 -8
- package/src/strings/transitionDelayLegacy.js +0 -9
- package/src/strings/transitionDurationLegacy.js +0 -9
- package/src/strings/transitionEndEventLegacy.js +0 -9
- package/src/strings/transitionPropertyLegacy.js +0 -12
- package/src/strings/userAgentData.js +0 -7
- package/types/index.d.ts +0 -257
- package/types/module/shorty.ts +0 -248
- package/types/shorty.d.ts +0 -2316
package/.eslintrc.cjs
ADDED
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
"env": {
|
|
3
|
+
"browser": true,
|
|
4
|
+
"es6": true
|
|
5
|
+
},
|
|
6
|
+
"extends": [
|
|
7
|
+
"plugin:@typescript-eslint/recommended",
|
|
8
|
+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
|
|
9
|
+
],
|
|
10
|
+
"parser": "@typescript-eslint/parser",
|
|
11
|
+
"parserOptions": {
|
|
12
|
+
"project": "tsconfig.json",
|
|
13
|
+
"sourceType": "module"
|
|
14
|
+
},
|
|
15
|
+
"plugins": [
|
|
16
|
+
"eslint-plugin-jsdoc",
|
|
17
|
+
"eslint-plugin-prefer-arrow",
|
|
18
|
+
// "eslint-plugin-react",
|
|
19
|
+
"@typescript-eslint",
|
|
20
|
+
"prettier"
|
|
21
|
+
],
|
|
22
|
+
"root": true,
|
|
23
|
+
"rules": {
|
|
24
|
+
"prettier/prettier": "error",
|
|
25
|
+
"@typescript-eslint/adjacent-overload-signatures": "error",
|
|
26
|
+
"@typescript-eslint/array-type": [
|
|
27
|
+
"error",
|
|
28
|
+
{
|
|
29
|
+
"default": "array"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"@typescript-eslint/ban-types": [
|
|
33
|
+
"error",
|
|
34
|
+
{
|
|
35
|
+
"types": {
|
|
36
|
+
"Object": {
|
|
37
|
+
"message": "Avoid using the `Object` type. Did you mean `object`?"
|
|
38
|
+
},
|
|
39
|
+
"Function": {
|
|
40
|
+
"message": "Avoid using the `Function` type. Prefer a specific function type, like `() => void`."
|
|
41
|
+
},
|
|
42
|
+
"Boolean": {
|
|
43
|
+
"message": "Avoid using the `Boolean` type. Did you mean `boolean`?"
|
|
44
|
+
},
|
|
45
|
+
"Number": {
|
|
46
|
+
"message": "Avoid using the `Number` type. Did you mean `number`?"
|
|
47
|
+
},
|
|
48
|
+
"String": {
|
|
49
|
+
"message": "Avoid using the `String` type. Did you mean `string`?"
|
|
50
|
+
},
|
|
51
|
+
"Symbol": {
|
|
52
|
+
"message": "Avoid using the `Symbol` type. Did you mean `symbol`?"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"@typescript-eslint/consistent-type-assertions": "error",
|
|
58
|
+
"@typescript-eslint/dot-notation": "error",
|
|
59
|
+
"@typescript-eslint/explicit-function-return-type": "off",
|
|
60
|
+
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
61
|
+
"@typescript-eslint/indent": "off",
|
|
62
|
+
"@typescript-eslint/member-delimiter-style": [
|
|
63
|
+
"off",
|
|
64
|
+
{
|
|
65
|
+
"multiline": {
|
|
66
|
+
"delimiter": "none",
|
|
67
|
+
"requireLast": true
|
|
68
|
+
},
|
|
69
|
+
"singleline": {
|
|
70
|
+
"delimiter": "semi",
|
|
71
|
+
"requireLast": false
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"@typescript-eslint/naming-convention": "off", // error
|
|
76
|
+
"@typescript-eslint/no-empty-function": "error",
|
|
77
|
+
"@typescript-eslint/no-empty-interface": "error",
|
|
78
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
79
|
+
"@typescript-eslint/no-misused-new": "error",
|
|
80
|
+
"@typescript-eslint/no-namespace": "error",
|
|
81
|
+
"@typescript-eslint/no-parameter-properties": "off",
|
|
82
|
+
"@typescript-eslint/no-shadow": [
|
|
83
|
+
"error",
|
|
84
|
+
{
|
|
85
|
+
"hoist": "all"
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"@typescript-eslint/no-unused-expressions": "error",
|
|
89
|
+
"@typescript-eslint/no-use-before-define": "off",
|
|
90
|
+
"@typescript-eslint/no-var-requires": "error",
|
|
91
|
+
"@typescript-eslint/prefer-for-of": "error",
|
|
92
|
+
"@typescript-eslint/prefer-function-type": "error",
|
|
93
|
+
"@typescript-eslint/prefer-namespace-keyword": "error",
|
|
94
|
+
"@typescript-eslint/quotes": "off",
|
|
95
|
+
"@typescript-eslint/semi": [
|
|
96
|
+
"off",
|
|
97
|
+
null
|
|
98
|
+
],
|
|
99
|
+
"@typescript-eslint/triple-slash-reference": [
|
|
100
|
+
"error",
|
|
101
|
+
{
|
|
102
|
+
"path": "always",
|
|
103
|
+
"types": "prefer-import",
|
|
104
|
+
"lib": "always"
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"@typescript-eslint/type-annotation-spacing": "off",
|
|
108
|
+
"@typescript-eslint/typedef": "off",
|
|
109
|
+
"@typescript-eslint/unified-signatures": "error",
|
|
110
|
+
"arrow-parens": [
|
|
111
|
+
"off",
|
|
112
|
+
"always"
|
|
113
|
+
],
|
|
114
|
+
"brace-style": [
|
|
115
|
+
"off",
|
|
116
|
+
"off"
|
|
117
|
+
],
|
|
118
|
+
"comma-dangle": "off",
|
|
119
|
+
"complexity": "off",
|
|
120
|
+
"constructor-super": "error",
|
|
121
|
+
"dot-notation": "off",
|
|
122
|
+
"eol-last": "off",
|
|
123
|
+
"eqeqeq": [
|
|
124
|
+
"error",
|
|
125
|
+
"smart"
|
|
126
|
+
],
|
|
127
|
+
"guard-for-in": "error",
|
|
128
|
+
"id-denylist": [
|
|
129
|
+
"error",
|
|
130
|
+
"any",
|
|
131
|
+
"Number",
|
|
132
|
+
"number",
|
|
133
|
+
"String",
|
|
134
|
+
"string",
|
|
135
|
+
"Boolean",
|
|
136
|
+
"boolean",
|
|
137
|
+
"Undefined",
|
|
138
|
+
"undefined"
|
|
139
|
+
],
|
|
140
|
+
"id-match": "error",
|
|
141
|
+
"indent": "off",
|
|
142
|
+
"jsdoc/check-alignment": "error",
|
|
143
|
+
"jsdoc/check-indentation": "error",
|
|
144
|
+
"jsdoc/newline-after-description": "error",
|
|
145
|
+
"linebreak-style": "off",
|
|
146
|
+
"max-classes-per-file": [
|
|
147
|
+
"error",
|
|
148
|
+
1
|
|
149
|
+
],
|
|
150
|
+
"max-len": "off",
|
|
151
|
+
"new-parens": "off",
|
|
152
|
+
"newline-per-chained-call": "off",
|
|
153
|
+
"no-bitwise": "error",
|
|
154
|
+
"no-caller": "error",
|
|
155
|
+
"no-cond-assign": "error",
|
|
156
|
+
"no-console": "error",
|
|
157
|
+
"no-debugger": "error",
|
|
158
|
+
"no-empty": "error",
|
|
159
|
+
"no-empty-function": "off",
|
|
160
|
+
"no-eval": "error",
|
|
161
|
+
"no-extra-semi": "off",
|
|
162
|
+
"no-fallthrough": "off",
|
|
163
|
+
"no-invalid-this": "off",
|
|
164
|
+
"no-irregular-whitespace": "off",
|
|
165
|
+
"no-multiple-empty-lines": "off",
|
|
166
|
+
"no-new-wrappers": "error",
|
|
167
|
+
"no-shadow": "off",
|
|
168
|
+
"no-throw-literal": "error",
|
|
169
|
+
"no-trailing-spaces": "off",
|
|
170
|
+
"no-undef-init": "error",
|
|
171
|
+
"no-underscore-dangle": "off",
|
|
172
|
+
"no-unsafe-finally": "error",
|
|
173
|
+
"no-unused-expressions": "off",
|
|
174
|
+
"no-unused-labels": "error",
|
|
175
|
+
"no-use-before-define": "off",
|
|
176
|
+
"no-var": "error",
|
|
177
|
+
"object-shorthand": "error",
|
|
178
|
+
"one-var": [
|
|
179
|
+
"error",
|
|
180
|
+
"never"
|
|
181
|
+
],
|
|
182
|
+
"padded-blocks": [
|
|
183
|
+
"off",
|
|
184
|
+
{
|
|
185
|
+
"blocks": "never"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"allowSingleLineBlocks": true
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
"prefer-arrow/prefer-arrow-functions": "error",
|
|
192
|
+
"prefer-const": "error",
|
|
193
|
+
"quote-props": "off",
|
|
194
|
+
"quotes": "off",
|
|
195
|
+
"radix": "error",
|
|
196
|
+
// "react/jsx-curly-spacing": "off",
|
|
197
|
+
// "react/jsx-equals-spacing": "off",
|
|
198
|
+
// "react/jsx-tag-spacing": [
|
|
199
|
+
// "off",
|
|
200
|
+
// {
|
|
201
|
+
// "afterOpening": "allow",
|
|
202
|
+
// "closingSlash": "allow"
|
|
203
|
+
// }
|
|
204
|
+
// ],
|
|
205
|
+
// "react/jsx-wrap-multilines": "off",
|
|
206
|
+
"semi": "off",
|
|
207
|
+
"space-before-function-paren": "off",
|
|
208
|
+
"space-in-parens": [
|
|
209
|
+
"off",
|
|
210
|
+
"never"
|
|
211
|
+
],
|
|
212
|
+
"spaced-comment": [
|
|
213
|
+
"error",
|
|
214
|
+
"always",
|
|
215
|
+
{
|
|
216
|
+
"markers": [
|
|
217
|
+
"/"
|
|
218
|
+
]
|
|
219
|
+
}
|
|
220
|
+
],
|
|
221
|
+
"use-isnan": "error",
|
|
222
|
+
"valid-typeof": "off"
|
|
223
|
+
}
|
|
224
|
+
};
|
package/.lgtm.yml
ADDED
package/.prettierrc.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"arrowParens": "avoid",
|
|
3
|
+
"bracketSpacing": true,
|
|
4
|
+
"endOfLine": "lf",
|
|
5
|
+
"bracketSameLine": false,
|
|
6
|
+
"jsxSingleQuote": false,
|
|
7
|
+
"printWidth": 100,
|
|
8
|
+
"proseWrap": "preserve",
|
|
9
|
+
"quoteProps": "as-needed",
|
|
10
|
+
"semi": true,
|
|
11
|
+
"singleQuote": true,
|
|
12
|
+
"tabWidth": 2,
|
|
13
|
+
"trailingComma": "all",
|
|
14
|
+
"useTabs": false
|
|
15
|
+
}
|