mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
chore: more work on linter
This commit is contained in:
+11
-5
@@ -1,21 +1,27 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
parser: '@typescript-eslint/parser',
|
||||
extends: [ 'eslint:recommended', 'plugin:svelte/recommended','prettier'],
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:svelte/recommended',
|
||||
'prettier'
|
||||
],
|
||||
ignorePatterns: ['*.cjs'],
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.svelte'],
|
||||
parser: 'svelte-eslint-parser',
|
||||
parserOptions: {
|
||||
parser: '@typescript-eslint/parser',
|
||||
sourceType: 'module',
|
||||
ecmaVersion: 2020
|
||||
},
|
||||
rules: {
|
||||
'no-redeclare': 'off'
|
||||
}
|
||||
}
|
||||
],
|
||||
parserOptions: {
|
||||
sourceType: 'module',
|
||||
ecmaVersion: 2020
|
||||
},
|
||||
env: {
|
||||
browser: true,
|
||||
es2017: true,
|
||||
|
||||
@@ -5,5 +5,6 @@
|
||||
"trailingComma": "none",
|
||||
"printWidth": 100,
|
||||
"bracketSameLine": true,
|
||||
"plugins": ["prettier-plugin-svelte"],
|
||||
"svelteSortOrder": "scripts-options-markup-styles"
|
||||
}
|
||||
|
||||
+2
-2
@@ -10,8 +10,8 @@
|
||||
"sync": "svelte-kit sync",
|
||||
"check": "svelte-check --tsconfig ./tsconfig.json --fail-on-warnings --threshold warning",
|
||||
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
|
||||
"lint": "prettier --ignore-path .gitignore --check --plugin-search-dir=. . && eslint .",
|
||||
"format": "prettier --ignore-path .gitignore --write --plugin-search-dir=. .",
|
||||
"lint": "prettier --ignore-path .gitignore --check --plugin prettier-plugin-svelte . && eslint .",
|
||||
"format": "prettier --ignore-path .gitignore --write --plugin prettier-plugin-svelte .",
|
||||
"test": "vitest run",
|
||||
"test:ui": "vitest --ui",
|
||||
"test:watch": "vitest watch",
|
||||
|
||||
@@ -189,7 +189,6 @@
|
||||
color: #62aed2;
|
||||
}
|
||||
}
|
||||
&.prism-regex,
|
||||
&.prism-important,
|
||||
&.prism-variable {
|
||||
color: #a1c4ff;
|
||||
@@ -197,5 +196,11 @@
|
||||
color: #62aed2;
|
||||
}
|
||||
}
|
||||
&.prism-regex {
|
||||
color: #a1c4ff;
|
||||
body.theme-light & {
|
||||
color: #62aed2;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -199,8 +199,12 @@
|
||||
border-radius: var(--border-radius);
|
||||
border: var(--border-size) solid transparent;
|
||||
background: var(--border-gradient) border-box;
|
||||
mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
|
||||
-webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
|
||||
mask:
|
||||
linear-gradient(#fff 0 0) padding-box,
|
||||
linear-gradient(#fff 0 0);
|
||||
-webkit-mask:
|
||||
linear-gradient(#fff 0 0) padding-box,
|
||||
linear-gradient(#fff 0 0);
|
||||
-webkit-mask-composite: destination-out;
|
||||
mask-composite: exclude;
|
||||
pointer-events: none;
|
||||
|
||||
@@ -176,8 +176,7 @@
|
||||
}}
|
||||
transition:fade
|
||||
role="button"
|
||||
tabindex="0"
|
||||
/>
|
||||
tabindex="0" />
|
||||
{/if}
|
||||
<div class="controls" class:invisible={!cardActive}>
|
||||
<button
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
error = true;
|
||||
}
|
||||
|
||||
isOpen = false;
|
||||
isOpen = false;
|
||||
});
|
||||
|
||||
$: resources = providerResources[$provider.provider];
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
},
|
||||
group: 'security',
|
||||
icon: 'pencil'
|
||||
} as const)
|
||||
}) as const
|
||||
),
|
||||
// Settings
|
||||
{
|
||||
|
||||
@@ -90,8 +90,7 @@
|
||||
on:click={() => (isLimited = true)}
|
||||
on:keyup|self={clickOnEnter}
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
tabindex="0">
|
||||
<input
|
||||
type="number"
|
||||
name="limit"
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
<script lang="ts">
|
||||
export let indeterminate: boolean = false;
|
||||
export let checked: boolean = false;
|
||||
|
||||
interface $$Props extends Partial<HTMLInputElement> {
|
||||
indeterminate?: boolean;
|
||||
checked?: boolean;
|
||||
}
|
||||
export let indeterminate: boolean = false;
|
||||
export let checked: boolean = false;
|
||||
|
||||
interface $$Props extends Partial<HTMLInputElement> {
|
||||
indeterminate?: boolean;
|
||||
checked?: boolean;
|
||||
}
|
||||
</script>
|
||||
|
||||
<input
|
||||
type="checkbox"
|
||||
bind:checked
|
||||
{...$$restProps}
|
||||
bind:indeterminate
|
||||
on:change />
|
||||
|
||||
<input type="checkbox" bind:checked {...$$restProps} bind:indeterminate on:change />
|
||||
|
||||
@@ -49,13 +49,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
function onCategoryChange(
|
||||
event: Event,
|
||||
category: Category
|
||||
) {
|
||||
function onCategoryChange(event: Event, category: Category) {
|
||||
allScopes.forEach((s) => {
|
||||
if (s.category === category) {
|
||||
activeScopes[s.scope] = (event.currentTarget as EventTarget & HTMLInputElement ).checked;
|
||||
activeScopes[s.scope] = (
|
||||
event.currentTarget as EventTarget & HTMLInputElement
|
||||
).checked;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
};
|
||||
|
||||
onMount(async () => {
|
||||
sdk.forConsole.client.subscribe(['project', 'console'], (response) => {
|
||||
sdk.forConsole.client.subscribe(['project', 'console'], (response) => {
|
||||
if (response.events.includes('migrations.*')) {
|
||||
invalidate(Dependencies.MIGRATIONS);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user