-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c37d5c9
commit b1a163c
Showing
11 changed files
with
85 additions
and
202 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import js from '@eslint/js' | ||
import globals from 'globals' | ||
import eslintPluginSvelte from 'eslint-plugin-svelte' | ||
|
||
export default [ | ||
js.configs.recommended, | ||
...eslintPluginSvelte.configs['flat/recommended'], | ||
{ | ||
languageOptions: { | ||
ecmaVersion: 2022, | ||
sourceType: 'module', | ||
globals: { | ||
...globals.browser, | ||
}, | ||
}, | ||
rules: { | ||
'comma-spacing': ['error', { 'before': false, 'after': true }], | ||
'comma-style': ['error', 'last'], | ||
'func-call-spacing': ['error', 'never'], | ||
'key-spacing': ['error', { 'mode': 'minimum', 'beforeColon': false, 'afterColon': true }], | ||
'keyword-spacing': ['error', { 'before': true, 'after': true }], | ||
'linebreak-style': ['error', 'unix'], | ||
'lines-between-class-members': ['error', 'always'], | ||
'no-console': ['warn', { 'allow': ['warn'] }], | ||
'no-empty-function': 'error', | ||
'no-multiple-empty-lines': ['error', { 'max': 2 }], | ||
'no-var': 'error', | ||
'quotes': ['error', 'single'], | ||
'semi': ['error', 'never'], | ||
'svelte/no-at-html-tags': 'off', | ||
'space-before-blocks': ['error', 'always'], | ||
'space-before-function-paren': ['error', { 'named': 'never', 'anonymous': 'always', 'asyncArrow': 'always' }], | ||
}, | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<script> | ||
export let site; | ||
export let site | ||
</script> | ||
|
||
<div title="Site: {site}" class="cell"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<script> | ||
export let template; | ||
export let template | ||
</script> | ||
|
||
<div title="Template: {template}" class="cell"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
export default class { | ||
constructor(debugbar, callback) { | ||
this.callback = callback; | ||
this.callback = callback | ||
|
||
new MutationObserver(mutations => { | ||
mutations.forEach(mutation => { | ||
if (mutation.attributeName === 'class') { | ||
this.setStatus(mutation.target); | ||
this.setStatus(mutation.target) | ||
} | ||
}); | ||
}).observe(debugbar, { attributes: true }); | ||
}) | ||
}).observe(debugbar, { attributes: true }) | ||
|
||
this.setStatus(debugbar); | ||
this.setStatus(debugbar) | ||
} | ||
|
||
setStatus(debugbar) { | ||
if (debugbar.classList.contains('phpdebugbar-closed')) { | ||
return this.callback('closed'); | ||
return this.callback('closed') | ||
} | ||
|
||
return this.callback('minimized'); | ||
return this.callback('minimized') | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
export default { | ||
get(key) { | ||
return JSON.parse(localStorage.getItem(key)); | ||
return JSON.parse(localStorage.getItem(key)) | ||
}, | ||
|
||
set(key, value) { | ||
localStorage.setItem(key, JSON.stringify(value)); | ||
localStorage.setItem(key, JSON.stringify(value)) | ||
}, | ||
|
||
has(key) { | ||
return localStorage.getItem(key) !== null; | ||
return localStorage.getItem(key) !== null | ||
}, | ||
}; | ||
} |