2023-02-24 12:46:41 +03:00
|
|
|
module.exports = {
|
|
|
|
root: true,
|
|
|
|
parser: '@typescript-eslint/parser',
|
2023-05-24 12:00:21 +03:00
|
|
|
extends: [
|
|
|
|
'eslint:recommended',
|
|
|
|
'plugin:@typescript-eslint/recommended',
|
|
|
|
'plugin:svelte/recommended',
|
|
|
|
'plugin:svelte/prettier',
|
|
|
|
'prettier'
|
|
|
|
],
|
2023-06-27 15:15:14 +03:00
|
|
|
plugins: ['svelte', '@typescript-eslint', 'square-svelte-store', 'import'],
|
2023-02-24 12:46:41 +03:00
|
|
|
parserOptions: {
|
|
|
|
sourceType: 'module',
|
2023-05-24 12:00:21 +03:00
|
|
|
ecmaVersion: 2020,
|
|
|
|
project: 'tsconfig.json',
|
2023-12-23 15:07:24 +03:00
|
|
|
tsconfigRootDir: __dirname,
|
2023-05-24 12:00:21 +03:00
|
|
|
extraFileExtensions: ['.svelte']
|
2023-02-24 12:46:41 +03:00
|
|
|
},
|
2023-05-24 12:00:21 +03:00
|
|
|
overrides: [
|
|
|
|
{
|
|
|
|
files: ['*.svelte'],
|
|
|
|
parser: 'svelte-eslint-parser',
|
|
|
|
parserOptions: {
|
|
|
|
parser: '@typescript-eslint/parser'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
2023-02-24 12:46:41 +03:00
|
|
|
env: {
|
|
|
|
browser: true,
|
|
|
|
es2017: true,
|
|
|
|
node: true
|
2023-02-24 13:00:17 +03:00
|
|
|
},
|
|
|
|
rules: {
|
2023-08-04 00:40:09 +03:00
|
|
|
'import/no-cycle': 'error',
|
2024-01-29 11:42:14 +03:00
|
|
|
'import/order': [
|
|
|
|
'error',
|
|
|
|
{
|
|
|
|
alphabetize: { order: 'asc', orderImportKind: 'asc', caseInsensitive: false },
|
|
|
|
groups: ['index', 'sibling', 'parent', 'internal', 'external', 'builtin', 'object', 'type'],
|
|
|
|
'newlines-between': 'never'
|
|
|
|
}
|
|
|
|
],
|
|
|
|
'import/no-unresolved': [
|
|
|
|
'error',
|
|
|
|
{
|
|
|
|
ignore: ['^\\$app', '^\\$env']
|
|
|
|
}
|
|
|
|
],
|
2024-03-10 22:16:36 +03:00
|
|
|
'func-style': [2, 'declaration'],
|
2023-05-24 12:00:21 +03:00
|
|
|
'svelte/no-at-html-tags': 'off',
|
2023-02-24 13:00:17 +03:00
|
|
|
'@typescript-eslint/no-namespace': 'off',
|
|
|
|
'@typescript-eslint/no-empty-function': 'off',
|
2023-05-12 13:17:06 +03:00
|
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
2023-06-20 14:08:00 +03:00
|
|
|
'@typescript-eslint/no-unused-vars': [
|
2023-11-29 01:28:15 +03:00
|
|
|
'error', // or "error"
|
2023-06-20 14:08:00 +03:00
|
|
|
{
|
|
|
|
argsIgnorePattern: '^_',
|
|
|
|
varsIgnorePattern: '^_',
|
|
|
|
caughtErrorsIgnorePattern: '^_'
|
|
|
|
}
|
2024-04-12 22:31:40 +03:00
|
|
|
],
|
|
|
|
'no-return-await': 'off', // Required to be off for @typescript-eslint/return-await
|
2024-04-16 22:11:53 +03:00
|
|
|
'@typescript-eslint/return-await': ['error', 'always'],
|
2024-04-12 22:56:29 +03:00
|
|
|
'@typescript-eslint/promise-function-async': 'error',
|
|
|
|
'@typescript-eslint/await-thenable': 'error'
|
2023-06-27 15:15:14 +03:00
|
|
|
},
|
|
|
|
settings: {
|
|
|
|
'import/extensions': ['.ts'],
|
|
|
|
'import/parsers': {
|
|
|
|
'@typescript-eslint/parser': ['.ts']
|
|
|
|
},
|
|
|
|
'import/resolver': {
|
|
|
|
typescript: {
|
|
|
|
project: ['./tsconfig.json', './.svelte-kit/tsconfig.json']
|
|
|
|
}
|
|
|
|
}
|
2023-02-24 12:46:41 +03:00
|
|
|
}
|
|
|
|
};
|