2022-11-06 13:50:39 +01:00
|
|
|
module.exports = {
|
2022-11-08 19:36:50 +01:00
|
|
|
extends: ['eslint:recommended', 'plugin:import/recommended'],
|
2022-11-06 13:50:39 +01:00
|
|
|
parser: '@typescript-eslint/parser',
|
2022-11-08 19:36:50 +01:00
|
|
|
plugins: ['@typescript-eslint', 'prettier', 'import'],
|
2022-11-06 13:50:39 +01:00
|
|
|
root: true,
|
|
|
|
rules: {
|
|
|
|
'prettier/prettier': 'warn',
|
|
|
|
'prefer-arrow-callback': 'error',
|
2022-11-07 23:02:24 +01:00
|
|
|
'sort-imports': [
|
|
|
|
'error',
|
|
|
|
{
|
|
|
|
ignoreDeclarationSort: true,
|
|
|
|
},
|
|
|
|
],
|
2022-11-08 19:36:50 +01:00
|
|
|
'import/no-unresolved': 'error',
|
|
|
|
'import/no-extraneous-dependencies': 'error',
|
|
|
|
'import/first': 'error',
|
|
|
|
'import/no-duplicates': 'error',
|
|
|
|
'import/no-default-export': 'error',
|
|
|
|
'import/no-namespace': 'error',
|
|
|
|
'import/no-useless-path-segments': 'error',
|
2022-11-06 13:50:39 +01:00
|
|
|
},
|
|
|
|
overrides: [
|
2022-11-08 19:13:34 +01:00
|
|
|
{
|
|
|
|
files: ['**/*.ts'],
|
|
|
|
extends: [
|
|
|
|
'plugin:@typescript-eslint/recommended',
|
|
|
|
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
2022-11-08 19:36:50 +01:00
|
|
|
'plugin:import/typescript',
|
2022-11-08 19:13:34 +01:00
|
|
|
],
|
|
|
|
parserOptions: {
|
|
|
|
project: ['./tsconfig.json'],
|
|
|
|
},
|
|
|
|
rules: {
|
|
|
|
'@typescript-eslint/explicit-module-boundary-types': 'error',
|
|
|
|
},
|
2022-11-08 19:36:50 +01:00
|
|
|
settings: {
|
|
|
|
'import/resolver': {
|
|
|
|
typescript: {
|
|
|
|
project: './',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2022-11-08 19:13:34 +01:00
|
|
|
},
|
2022-11-06 13:50:39 +01:00
|
|
|
{
|
2022-11-10 11:07:31 +01:00
|
|
|
files: ['**/*.js'],
|
2022-11-06 13:50:39 +01:00
|
|
|
env: {
|
|
|
|
node: true,
|
|
|
|
browser: false,
|
|
|
|
},
|
|
|
|
rules: {
|
|
|
|
'@typescript-eslint/no-var-requires': 'off',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|