[READ-ONLY] Mirror of https://github.com/probablykasper/svelte-template. Svelte + Vite + HMR + TypeScript + Preprocessor support
svelte template
0

Configure Feed

Select the types of activity you want to include in your feed.

Add Prettier linting

Kasper (Jan 8, 2021, 6:26 PM +0100) b6aa9476 ce9f861a

+46 -2
+18
.prettierrc.json
··· 1 + { 2 + "printWidth": 100, 3 + "tabWidth": 2, 4 + "useTabs": false, 5 + "semi": false, 6 + "singleQuote": true, 7 + "trailingComma": "es5", 8 + "arrowParens": "always", 9 + "bracketSpacing": true, 10 + "htmlWhitespaceSensitivity": "strict", 11 + "endOfLine": "lf", 12 + "embeddedLanguageFormatting": "auto", 13 + "svelteSortOrder": "options-scripts-styles-markup", 14 + "svelteStrictMode": false, 15 + "svelteAllowShorthand": true, 16 + "svelteBracketNewLine": false, 17 + "svelteIndentScriptAndStyle": true 18 + }
+4
.vscode/settings.json
··· 1 + { 2 + "editor.defaultFormatter": "esbenp.prettier-vscode", 3 + "editor.formatOnSave": true 4 + }
+8 -1
README.md
··· 1 1 # Svelte template 2 2 3 3 Features: 4 + 4 5 - **Svelte** 5 6 - **TypeScript** 6 7 - **Snowpack** for fast builds ··· 8 9 - **Preprocessor support** through `svelte-preprocess` 9 10 - Pug and Sass are installed default 10 11 - **Hot module replacement** 12 + - **Prettier** 11 13 12 14 Limitations: 13 15 14 16 - Sourcemaps are supported for `.ts` and `.svelte` files, but not for the preprocessors used inside `.svelte` files. 15 - - Linting 17 + - Linting for code-quality rules is not supported. 16 18 17 19 ## Recommended VSCode extensions 18 20 19 21 - `svelte.svelte-vscode` for Svelte 20 22 - `syler.sass-indented` for Sass 23 + - `esbenp.prettier-vscode` for Prettier 21 24 22 25 ## Commands 23 26 ··· 28 31 ### `npm run build` 29 32 30 33 Builds and bundles into the `build/` folder 34 + 35 + ### `npm run lint` 36 + 37 + Lint the project
+12
package-lock.json
··· 2192 2192 "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", 2193 2193 "dev": true 2194 2194 }, 2195 + "prettier": { 2196 + "version": "2.2.1", 2197 + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", 2198 + "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", 2199 + "dev": true 2200 + }, 2201 + "prettier-plugin-svelte": { 2202 + "version": "2.0.3", 2203 + "resolved": "https://registry.npmjs.org/prettier-plugin-svelte/-/prettier-plugin-svelte-2.0.3.tgz", 2204 + "integrity": "sha512-DU31w5Ko2qCEAKV+z86oHeMCXH3OhL2DqXZPc8iJgqKXneKj33BkStrvkR4P4tkUJFBiEgnT4SIPObc5ntcQ4g==", 2205 + "dev": true 2206 + }, 2195 2207 "promise": { 2196 2208 "version": "7.3.1", 2197 2209 "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
+4 -1
package.json
··· 2 2 "private": true, 3 3 "scripts": { 4 4 "start": "snowpack dev", 5 - "build": "snowpack build --clean" 5 + "build": "snowpack build --clean", 6 + "lint": "prettier --write *.js *.json src public types" 6 7 }, 7 8 "devDependencies": { 8 9 "@snowpack/plugin-svelte": "^3.4.1", 9 10 "@snowpack/plugin-typescript": "^1.1.1", 10 11 "@types/snowpack-env": "^2.3.3", 12 + "prettier": "^2.2.1", 13 + "prettier-plugin-svelte": "^2.0.3", 11 14 "pug": "^3.0.0", 12 15 "sass": "^1.32.2", 13 16 "snowpack": "^2.18.5",