Skip to content

Commit

Permalink
fix: cleanup @typescript-eslint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
ndom91 committed Oct 21, 2024
1 parent 4bb0139 commit f90d79e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 27 deletions.
42 changes: 16 additions & 26 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import prettier from 'eslint-config-prettier';
import js from '@eslint/js';
import svelte from 'eslint-plugin-svelte';
import globals from 'globals';
import pluginImportX from 'eslint-plugin-import-x';
import ts from 'typescript-eslint';
import pluginImportX from 'eslint-plugin-import-x';

export default ts.config(
js.configs.recommended,
Expand All @@ -16,14 +16,24 @@ export default ts.config(
globals: {
...globals.browser,
...globals.node
},
parserOptions: {
projectService: true,
allowDefaultProject: ['*.svelte'],
extraFileExtensions: ['.svelte']
}
},
rules: {
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_'
}
],
// '@typescript-eslint/return-await': ['error', 'always'],
// '@typescript-eslint/promise-function-async': 'error',
// '@typescript-eslint/await-thenable': 'error',

eqeqeq: ['error', 'always'],
'import-x/no-cycle': 'error',
'import-x/order': [
Expand All @@ -34,7 +44,6 @@ export default ts.config(
orderImportKind: 'asc',
caseInsensitive: false
},

groups: [
'index',
'sibling',
Expand All @@ -45,37 +54,18 @@ export default ts.config(
'object',
'type'
],

'newlines-between': 'never'
}
],

'import-x/no-unresolved': [
'error',
{
ignore: ['^\\$app', '^\\$env']
}
],

'import-x/no-relative-packages': 'error', // Don't allow packages to have relative imports between each other
'func-style': [2, 'declaration'],
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-explicit-any': 'off',

'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_'
}
],

'no-return-await': 'off',
'@typescript-eslint/return-await': ['error', 'always'],
'@typescript-eslint/promise-function-async': 'error',
'@typescript-eslint/await-thenable': 'error',
'svelte/no-at-html-tags': 'off'
},
settings: {
Expand Down
4 changes: 3 additions & 1 deletion packages/ui/src/stories/modal/DemoModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
<Button
onclick={() => {
modal?.show();
}}>Show</Button
}}
>
Show
</Button>
<Modal bind:this={modal} {...args} onSubmit={() => console.log('submitted')}>
A branch with the same name already exists. Do you want to merge this branch into the current
branch?
Expand Down

0 comments on commit f90d79e

Please sign in to comment.