Skip to content

Commit

Permalink
Update tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
zerodevx committed Aug 10, 2023
1 parent 8d88228 commit 0e3610a
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 27 deletions.
12 changes: 4 additions & 8 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
module.exports = {
root: true,
extends: ['eslint:recommended', 'prettier'],
plugins: ['svelte3'],
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
extends: ['eslint:recommended', 'plugin:svelte/recommended', 'prettier'],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2022
ecmaVersion: 2020,
extraFileExtensions: ['.svelte']
},
env: {
browser: true,
es2017: true,
node: true
},
rules: {
'no-tabs': 'error',
'no-unexpected-multiline': 'error'
}
rules: { 'no-tabs': 'error', 'no-unexpected-multiline': 'error' }
}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
engine-strict=true
resolution-mode=highest
2 changes: 2 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"useTabs": false,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
Expand All @@ -7,5 +8,6 @@
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }],
"semi": false,
"proseWrap": "always",
"svelteSortOrder": "options-scripts-markup-styles",
"svelteIndentScriptAndStyle": false
}
8 changes: 1 addition & 7 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": false
"moduleResolution": "NodeNext"
}
// 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
}
13 changes: 6 additions & 7 deletions svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import preprocess from 'svelte-preprocess'
import { vitePreprocess } from '@sveltejs/kit/vite'
import adapter from '@sveltejs/adapter-static'
import { readFileSync } from 'node:fs'

const { version: name } = JSON.parse(readFileSync(new URL('package.json', import.meta.url), 'utf8'))
const dev = process.env.NODE_ENV === 'development'

/** @type {import('@sveltejs/kit').Config} */
Expand All @@ -11,13 +13,10 @@ const config = {
}),
paths: {
base: dev ? '' : '/svelte-img'
}
},
version: { name }
},
preprocess: [
preprocess({
postcss: true
})
]
preprocess: [vitePreprocess({})]
}

export default config
8 changes: 3 additions & 5 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { sveltekit } from '@sveltejs/kit/vite'
import { defineConfig } from 'vite'
import { imagetools } from './src/lib/vite'

/** @type {import('vite').UserConfig} */
const config = {
export default defineConfig({
plugins: [sveltekit(), imagetools()]
}

export default config
})

0 comments on commit 0e3610a

Please sign in to comment.