33 lines
830 B
JavaScript
33 lines
830 B
JavaScript
import tseslintPlugin from '@typescript-eslint/eslint-plugin';
|
|
import tseslintParser from '@typescript-eslint/parser';
|
|
|
|
export default [
|
|
{
|
|
ignores: ['**/dist/**', '**/node_modules/**', '**/coverage/**'],
|
|
},
|
|
{
|
|
files: ['**/*.ts'],
|
|
languageOptions: {
|
|
parser: tseslintParser,
|
|
parserOptions: {
|
|
projectService: true,
|
|
tsconfigRootDir: import.meta.dirname,
|
|
},
|
|
},
|
|
plugins: {
|
|
'@typescript-eslint': tseslintPlugin,
|
|
},
|
|
rules: {
|
|
...tseslintPlugin.configs['recommended-type-checked'].rules,
|
|
...tseslintPlugin.configs['stylistic-type-checked'].rules,
|
|
'@typescript-eslint/consistent-type-imports': [
|
|
'error',
|
|
{
|
|
prefer: 'type-imports',
|
|
},
|
|
],
|
|
'@typescript-eslint/no-floating-promises': 'error',
|
|
},
|
|
},
|
|
];
|