Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
MatsDK committed May 28, 2023
1 parent 98d2eb7 commit d75dd94
Show file tree
Hide file tree
Showing 14 changed files with 270 additions and 272 deletions.
78 changes: 39 additions & 39 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
/** @type {import("eslint").Linter.Config} */
const config = {
parser: '@typescript-eslint/parser',
env: {
node: true,
browser: true,
},
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'eslint:recommended',
// 'plugin:dprint/recommended',
],
parserOptions: {
ecmaVersion: 'latest',
tsconfigRootDir: __dirname,
project: [
'./tsconfig.json',
'./example/tsconfig.json',
],
},
rules: {
// 'dprint/dprint': [
// 'error',
// {
// config: {},
// },
// ],
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
},
plugins: [
'@typescript-eslint',
],
ignorePatterns: ['node_modules', 'dist', 'taurpc', 'target', 'test'],
parser: '@typescript-eslint/parser',
env: {
node: true,
browser: true,
},
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'eslint:recommended',
// 'plugin:dprint/recommended',
],
parserOptions: {
ecmaVersion: 'latest',
tsconfigRootDir: __dirname,
project: [
'./tsconfig.json',
'./example/tsconfig.json',
],
},
rules: {
// 'dprint/dprint': [
// 'error',
// {
// config: {},
// },
// ],
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
},
plugins: [
'@typescript-eslint',
],
ignorePatterns: ['node_modules', 'dist', 'taurpc', 'target', 'test'],
}

module.exports = config
8 changes: 4 additions & 4 deletions .vscode/extension.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"dprint.dprint"
]
"recommendations": [
"dbaeumer.vscode-eslint",
"dprint.dprint"
]
}
16 changes: 8 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"editor.defaultFormatter": "dprint.dprint",
"dprint.path": "node_modules/dprint/dprint",
"typescript.preferences.importModuleSpecifierEnding": "js",
"typescript.tsdk": "node_modules\\typescript\\lib",
"rust-analyzer.linkedProjects": [
"taurpc/Cargo.toml",
"example/src-tauri/Cargo.toml"
]
"editor.defaultFormatter": "dprint.dprint",
"dprint.path": "node_modules/dprint/dprint",
"typescript.preferences.importModuleSpecifierEnding": "js",
"typescript.tsdk": "node_modules\\typescript\\lib",
"rust-analyzer.linkedProjects": [
"taurpc/Cargo.toml",
"example/src-tauri/Cargo.toml"
]
}
54 changes: 26 additions & 28 deletions dprint.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
{
"incremental": true,
"useTabs": true,
"indentWidth": 2,
"lineWidth": 100,
"typescript": {
"quoteStyle": "preferSingle",
"semiColons": "asi"
},
"exec": {
"associations": "**/*.{rs}",
"rustfmt": "rustfmt --edition 2021",
"rustfmt.associations": "**/*.rs"
},
"includes": [
"**/*.{ts,tsx,js,jsx,cjs,mjs,json,json5,md,yaml,rs}"
],
"excludes": [
"**/node_modules",
"pnpm-lock.yaml",
"dist",
"**/target"
],
"plugins": [
"https://plugins.dprint.dev/typescript-0.78.0.wasm",
"https://plugins.dprint.dev/json-0.16.0.wasm",
"https://plugins.dprint.dev/markdown-0.14.1.wasm",
"https://plugins.dprint.dev/exec-0.3.5.json@d687dda57be0fe9a0088ccdaefa5147649ff24127d8b3ea227536c68ee7abeab"
]
"incremental": true,
"lineWidth": 100,
"typescript": {
"quoteStyle": "preferSingle",
"semiColons": "asi"
},
"exec": {
"associations": "**/*.{rs}",
"rustfmt": "rustfmt --edition 2021",
"rustfmt.associations": "**/*.rs"
},
"includes": [
"**/*.{ts,tsx,js,jsx,cjs,mjs,json,json5,md,yaml,rs}"
],
"excludes": [
"**/node_modules",
"pnpm-lock.yaml",
"dist",
"**/target"
],
"plugins": [
"https://plugins.dprint.dev/typescript-0.78.0.wasm",
"https://plugins.dprint.dev/json-0.16.0.wasm",
"https://plugins.dprint.dev/markdown-0.14.1.wasm",
"https://plugins.dprint.dev/exec-0.3.5.json@d687dda57be0fe9a0088ccdaefa5147649ff24127d8b3ea227536c68ee7abeab"
]
}
10 changes: 5 additions & 5 deletions example/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"recommendations": [
"svelte.svelte-vscode",
"tauri-apps.tauri-vscode",
"rust-lang.rust-analyzer"
]
"recommendations": [
"svelte.svelte-vscode",
"tauri-apps.tauri-vscode",
"rust-lang.rust-analyzer"
]
}
52 changes: 26 additions & 26 deletions example/package.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"name": "taurpc-example",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-check --tsconfig ./tsconfig.json",
"tauri": "tauri"
},
"dependencies": {
"@tauri-apps/api": "^1.3.0"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^2.0.0",
"@tauri-apps/cli": "^1.3.1",
"@tsconfig/svelte": "^3.0.0",
"@types/node": "^18.7.10",
"svelte": "^3.54.0",
"svelte-check": "^3.0.0",
"svelte-preprocess": "^5.0.0",
"tslib": "^2.4.1",
"typescript": "^5.0.4",
"vite": "^4.2.1"
}
"name": "taurpc-example",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-check --tsconfig ./tsconfig.json",
"tauri": "tauri"
},
"dependencies": {
"@tauri-apps/api": "^1.3.0"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^2.0.0",
"@tauri-apps/cli": "^1.3.1",
"@tsconfig/svelte": "^3.0.0",
"@types/node": "^18.7.10",
"svelte": "^3.54.0",
"svelte-check": "^3.0.0",
"svelte-preprocess": "^5.0.0",
"tslib": "^2.4.1",
"typescript": "^5.0.4",
"vite": "^4.2.1"
}
}
80 changes: 40 additions & 40 deletions example/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
{
"build": {
"beforeDevCommand": "pnpm dev",
"beforeBuildCommand": "pnpm build",
"devPath": "http://localhost:1420",
"distDir": "../dist",
"withGlobalTauri": false
},
"package": {
"productName": "taurpc-example",
"version": "0.0.0"
},
"tauri": {
"allowlist": {
"all": false,
"shell": {
"all": false,
"open": true
}
},
"bundle": {
"active": true,
"targets": "all",
"identifier": "taurpc",
"icon": [
"icons/icon.ico"
]
},
"security": {
"csp": null
},
"windows": [
{
"fullscreen": false,
"resizable": true,
"title": "taurpc-example",
"width": 800,
"height": 600
}
]
}
"build": {
"beforeDevCommand": "pnpm dev",
"beforeBuildCommand": "pnpm build",
"devPath": "http://localhost:1420",
"distDir": "../dist",
"withGlobalTauri": false
},
"package": {
"productName": "taurpc-example",
"version": "0.0.0"
},
"tauri": {
"allowlist": {
"all": false,
"shell": {
"all": false,
"open": true
}
},
"bundle": {
"active": true,
"targets": "all",
"identifier": "taurpc",
"icon": [
"icons/icon.ico"
]
},
"security": {
"csp": null
},
"windows": [
{
"fullscreen": false,
"resizable": true,
"title": "taurpc-example",
"width": 800,
"height": 600
}
]
}
}
2 changes: 1 addition & 1 deletion example/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import App from './App.svelte'

const app = new App({
target: document.getElementById('app'),
target: document.getElementById('app'),
})

export default app
52 changes: 26 additions & 26 deletions example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
{
"extends": "@tsconfig/svelte/tsconfig.json",
"compilerOptions": {
"ignoreDeprecations": "5.0",
"target": "ESNext",
"useDefineForClassFields": true,
"moduleResolution": "nodenext",
"module": "ESNext",
"resolveJsonModule": true,
"baseUrl": ".",
/**
"extends": "@tsconfig/svelte/tsconfig.json",
"compilerOptions": {
"ignoreDeprecations": "5.0",
"target": "ESNext",
"useDefineForClassFields": true,
"moduleResolution": "nodenext",
"module": "ESNext",
"resolveJsonModule": true,
"baseUrl": ".",
/**
* Typecheck JS in `.svelte` and `.js` files by default.
* Disable checkJs if you'd like to use dynamic types in JS.
* Note that setting allowJs false does not prevent the use
* of JS in `.svelte` files.
*/
"allowJs": true,
"checkJs": true,
"isolatedModules": true
},
"include": [
"src/**/*.d.ts",
"src/**/*.ts",
"src/**/*.js",
"src/**/*.svelte",
"vite.config.ts"
],
"references": [
{
"path": "./tsconfig.node.json"
}
]
"allowJs": true,
"checkJs": true,
"isolatedModules": true
},
"include": [
"src/**/*.d.ts",
"src/**/*.ts",
"src/**/*.js",
"src/**/*.svelte",
"vite.config.ts"
],
"references": [
{
"path": "./tsconfig.node.json"
}
]
}
Loading

0 comments on commit d75dd94

Please sign in to comment.