configure plugin to detect TS dep cycles

This commit is contained in:
Kiril Videlov 2023-06-27 14:15:14 +02:00 committed by Kiril Videlov
parent daad336602
commit 0ad618159b
3 changed files with 837 additions and 1 deletions

View File

@ -8,7 +8,7 @@ module.exports = {
'plugin:svelte/prettier',
'prettier'
],
plugins: ['svelte', '@typescript-eslint', 'square-svelte-store'],
plugins: ['svelte', '@typescript-eslint', 'square-svelte-store', 'import'],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
@ -30,6 +30,7 @@ module.exports = {
node: true
},
rules: {
'import/no-cycle': 'error',
'svelte/no-at-html-tags': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-empty-function': 'off',
@ -43,5 +44,16 @@ module.exports = {
caughtErrorsIgnorePattern: '^_'
}
]
},
settings: {
'import/extensions': ['.ts'],
'import/parsers': {
'@typescript-eslint/parser': ['.ts']
},
'import/resolver': {
typescript: {
project: ['./tsconfig.json', './.svelte-kit/tsconfig.json']
}
}
}
};

View File

@ -57,6 +57,8 @@
"diff-match-patch": "^1.0.5",
"eslint": "^8.41.0",
"eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-square-svelte-store": "^1.0.0",
"eslint-plugin-svelte": "^2.29.0",
"histoire": "^0.16.1",

File diff suppressed because it is too large Load Diff