2022-12-01 17:58:08 +03:00
|
|
|
module.exports = {
|
|
|
|
parser: '@typescript-eslint/parser',
|
|
|
|
parserOptions: {
|
|
|
|
project: 'tsconfig.json',
|
|
|
|
tsconfigRootDir : __dirname,
|
|
|
|
sourceType: 'module',
|
|
|
|
},
|
2023-09-17 18:41:46 +03:00
|
|
|
plugins: ['@typescript-eslint/eslint-plugin', 'import', 'unused-imports'],
|
2022-12-01 17:58:08 +03:00
|
|
|
extends: [
|
|
|
|
'plugin:@typescript-eslint/recommended',
|
|
|
|
'plugin:prettier/recommended',
|
|
|
|
],
|
|
|
|
root: true,
|
|
|
|
env: {
|
|
|
|
node: true,
|
|
|
|
jest: true,
|
|
|
|
},
|
2023-06-23 18:43:41 +03:00
|
|
|
ignorePatterns: ['.eslintrc.js', 'src/core/@generated/**'],
|
2022-12-01 17:58:08 +03:00
|
|
|
rules: {
|
|
|
|
'@typescript-eslint/interface-name-prefix': 'off',
|
|
|
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
|
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
2023-06-29 21:19:03 +03:00
|
|
|
'func-style':['error', 'declaration', { 'allowArrowFunctions': true }],
|
2023-07-19 15:01:32 +03:00
|
|
|
'no-restricted-imports': [
|
|
|
|
'error',
|
|
|
|
{
|
|
|
|
'patterns': [
|
|
|
|
{
|
|
|
|
'group': ['**../'],
|
|
|
|
'message': 'Relative imports are not allowed.',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
'import/order': [
|
|
|
|
'error',
|
|
|
|
{
|
|
|
|
'newlines-between': 'always',
|
|
|
|
groups: [
|
|
|
|
'builtin',
|
|
|
|
'external',
|
|
|
|
'internal',
|
|
|
|
'type',
|
|
|
|
'parent',
|
|
|
|
'sibling',
|
|
|
|
'object',
|
|
|
|
'index',
|
|
|
|
],
|
|
|
|
pathGroups: [
|
|
|
|
{
|
|
|
|
pattern: '@nestjs/**',
|
|
|
|
group: 'builtin',
|
|
|
|
position: 'before',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
pattern: '**/interfaces/**',
|
|
|
|
group: 'type',
|
|
|
|
position: 'before',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
pattern: 'src/**',
|
|
|
|
group: 'parent',
|
|
|
|
position: 'before',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
pattern: './*',
|
|
|
|
group: 'sibling',
|
|
|
|
position: 'before',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
distinctGroup: true,
|
|
|
|
warnOnUnassignedImports: true,
|
|
|
|
pathGroupsExcludedImportTypes: ['@nestjs/**'],
|
|
|
|
},
|
|
|
|
],
|
2023-11-16 14:26:43 +03:00
|
|
|
'import/no-duplicates': ["error", {"considerQueryString": true}],
|
2023-08-01 01:47:29 +03:00
|
|
|
'unused-imports/no-unused-imports': 'warn',
|
2023-10-04 12:06:54 +03:00
|
|
|
"@typescript-eslint/consistent-type-imports": ["error", { "prefer": "no-type-imports" }],
|
2022-12-01 17:58:08 +03:00
|
|
|
},
|
|
|
|
};
|