ESLint: enforce low-impact recommended RxJs rules

https://github.com/cartant/eslint-plugin-rxjs#rules

Mainly to steer us away from unsafe patterns

Skipping two recommended rules for now:
rxjs/no-implicit-any-catch → not immediately clear how this should be addressed
rxjs/no-nested-subscribe   → there are quite a few cases, would take some effort to fix all of them
This commit is contained in:
Yury Bondarenko
2023-05-20 01:33:13 +02:00
parent 8a650a2fb5
commit 218ce832a9
3 changed files with 132 additions and 4 deletions

View File

@@ -8,7 +8,8 @@
"eslint-plugin-deprecation",
"unused-imports",
"eslint-plugin-lodash",
"eslint-plugin-jsonc"
"eslint-plugin-jsonc",
"eslint-plugin-rxjs"
],
"overrides": [
{
@@ -27,7 +28,8 @@
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
"plugin:@angular-eslint/template/process-inline-templates",
"plugin:rxjs/recommended"
],
"rules": {
"max-classes-per-file": [
@@ -208,7 +210,10 @@
"lodash/import-scope": [
"error",
"method"
]
],
"rxjs/no-implicit-any-catch": "off", // todo: investigate how best to solve these
"rxjs/no-nested-subscribe": "off" // todo: go over _all_ cases
}
},
{