Sonarcloud issues fixes (#3499)

* Sonarcloud issues fixes

* Code smell fixes

* Refactoring to remove new code duplications

* Sonarcloud code smell fixes part I

* Sonarcloud code smell fixes part II

* Missing code smell fix

* Add new ESLint rules to cover fixed SonarCloud issues

* Add missing command

* Add missing is existing check
This commit is contained in:
MichalKinas
2023-11-03 06:43:06 -04:00
committed by GitHub
parent 968febffb0
commit 69c00fc403
72 changed files with 327 additions and 530 deletions
+9 -3
View File
@@ -113,7 +113,9 @@
"@angular-eslint/component-class-suffix": "error",
"@angular-eslint/directive-class-suffix": "error",
"@angular-eslint/no-conflicting-lifecycle": "error",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-floating-promises": "warn",
"@typescript-eslint/no-misused-promises": "warn",
"@typescript-eslint/default-param-last": "warn",
"@angular-eslint/no-input-rename": "error",
"@angular-eslint/no-output-native": "error",
"@angular-eslint/no-output-on-prefix": "error",
@@ -122,7 +124,7 @@
"@angular-eslint/no-outputs-metadata-property": "error",
"@angular-eslint/use-lifecycle-interface": "error",
"@angular-eslint/use-pipe-transform-interface": "error",
"@typescript-eslint/prefer-optional-chain": "warn",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/prefer-function-type": "error",
@@ -204,6 +206,7 @@
"newline-per-chained-call": "off",
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-promise-reject-errors": "error",
"import/order": "off",
"max-len": [
"error",
@@ -226,6 +229,8 @@
"no-caller": "error",
"no-global-assign": "error",
"no-cond-assign": "error",
"no-constant-binary-expression": "error",
"no-useless-rename": "error",
"no-console": [
"error",
{
@@ -324,7 +329,8 @@
{
"files": ["*.spec.ts", "*.test.ts"],
"rules": {
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-floating-promises": "warn",
"@typescript-eslint/no-misused-promises": "warn",
"max-lines": "off"
}
}