From f61b8e24dd02bb9ae3641ed284da818a6b10209b Mon Sep 17 00:00:00 2001 From: Mircea Roata Date: Mon, 12 Feb 2024 18:34:36 +0200 Subject: [PATCH] Add some more linting rules --- frontend/.eslintrc.cjs | 4 ++- frontend/postcss.config.cjs | 2 +- frontend/src/App.svelte | 26 ++++++++--------- frontend/src/lib/components/Markdown.svelte | 4 +-- .../lib/components/ResponsiveButton.svelte | 4 +-- frontend/src/lib/components/Select.svelte | 4 +-- frontend/src/lib/components/TitleBar.svelte | 4 +-- .../announcements/Announcement.svelte | 2 +- .../announcements/AnnouncementsBar.svelte | 6 ++-- .../components/left-bar/LaunchButton.svelte | 16 +++++------ .../lib/components/left-bar/LeftBar.svelte | 18 ++++++------ .../lib/components/left-bar/Settings.svelte | 10 +++---- .../lib/components/left-bar/Updates.svelte | 6 ++-- .../components/mod-details/ModDetails.svelte | 28 +++++++++---------- .../modals/ExternalInstallMod.svelte | 4 +-- .../components/modals/ServerManager.svelte | 8 +++--- .../lib/components/modals/modalsRegistry.ts | 6 ++-- .../modals/profiles/ImportProfile.svelte | 2 +- .../modals/profiles/RenameProfile.svelte | 2 +- .../modals/smmUpdate/SMMUpdateDownload.svelte | 4 +-- .../modals/updates/UpdatesModal.svelte | 8 +++--- .../lib/components/mods-list/ModsList.svelte | 12 ++++---- .../mods-list/ModsListFilters.svelte | 2 +- .../components/mods-list/ModsListItem.svelte | 22 +++++++-------- frontend/src/lib/core/graphql.ts | 4 +-- frontend/src/lib/store/ficsitCLIStore.ts | 6 ++-- frontend/src/lib/store/modFiltersStore.ts | 6 ++-- frontend/src/lib/store/settingsStore.ts | 6 ++-- frontend/src/lib/store/skeletonExtensions.ts | 2 +- frontend/src/lib/store/smmUpdateStore.ts | 2 +- frontend/src/lib/utils/modCompatibility.ts | 4 +-- frontend/tailwind.config.ts | 3 +- frontend/vite.config.ts | 2 +- 33 files changed, 120 insertions(+), 119 deletions(-) diff --git a/frontend/.eslintrc.cjs b/frontend/.eslintrc.cjs index 3390dc63..f6ec37b8 100644 --- a/frontend/.eslintrc.cjs +++ b/frontend/.eslintrc.cjs @@ -76,9 +76,11 @@ module.exports = { '@stylistic/quote-props': ['error', 'as-needed', { keywords: false, unnecessary: true, numbers: false }], '@stylistic/semi': ['error', 'always'], '@stylistic/comma-dangle': ['error', 'always-multiline'], + '@stylistic/comma-spacing': 'error', '@stylistic/object-curly-spacing': ['error', 'always'], // imports - 'import/order': ['error', { 'newlines-between': 'always' }], + 'sort-imports': ['error', { ignoreDeclarationSort: true }], + 'import/order': ['error', { 'newlines-between': 'always', alphabetize: { order: 'asc' } }], 'import/newline-after-import': ['error'], 'import/no-duplicates': ['error'], }, diff --git a/frontend/postcss.config.cjs b/frontend/postcss.config.cjs index f51f4c51..b315cbcd 100644 --- a/frontend/postcss.config.cjs +++ b/frontend/postcss.config.cjs @@ -1,7 +1,7 @@ +const importUrl = require('postcss-import-url'); const postcssPresetEnv = require('postcss-preset-env'); const tailwindCSS = require('tailwindcss'); const tailwindCSSNesting = require('tailwindcss/nesting'); -const importUrl = require('postcss-import-url'); module.exports = { plugins: [ diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index 1f95fa48..ab124c63 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -1,25 +1,25 @@
diff --git a/frontend/src/lib/components/mods-list/ModsListItem.svelte b/frontend/src/lib/components/mods-list/ModsListItem.svelte index 308ea5c5..049f2c6b 100644 --- a/frontend/src/lib/components/mods-list/ModsListItem.svelte +++ b/frontend/src/lib/components/mods-list/ModsListItem.svelte @@ -1,24 +1,24 @@