mirror of https://github.com/ColorlibHQ/AdminLTE
eslint config up-to-date
parent
63d0c2bd26
commit
0c06dd68f9
|
@ -36,8 +36,6 @@
|
||||||
"properties": false
|
"properties": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
// "no-eq-null": "off",
|
|
||||||
// "no-negated-condition": "off",
|
|
||||||
"no-console": "error",
|
"no-console": "error",
|
||||||
"object-curly-spacing": [
|
"object-curly-spacing": [
|
||||||
"error",
|
"error",
|
||||||
|
@ -47,7 +45,6 @@
|
||||||
"error",
|
"error",
|
||||||
"after"
|
"after"
|
||||||
],
|
],
|
||||||
// "prefer-object-spread": "off",
|
|
||||||
"semi": [
|
"semi": [
|
||||||
"error",
|
"error",
|
||||||
"never"
|
"never"
|
||||||
|
@ -88,6 +85,17 @@
|
||||||
"SwitchCase": 1
|
"SwitchCase": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"@typescript-eslint/naming-convention": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"selector": "variable",
|
||||||
|
"format": ["camelCase", "StrictPascalCase", "UPPER_CASE"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@typescript-eslint/object-curly-spacing": [
|
||||||
|
"error",
|
||||||
|
"always"
|
||||||
|
],
|
||||||
"@typescript-eslint/semi": [
|
"@typescript-eslint/semi": [
|
||||||
"error",
|
"error",
|
||||||
"never"
|
"never"
|
||||||
|
|
|
@ -65,7 +65,7 @@ class CardWidget {
|
||||||
this._parent = element
|
this._parent = element
|
||||||
}
|
}
|
||||||
|
|
||||||
this._config = {...Default, ...config}
|
this._config = { ...Default, ...config }
|
||||||
}
|
}
|
||||||
|
|
||||||
collapse() {
|
collapse() {
|
||||||
|
|
|
@ -15,7 +15,7 @@ import {
|
||||||
* ------------------------------------------------------------------------
|
* ------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const CLASS_NAME_HOLD_TRANSITIONs = 'hold-transition'
|
const CLASS_NAME_HOLD_TRANSITIONS = 'hold-transition'
|
||||||
|
|
||||||
const SELECTOR_SIDEBAR = '.sidebar'
|
const SELECTOR_SIDEBAR = '.sidebar'
|
||||||
|
|
||||||
|
@ -40,16 +40,16 @@ class Layout {
|
||||||
|
|
||||||
constructor(element: HTMLElement, config: Config) {
|
constructor(element: HTMLElement, config: Config) {
|
||||||
this._element = element
|
this._element = element
|
||||||
this._config = {...Default, ...config}
|
this._config = { ...Default, ...config }
|
||||||
}
|
}
|
||||||
|
|
||||||
holdTransition(): void {
|
holdTransition(): void {
|
||||||
let resizeTimer: number | undefined
|
let resizeTimer: number | undefined
|
||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
document.body.classList.add(CLASS_NAME_HOLD_TRANSITIONs)
|
document.body.classList.add(CLASS_NAME_HOLD_TRANSITIONS)
|
||||||
clearTimeout(resizeTimer)
|
clearTimeout(resizeTimer)
|
||||||
resizeTimer = setTimeout(() => {
|
resizeTimer = setTimeout(() => {
|
||||||
document.body.classList.remove(CLASS_NAME_HOLD_TRANSITIONs)
|
document.body.classList.remove(CLASS_NAME_HOLD_TRANSITIONS)
|
||||||
}, 400)
|
}, 400)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ class Treeview {
|
||||||
this._navItem = this._element?.closest(SELECTOR_NAV_ITEM)
|
this._navItem = this._element?.closest(SELECTOR_NAV_ITEM)
|
||||||
this._childNavItem = this._navItem?.querySelector(SELECTOR_TREEVIEW_MENU)
|
this._childNavItem = this._navItem?.querySelector(SELECTOR_TREEVIEW_MENU)
|
||||||
|
|
||||||
this._config = {...Default, ...config}
|
this._config = { ...Default, ...config }
|
||||||
}
|
}
|
||||||
|
|
||||||
open(): void {
|
open(): void {
|
||||||
|
|
|
@ -46,7 +46,7 @@ const slideUp = (target: HTMLElement, duration = 500) => {
|
||||||
/* SLIDE DOWN */
|
/* SLIDE DOWN */
|
||||||
const slideDown = (target: HTMLElement, duration = 500) => {
|
const slideDown = (target: HTMLElement, duration = 500) => {
|
||||||
target.style.removeProperty('display')
|
target.style.removeProperty('display')
|
||||||
let {display} = window.getComputedStyle(target)
|
let { display } = window.getComputedStyle(target)
|
||||||
|
|
||||||
if (display === 'none') {
|
if (display === 'none') {
|
||||||
display = 'block'
|
display = 'block'
|
||||||
|
|
Loading…
Reference in New Issue