mirror of https://github.com/ColorlibHQ/AdminLTE
eslint config up-to-date
parent
63d0c2bd26
commit
0c06dd68f9
|
@ -36,8 +36,6 @@
|
|||
"properties": false
|
||||
}
|
||||
],
|
||||
// "no-eq-null": "off",
|
||||
// "no-negated-condition": "off",
|
||||
"no-console": "error",
|
||||
"object-curly-spacing": [
|
||||
"error",
|
||||
|
@ -47,7 +45,6 @@
|
|||
"error",
|
||||
"after"
|
||||
],
|
||||
// "prefer-object-spread": "off",
|
||||
"semi": [
|
||||
"error",
|
||||
"never"
|
||||
|
@ -88,6 +85,17 @@
|
|||
"SwitchCase": 1
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/naming-convention": [
|
||||
"error",
|
||||
{
|
||||
"selector": "variable",
|
||||
"format": ["camelCase", "StrictPascalCase", "UPPER_CASE"]
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/object-curly-spacing": [
|
||||
"error",
|
||||
"always"
|
||||
],
|
||||
"@typescript-eslint/semi": [
|
||||
"error",
|
||||
"never"
|
||||
|
|
|
@ -15,7 +15,7 @@ import {
|
|||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const CLASS_NAME_HOLD_TRANSITIONs = 'hold-transition'
|
||||
const CLASS_NAME_HOLD_TRANSITIONS = 'hold-transition'
|
||||
|
||||
const SELECTOR_SIDEBAR = '.sidebar'
|
||||
|
||||
|
@ -46,10 +46,10 @@ class Layout {
|
|||
holdTransition(): void {
|
||||
let resizeTimer: number | undefined
|
||||
window.addEventListener('resize', () => {
|
||||
document.body.classList.add(CLASS_NAME_HOLD_TRANSITIONs)
|
||||
document.body.classList.add(CLASS_NAME_HOLD_TRANSITIONS)
|
||||
clearTimeout(resizeTimer)
|
||||
resizeTimer = setTimeout(() => {
|
||||
document.body.classList.remove(CLASS_NAME_HOLD_TRANSITIONs)
|
||||
document.body.classList.remove(CLASS_NAME_HOLD_TRANSITIONS)
|
||||
}, 400)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue