mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-29 12:33:49 +03:00
6ee895832c
See: https://stackoverflow.com/questions/64933543/parsing-error-cannot-read-file-tsconfig-json-eslint
60 lines
1.3 KiB
JavaScript
60 lines
1.3 KiB
JavaScript
module.exports = {
|
|
root: true,
|
|
parser: '@typescript-eslint/parser',
|
|
extends: [
|
|
'eslint:recommended',
|
|
'plugin:@typescript-eslint/recommended',
|
|
'plugin:svelte/recommended',
|
|
'plugin:svelte/prettier',
|
|
'prettier'
|
|
],
|
|
plugins: ['svelte', '@typescript-eslint', 'square-svelte-store', 'import'],
|
|
parserOptions: {
|
|
sourceType: 'module',
|
|
ecmaVersion: 2020,
|
|
project: 'tsconfig.json',
|
|
tsconfigRootDir: __dirname,
|
|
extraFileExtensions: ['.svelte']
|
|
},
|
|
overrides: [
|
|
{
|
|
files: ['*.svelte'],
|
|
parser: 'svelte-eslint-parser',
|
|
parserOptions: {
|
|
parser: '@typescript-eslint/parser'
|
|
}
|
|
}
|
|
],
|
|
env: {
|
|
browser: true,
|
|
es2017: true,
|
|
node: true
|
|
},
|
|
rules: {
|
|
'import/no-cycle': 'error',
|
|
'svelte/no-at-html-tags': 'off',
|
|
'@typescript-eslint/no-namespace': 'off',
|
|
'@typescript-eslint/no-empty-function': 'off',
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'error', // or "error"
|
|
{
|
|
argsIgnorePattern: '^_',
|
|
varsIgnorePattern: '^_',
|
|
caughtErrorsIgnorePattern: '^_'
|
|
}
|
|
]
|
|
},
|
|
settings: {
|
|
'import/extensions': ['.ts'],
|
|
'import/parsers': {
|
|
'@typescript-eslint/parser': ['.ts']
|
|
},
|
|
'import/resolver': {
|
|
typescript: {
|
|
project: ['./tsconfig.json', './.svelte-kit/tsconfig.json']
|
|
}
|
|
}
|
|
}
|
|
};
|