diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 819fa57..0000000 --- a/.prettierrc +++ /dev/null @@ -1,16 +0,0 @@ -{ - "useTabs": true, - "singleQuote": true, - "trailingComma": "none", - "printWidth": 100, - "plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], - "overrides": [ - { - "files": "*.svelte", - "options": { - "parser": "svelte" - } - } - ], - "tailwindStylesheet": "./src/routes/layout.css" -} diff --git a/eslint.config.js b/eslint.config.js index d25cf1e..3d31f3e 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,11 +1,12 @@ -import prettier from 'eslint-config-prettier'; -import { fileURLToPath } from 'node:url'; import { includeIgnoreFile } from '@eslint/compat'; import js from '@eslint/js'; +import prettier from 'eslint-config-prettier'; import svelte from 'eslint-plugin-svelte'; -import { defineConfig } from 'eslint/config'; +import { defineConfig, globalIgnores } from 'eslint/config'; import globals from 'globals'; +import { fileURLToPath } from 'node:url'; import ts from 'typescript-eslint'; + import svelteConfig from './svelte.config.js'; const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url)); @@ -44,5 +45,6 @@ export default defineConfig( svelteConfig } } - } + }, + globalIgnores(['src/lib/components/ui/**/*'], 'Ignore Shadcn Component Directory') ); diff --git a/prettier.config.js b/prettier.config.js new file mode 100644 index 0000000..4eb2009 --- /dev/null +++ b/prettier.config.js @@ -0,0 +1,35 @@ +export default { + useTabs: true, + singleQuote: true, + trailingComma: 'none', + printWidth: 100, + importOrder: [ + '^svelte($|/)', + '', + '\\$app/', + '\\$lib/stores', + '\\$lib/utils', + '\\$lib/components', + '\\$lib/assets', + '\\$lib', + '^~/', + '^\\.', + '', + '' + ], + importOrderSeparation: true, + importOrderSortSpecifiers: true, + plugins: [ + 'prettier-plugin-svelte', + 'prettier-plugin-tailwindcss', + '@trivago/prettier-plugin-sort-imports' + ], + overrides: [ + { + files: '*.svelte', + options: { + parser: 'svelte' + } + } + ] +}; diff --git a/src/demo.spec.ts b/src/demo.spec.ts index e07cbbd..5d40967 100644 --- a/src/demo.spec.ts +++ b/src/demo.spec.ts @@ -1,4 +1,4 @@ -import { describe, it, expect } from 'vitest'; +import { describe, expect, it } from 'vitest'; describe('sum test', () => { it('adds 1 + 2 to equal 3', () => { diff --git a/src/lib/components/location/location-search.svelte b/src/lib/components/location/location-search.svelte index 839fdb0..c26032c 100644 --- a/src/lib/components/location/location-search.svelte +++ b/src/lib/components/location/location-search.svelte @@ -1,6 +1,8 @@ diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 7560029..57e6aad 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,6 +1,10 @@