Skip to content

Commit

Permalink
chore: enable more svelte lints
Browse files Browse the repository at this point in the history
  • Loading branch information
lishaduck committed Jan 20, 2025
1 parent 8180c17 commit 8eacd56
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions packages/deputy/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,55 @@ function svelteConfig({
},
rules: {
"@typescript-eslint/no-unsafe-call": off,
"prefer-const": off,
"storybook/default-exports": off,

// Possible Errors
"svelte/infinite-reactive-loop": warn,
"svelte/no-dom-manipulating": warn,
"svelte/no-dupe-on-directives": warn,
"svelte/no-dupe-use-directives": warn,
"svelte/no-raw-special-elements": warn,
"svelte/no-reactive-reassign": warn,

// Security Vulnerability
"svelte/no-target-blank": warn,

// Best Practices
"svelte/block-lang": [warn, { script: "ts" }],
"svelte/button-has-type": warn,
"svelte/no-ignored-unsubscribe": warn,
"svelte/no-immutable-reactive-statements": warn,
"svelte/no-inline-styles": warn,
"svelte/no-inspect": warn,
"svelte/no-reactive-functions": warn,
"svelte/no-reactive-literals": warn,
"svelte/no-svelte-internal": warn,
"svelte/no-useless-children-snippet": warn,
"svelte/no-useless-mustaches": warn,
"svelte/prefer-const": warn,
"svelte/prefer-destructured-store-props": warn,
"svelte/require-each-key": warn,
"svelte/require-event-dispatcher-types": warn,
"svelte/require-optimized-style-attribute": warn,
"svelte/require-stores-init": warn,
"svelte/valid-each-key": warn,

// Stylistic Issues
"svelte/consistent-selector-style": warn,
"svelte/derived-has-same-inputs-outputs": warn,
"svelte/html-self-closing": warn,
"svelte/no-extra-reactive-curlies": warn,
"svelte/prefer-class-directive": warn,
"svelte/prefer-style-directive": warn,
"svelte/shorthand-attribute": warn,
"svelte/shorthand-directive": warn,
"svelte/sort-attributes": warn,
"svelte/spaced-html-comment": warn,

// SvelteKit
"svelte/no-export-load-in-svelte-module-in-kit-pages": warn,
"svelte/no-navigation-without-base": warn,
},
},
]);
Expand Down

0 comments on commit 8eacd56

Please sign in to comment.