mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-15 19:30:38 +08:00
Add a few more eslint rules
This commit is contained in:
+31
-1
@@ -24,7 +24,7 @@
|
||||
],
|
||||
"rules": {
|
||||
"indent": ["error", 2, { "SwitchCase": 1 }],
|
||||
"semi": "off", // We use the typescript-specific rule as it's more accurate.
|
||||
"semi": "off",
|
||||
"curly": ["error", "multi-line", "consistent"],
|
||||
"keyword-spacing": ["error"],
|
||||
"no-trailing-spaces": ["error"],
|
||||
@@ -34,6 +34,36 @@
|
||||
"asyncArrow": "always"
|
||||
}],
|
||||
"eol-last": ["error"],
|
||||
"key-spacing": ["error"],
|
||||
"@typescript-eslint/type-annotation-spacing": ["error"],
|
||||
"@typescript-eslint/naming-convention": [
|
||||
"error",
|
||||
{
|
||||
"selector": "enumMember",
|
||||
"format": ["PascalCase"]
|
||||
},
|
||||
{
|
||||
"selector": "objectLiteralProperty",
|
||||
"format": ["PascalCase", "camelCase"]
|
||||
},
|
||||
{
|
||||
"selector": "default",
|
||||
"format": ["camelCase"],
|
||||
"leadingUnderscore": "allow",
|
||||
"trailingUnderscore": "allow"
|
||||
},
|
||||
{
|
||||
"selector": "variable",
|
||||
"modifiers": ["const"],
|
||||
"format": ["camelCase", "PascalCase", "UPPER_CASE"],
|
||||
"leadingUnderscore": "allow",
|
||||
"trailingUnderscore": "allow"
|
||||
},
|
||||
{
|
||||
"selector": "typeLike",
|
||||
"format": ["PascalCase"]
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/semi": ["error"],
|
||||
"@typescript-eslint/member-delimiter-style": [
|
||||
|
||||
+2
-2
@@ -4,8 +4,8 @@ import svelte from "@sveltejs/vite-plugin-svelte";
|
||||
import rewriteAll from "vite-plugin-rewrite-all";
|
||||
|
||||
const config: UserConfig = {
|
||||
optimizeDeps:{
|
||||
exclude:['svelte-routing']
|
||||
optimizeDeps: {
|
||||
exclude: ['svelte-routing']
|
||||
},
|
||||
plugins: [svelte(), rewriteAll()],
|
||||
resolve: {
|
||||
|
||||
Reference in New Issue
Block a user