Skip to content

Commit

Permalink
Advance initial setup, improve configs
Browse files Browse the repository at this point in the history
  • Loading branch information
emmbm committed Jan 8, 2024
1 parent ed24cb8 commit 976da57
Show file tree
Hide file tree
Showing 14 changed files with 459 additions and 25 deletions.
25 changes: 17 additions & 8 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,31 +1,40 @@
/** @type { import("eslint").Linter.Config } */
/**
* @type {import('eslint').Linter.Config}
*/
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:svelte/recommended',
'prettier'
'prettier',
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
extraFileExtensions: ['.svelte']
extraFileExtensions: ['.svelte'],
},
env: {
browser: true,
es2017: true,
node: true
node: true,
},
overrides: [
{
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser'
}
}
]
parser: '@typescript-eslint/parser',
},
},
],
rules: {
'curly': ['error', 'all'],
'@typescript-eslint/no-unused-vars': [
'error',
{ ignoreRestSiblings: true, destructuredArrayIgnorePattern: '^_' },
],
},
};
36 changes: 32 additions & 4 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,36 @@
{
"useTabs": true,
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"trailingComma": "none",
"trailingComma": "es5",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
"proseWrap": "always",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "always",
"svelteIndentScriptAndStyle": true,
"svelteAllowShorthand": true,
"jsdocDescriptionWithDot": true,
"jsdocPreferCodeFences": true,
"jsdocCommentLineStrategy": "multiline",
"tsdoc": true,
"quoteProps": "consistent",
"embeddedLanguageFormatting": "auto",
"htmlWhitespaceSensitivity": "ignore",
"plugins": [
"prettier-plugin-svelte",
"./node_modules/prettier-plugin-jsdoc/dist/index.js"
],
"pluginSearchDirs": [
"."
],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@inlang/paraglide-js": "1.1.0",
"@inlang/paraglide-js-adapter-vite": "^1.2.0",
"@sveltejs/adapter-static": "^3.0.1",
"@sveltejs/kit": "^2.0.6",
"@sveltejs/kit": "^2.0.7",
"@sveltejs/vite-plugin-svelte": "^3.0.1",
"@types/eslint": "8.56.0",
"@typescript-eslint/eslint-plugin": "^6.18.0",
Expand All @@ -25,6 +25,7 @@
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.35.1",
"prettier": "^3.1.1",
"prettier-plugin-jsdoc": "^1.3.0",
"prettier-plugin-svelte": "^3.1.2",
"svelte": "5.0.0-next.29",
"svelte-check": "^3.6.2",
Expand Down
Loading

0 comments on commit 976da57

Please sign in to comment.