2021-09-07 18:25:31 +00:00
|
|
|
module.exports = {
|
2023-11-14 15:31:21 +00:00
|
|
|
parser: '@typescript-eslint/parser',
|
|
|
|
parserOptions: {
|
|
|
|
project: true,
|
|
|
|
tsconfigRootDir: __dirname,
|
|
|
|
sourceType: 'module',
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
'@typescript-eslint/eslint-plugin',
|
|
|
|
'simple-import-sort',
|
|
|
|
'no-type-assertion',
|
2023-12-30 02:10:33 +00:00
|
|
|
'sonarjs',
|
2023-11-14 15:31:21 +00:00
|
|
|
'import',
|
2023-12-30 02:10:33 +00:00
|
|
|
'unused-imports',
|
2023-11-14 15:31:21 +00:00
|
|
|
],
|
|
|
|
extends: [
|
|
|
|
'eslint:recommended',
|
|
|
|
'plugin:@typescript-eslint/strict-type-checked',
|
|
|
|
'plugin:@typescript-eslint/eslint-recommended',
|
|
|
|
'plugin:@typescript-eslint/stylistic-type-checked',
|
|
|
|
'plugin:@typescript-eslint/strict',
|
|
|
|
'plugin:prettier/recommended',
|
2023-12-30 02:10:33 +00:00
|
|
|
'plugin:sonarjs/recommended',
|
2023-11-14 15:31:21 +00:00
|
|
|
'plugin:import/recommended',
|
|
|
|
'plugin:import/typescript',
|
|
|
|
],
|
|
|
|
root: true,
|
|
|
|
env: {
|
|
|
|
node: true,
|
|
|
|
jest: true,
|
|
|
|
},
|
2023-12-30 02:10:33 +00:00
|
|
|
ignorePatterns: ['.eslintrc.js'],
|
2023-11-14 15:31:21 +00:00
|
|
|
rules: {
|
|
|
|
'simple-import-sort/imports': 'error',
|
|
|
|
'simple-import-sort/exports': 'error',
|
|
|
|
eqeqeq: 'error',
|
|
|
|
'no-lonely-if': 'error',
|
|
|
|
'no-multi-assign': 'error',
|
|
|
|
'@typescript-eslint/no-shadow': 'error',
|
|
|
|
'no-useless-return': 'error',
|
|
|
|
'no-useless-rename': 'error',
|
|
|
|
'one-var-declaration-per-line': 'error',
|
|
|
|
'prefer-object-spread': 'error',
|
|
|
|
'no-unreachable-loop': 'error',
|
|
|
|
'no-template-curly-in-string': 'error',
|
|
|
|
'default-case-last': 'error',
|
|
|
|
'no-array-constructor': 'error',
|
|
|
|
'no-else-return': 'error',
|
|
|
|
'no-negated-condition': 'error',
|
|
|
|
'array-callback-return': 'error',
|
|
|
|
'@typescript-eslint/consistent-type-definitions': 'error',
|
|
|
|
'no-type-assertion/no-type-assertion': 'error',
|
|
|
|
'@typescript-eslint/ban-ts-comment': 'error',
|
|
|
|
'@typescript-eslint/no-unnecessary-condition': 'error',
|
|
|
|
'@typescript-eslint/no-extraneous-class': 'off',
|
|
|
|
'@typescript-eslint/prefer-nullish-coalescing': 'error',
|
|
|
|
'@typescript-eslint/no-import-type-side-effects': 'error',
|
|
|
|
'@typescript-eslint/consistent-type-imports': 'error',
|
|
|
|
'@typescript-eslint/consistent-type-exports': 'error',
|
|
|
|
'import/consistent-type-specifier-style': 'error',
|
|
|
|
'import/no-duplicates': 'error',
|
|
|
|
'import/no-unresolved': 'error',
|
|
|
|
curly: 'error',
|
2024-02-10 23:32:47 +00:00
|
|
|
'no-console': 'error',
|
2023-11-14 15:31:21 +00:00
|
|
|
quotes: [
|
|
|
|
'error',
|
|
|
|
'single',
|
|
|
|
{
|
|
|
|
avoidEscape: true,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
'prefer-template': 'error',
|
|
|
|
'@typescript-eslint/return-await': ['error', 'always'],
|
2023-12-30 02:10:33 +00:00
|
|
|
'unused-imports/no-unused-imports': 'error',
|
2023-11-14 15:31:21 +00:00
|
|
|
},
|
|
|
|
};
|