From fdb1ed913e7cc208c2aa00874a96e741d3ba5199 Mon Sep 17 00:00:00 2001 From: KoloMl Date: Sat, 23 Mar 2024 03:13:39 +0400 Subject: [PATCH] Reformatting the code using new editorconfig --- .editorconfig | 20 +-- jsconfig.json | 32 ++--- manifest.json | 26 ++-- package.json | 48 +++---- src/app.d.ts | 14 +- src/app.html | 16 +-- src/components/layout/Footer.svelte | 22 +-- src/components/layout/Header.svelte | 40 +++--- src/components/ui/forms/FormContainer.svelte | 14 +- src/components/ui/forms/FormControl.svelte | 14 +- src/components/ui/forms/TextField.svelte | 14 +- src/components/ui/menu/Menu.svelte | 62 ++++---- src/components/ui/menu/MenuLink.svelte | 58 ++++---- .../web-components/TagsEditor.svelte | 28 ++-- src/routes/+layout.svelte | 16 +-- src/routes/+page.svelte | 12 +- src/routes/about/+page.svelte | 30 ++-- src/routes/settings/+page.svelte | 12 +- .../maintenance/[id]/edit/+page.svelte | 134 +++++++++--------- static/img/arrow-left.svg | 7 +- static/img/globe.svg | 7 +- static/img/info-circle.svg | 2 +- static/img/plus.svg | 7 +- static/img/tag.svg | 7 +- static/img/wrench.svg | 6 +- 25 files changed, 326 insertions(+), 322 deletions(-) diff --git a/.editorconfig b/.editorconfig index 7cf37ee..b4b0bcb 100644 --- a/.editorconfig +++ b/.editorconfig @@ -13,7 +13,7 @@ ij_formatter_off_tag = @formatter:off ij_formatter_on_tag = @formatter:on ij_formatter_tags_enabled = true ij_smart_tabs = false -ij_visual_guides = +ij_visual_guides = ij_wrap_on_typing = false [*.css] @@ -30,7 +30,7 @@ ij_css_hex_color_upper_case = false ij_css_keep_blank_lines_in_code = 2 ij_css_keep_indents_on_empty_lines = false ij_css_keep_single_line_blocks = false -ij_css_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow +ij_css_properties_order = font, font-family, font-size, font-weight, font-style, font-variant, font-size-adjust, font-stretch, line-height, position, z-index, top, right, bottom, left, display, visibility, float, clear, overflow, overflow-x, overflow-y, clip, zoom, align-content, align-items, align-self, flex, flex-flow, flex-basis, flex-direction, flex-grow, flex-shrink, flex-wrap, justify-content, order, box-sizing, width, min-width, max-width, height, min-height, max-height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, table-layout, empty-cells, caption-side, border-spacing, border-collapse, list-style, list-style-position, list-style-type, list-style-image, content, quotes, counter-reset, counter-increment, resize, cursor, user-select, nav-index, nav-up, nav-right, nav-down, nav-left, transition, transition-delay, transition-timing-function, transition-duration, transition-property, transform, transform-origin, animation, animation-name, animation-duration, animation-play-state, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, text-align, text-align-last, vertical-align, white-space, text-decoration, text-emphasis, text-emphasis-color, text-emphasis-style, text-emphasis-position, text-indent, text-justify, letter-spacing, word-spacing, text-outline, text-transform, text-wrap, text-overflow, text-overflow-ellipsis, text-overflow-mode, word-wrap, word-break, tab-size, hyphens, pointer-events, opacity, color, border, border-width, border-style, border-color, border-top, border-top-width, border-top-style, border-top-color, border-right, border-right-width, border-right-style, border-right-color, border-bottom, border-bottom-width, border-bottom-style, border-bottom-color, border-left, border-left-width, border-left-style, border-left-color, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-image, border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat, outline, outline-width, outline-style, outline-color, outline-offset, background, background-color, background-image, background-repeat, background-attachment, background-position, background-position-x, background-position-y, background-clip, background-origin, background-size, box-decoration-break, box-shadow, text-shadow ij_css_space_after_colon = true ij_css_space_before_opening_brace = true ij_css_use_double_quotes = true @@ -53,7 +53,7 @@ ij_scss_keep_indents_on_empty_lines = false ij_scss_keep_single_line_blocks = false ij_scss_line_comment_add_space = false ij_scss_line_comment_at_first_column = false -ij_scss_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow +ij_scss_properties_order = font, font-family, font-size, font-weight, font-style, font-variant, font-size-adjust, font-stretch, line-height, position, z-index, top, right, bottom, left, display, visibility, float, clear, overflow, overflow-x, overflow-y, clip, zoom, align-content, align-items, align-self, flex, flex-flow, flex-basis, flex-direction, flex-grow, flex-shrink, flex-wrap, justify-content, order, box-sizing, width, min-width, max-width, height, min-height, max-height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, table-layout, empty-cells, caption-side, border-spacing, border-collapse, list-style, list-style-position, list-style-type, list-style-image, content, quotes, counter-reset, counter-increment, resize, cursor, user-select, nav-index, nav-up, nav-right, nav-down, nav-left, transition, transition-delay, transition-timing-function, transition-duration, transition-property, transform, transform-origin, animation, animation-name, animation-duration, animation-play-state, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, text-align, text-align-last, vertical-align, white-space, text-decoration, text-emphasis, text-emphasis-color, text-emphasis-style, text-emphasis-position, text-indent, text-justify, letter-spacing, word-spacing, text-outline, text-transform, text-wrap, text-overflow, text-overflow-ellipsis, text-overflow-mode, word-wrap, word-break, tab-size, hyphens, pointer-events, opacity, color, border, border-width, border-style, border-color, border-top, border-top-width, border-top-style, border-top-color, border-right, border-right-width, border-right-style, border-right-color, border-bottom, border-bottom-width, border-bottom-style, border-bottom-color, border-left, border-left-width, border-left-style, border-left-color, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-image, border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat, outline, outline-width, outline-style, outline-color, outline-offset, background, background-color, background-image, background-repeat, background-attachment, background-position, background-position-x, background-position-y, background-clip, background-origin, background-size, box-decoration-break, box-shadow, text-shadow ij_scss_space_after_colon = true ij_scss_space_before_opening_brace = true ij_scss_use_double_quotes = true @@ -81,7 +81,7 @@ ij_javascript_array_initializer_wrap = off ij_javascript_assignment_wrap = off ij_javascript_binary_operation_sign_on_next_line = false ij_javascript_binary_operation_wrap = off -ij_javascript_blacklist_imports = rxjs/Rx,node_modules/**,**/node_modules/**,@angular/material,@angular/material/typings/** +ij_javascript_blacklist_imports = rxjs/Rx, node_modules/**, **/node_modules/**, @angular/material, @angular/material/typings/** ij_javascript_blank_lines_after_imports = 1 ij_javascript_blank_lines_around_class = 1 ij_javascript_blank_lines_around_field = 0 @@ -146,7 +146,7 @@ ij_javascript_prefer_explicit_types_function_expression_returns = false ij_javascript_prefer_explicit_types_function_returns = false ij_javascript_prefer_explicit_types_vars_fields = false ij_javascript_prefer_parameters_wrap = false -ij_javascript_property_prefix = +ij_javascript_property_prefix = ij_javascript_reformat_c_style_comments = false ij_javascript_space_after_colon = true ij_javascript_space_after_comma = true @@ -232,23 +232,23 @@ ij_javascript_while_on_new_line = false ij_javascript_wrap_comments = false [{*.htm,*.html,*.sht,*.shtm,*.shtml}] -ij_html_add_new_line_before_tags = body,div,p,form,h1,h2,h3 +ij_html_add_new_line_before_tags = body, div, p, form, h1, h2, h3 ij_html_align_attributes = true ij_html_align_text = false ij_html_attribute_wrap = normal ij_html_block_comment_add_space = false ij_html_block_comment_at_first_column = true ij_html_do_not_align_children_of_min_lines = 0 -ij_html_do_not_break_if_inline_tags = title,h1,h2,h3,h4,h5,h6,p -ij_html_do_not_indent_children_of_tags = html,body,thead,tbody,tfoot +ij_html_do_not_break_if_inline_tags = title, h1, h2, h3, h4, h5, h6, p +ij_html_do_not_indent_children_of_tags = html, body, thead, tbody, tfoot ij_html_enforce_quotes = false -ij_html_inline_tags = a,abbr,acronym,b,basefont,bdo,big,br,cite,cite,code,dfn,em,font,i,img,input,kbd,label,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var +ij_html_inline_tags = a, abbr, acronym, b, basefont, bdo, big, br, cite, cite, code, dfn, em, font, i, img, input, kbd, label, q, s, samp, select, small, span, strike, strong, sub, sup, textarea, tt, u, var ij_html_keep_blank_lines = 2 ij_html_keep_indents_on_empty_lines = false ij_html_keep_line_breaks = true ij_html_keep_line_breaks_in_text = true ij_html_keep_whitespaces = false -ij_html_keep_whitespaces_inside = span,pre,textarea +ij_html_keep_whitespaces_inside = span, pre, textarea ij_html_line_comment_at_first_column = true ij_html_new_line_after_last_attribute = never ij_html_new_line_before_first_attribute = never diff --git a/jsconfig.json b/jsconfig.json index 81def15..77187e1 100644 --- a/jsconfig.json +++ b/jsconfig.json @@ -1,18 +1,18 @@ { - "extends": "./.svelte-kit/tsconfig.json", - "compilerOptions": { - "allowJs": true, - "checkJs": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "sourceMap": true, - "strict": true, - "moduleResolution": "bundler" - } - // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias and https://kit.svelte.dev/docs/configuration#files - // - // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes - // from the referenced tsconfig.json - TypeScript does not merge them in + "extends": "./.svelte-kit/tsconfig.json", + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "moduleResolution": "bundler" + } + // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias and https://kit.svelte.dev/docs/configuration#files + // + // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes + // from the referenced tsconfig.json - TypeScript does not merge them in } diff --git a/manifest.json b/manifest.json index fb1f8e4..d6cdca5 100644 --- a/manifest.json +++ b/manifest.json @@ -1,14 +1,14 @@ { - "name": "Furbooru Tagging Assistant (Rewrite)", - "version": "0.0.1", - "manifest_version": 3, - "host_permissions": [ - "*://*.furbooru.org/" - ], - "action": { - "default_popup": "index.html" - }, - "permissions": [ - "storage" - ] -} \ No newline at end of file + "name": "Furbooru Tagging Assistant (Rewrite)", + "version": "0.0.1", + "manifest_version": 3, + "host_permissions": [ + "*://*.furbooru.org/" + ], + "action": { + "default_popup": "index.html" + }, + "permissions": [ + "storage" + ] +} diff --git a/package.json b/package.json index 8c5f784..116750e 100644 --- a/package.json +++ b/package.json @@ -1,26 +1,26 @@ { - "name": "furbooru-tagging-assistant", - "version": "0.0.1", - "private": true, - "scripts": { - "build": "npm run build:popup && npm run build:extension", - "build:popup": "vite build", - "build:extension": "vite build --config vite.config.extension.js", - "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json", - "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch" - }, - "devDependencies": { - "@sveltejs/adapter-auto": "^3.0.0", - "@sveltejs/adapter-static": "^3.0.1", - "@sveltejs/kit": "^2.0.0", - "@sveltejs/vite-plugin-svelte": "^3.0.0", - "@types/chrome": "^0.0.262", - "cheerio": "^1.0.0-rc.12", - "sass": "^1.71.0", - "svelte": "^4.2.7", - "svelte-check": "^3.6.0", - "typescript": "^5.0.0", - "vite": "^5.0.3" - }, - "type": "module" + "name": "furbooru-tagging-assistant", + "version": "0.0.1", + "private": true, + "scripts": { + "build": "npm run build:popup && npm run build:extension", + "build:popup": "vite build", + "build:extension": "vite build --config vite.config.extension.js", + "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/adapter-static": "^3.0.1", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "@types/chrome": "^0.0.262", + "cheerio": "^1.0.0-rc.12", + "sass": "^1.71.0", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module" } diff --git a/src/app.d.ts b/src/app.d.ts index 743f07b..c7c0ed1 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -1,13 +1,13 @@ // See https://kit.svelte.dev/docs/types#app // for information about these interfaces declare global { - namespace App { - // interface Error {} - // interface Locals {} - // interface PageData {} - // interface PageState {} - // interface Platform {} - } + namespace App { + // interface Error {} + // interface Locals {} + // interface PageData {} + // interface PageState {} + // interface Platform {} + } } export {}; diff --git a/src/app.html b/src/app.html index f273cc5..6bffe32 100644 --- a/src/app.html +++ b/src/app.html @@ -1,11 +1,11 @@ - - - - %sveltekit.head% - - -
%sveltekit.body%
- + + + + %sveltekit.head% + + +
%sveltekit.body%
+ diff --git a/src/components/layout/Footer.svelte b/src/components/layout/Footer.svelte index 37dd99e..cfbb4a2 100644 --- a/src/components/layout/Footer.svelte +++ b/src/components/layout/Footer.svelte @@ -1,19 +1,19 @@ \ No newline at end of file + footer { + background: colors.$footer; + color: colors.$footer-text; + padding: 0 24px; + font-size: 12px; + line-height: 36px; + } + diff --git a/src/components/layout/Header.svelte b/src/components/layout/Header.svelte index 55160cb..1170587 100644 --- a/src/components/layout/Header.svelte +++ b/src/components/layout/Header.svelte @@ -1,28 +1,28 @@
- Furbooru Tagging Assistant + Furbooru Tagging Assistant
\ No newline at end of file + diff --git a/src/components/ui/forms/FormContainer.svelte b/src/components/ui/forms/FormContainer.svelte index 48f95a5..6b26760 100644 --- a/src/components/ui/forms/FormContainer.svelte +++ b/src/components/ui/forms/FormContainer.svelte @@ -1,11 +1,11 @@
- +
\ No newline at end of file + form { + display: grid; + grid-template-columns: 1fr; + gap: 6px; + } + diff --git a/src/components/ui/forms/FormControl.svelte b/src/components/ui/forms/FormControl.svelte index 56b3737..fccc6c3 100644 --- a/src/components/ui/forms/FormControl.svelte +++ b/src/components/ui/forms/FormControl.svelte @@ -1,16 +1,16 @@ \ No newline at end of file + diff --git a/src/components/ui/forms/TextField.svelte b/src/components/ui/forms/TextField.svelte index 0227247..a8b6fe0 100644 --- a/src/components/ui/forms/TextField.svelte +++ b/src/components/ui/forms/TextField.svelte @@ -1,12 +1,12 @@ - \ No newline at end of file + diff --git a/src/components/ui/menu/Menu.svelte b/src/components/ui/menu/Menu.svelte index 39ddfb4..f0f481d 100644 --- a/src/components/ui/menu/Menu.svelte +++ b/src/components/ui/menu/Menu.svelte @@ -1,38 +1,38 @@ \ No newline at end of file + diff --git a/src/components/ui/menu/MenuLink.svelte b/src/components/ui/menu/MenuLink.svelte index 6216293..cd120f7 100644 --- a/src/components/ui/menu/MenuLink.svelte +++ b/src/components/ui/menu/MenuLink.svelte @@ -1,41 +1,41 @@ {#if href} - - {#if icon} - - {/if} - - + + {#if icon} + + {/if} + + {/if} \ No newline at end of file + diff --git a/src/components/web-components/TagsEditor.svelte b/src/components/web-components/TagsEditor.svelte index 5a906e4..425c1fb 100644 --- a/src/components/web-components/TagsEditor.svelte +++ b/src/components/web-components/TagsEditor.svelte @@ -1,21 +1,21 @@ - \ No newline at end of file + diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 0a62fd1..7b76c25 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,17 +1,17 @@
- +