fix: renable type-aware linting rules

This commit is contained in:
ndom91 2024-10-26 15:54:38 +02:00 committed by Nico Domino
parent 5c6151a6ae
commit e681aedc36
2 changed files with 10 additions and 5 deletions

View File

@ -1,6 +1,4 @@
<script lang="ts">
/* eslint svelte/valid-compile: "off" */
/* - Required because spreading in prop destructuring still throws eslint errors */
import { renderers } from '$lib/utils/markdownRenderers';
import type { Tokens, Token } from 'marked';
import type { Component } from 'svelte';

View File

@ -16,6 +16,9 @@ export default ts.config(
globals: {
...globals.browser,
...globals.node
},
parserOptions: {
projectService: true
}
},
rules: {
@ -30,9 +33,9 @@ export default ts.config(
caughtErrorsIgnorePattern: '^_'
}
],
// '@typescript-eslint/return-await': ['error', 'always'],
// '@typescript-eslint/promise-function-async': 'error',
// '@typescript-eslint/await-thenable': 'error',
'@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',
@ -99,6 +102,10 @@ export default ts.config(
'import-x': pluginImportX
}
},
{
files: ['**/*.svelte'],
...ts.configs.disableTypeChecked
},
{
files: ['**/*.svelte'],
languageOptions: {