From: David Cho-Lerat Date: Wed, 29 Mar 2023 14:27:33 +0000 (+0200) Subject: Temporarily remove @typescript-eslint rules to reduce the # of code smells in overall... X-Git-Tag: 10.0.0.68432~40 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=faad3b21014e33b9d46f0737d0f02574c79d4f30;p=sonarqube.git Temporarily remove @typescript-eslint rules to reduce the # of code smells in overall code --- diff --git a/server/sonar-web/.eslintrc b/server/sonar-web/.eslintrc index 0c445a4a950..fa19918907d 100644 --- a/server/sonar-web/.eslintrc +++ b/server/sonar-web/.eslintrc @@ -1,5 +1,5 @@ { - "extends": ["sonarqube", "./.eslintrc-typescript"], + "extends": "sonarqube", "plugins": ["eslint-plugin-local-rules"], "ignorePatterns": ["eslint-local-rules/**/*"], "rules": { diff --git a/server/sonar-web/.eslintrc-typescript b/server/sonar-web/.eslintrc-typescript deleted file mode 100644 index 22573c4bd22..00000000000 --- a/server/sonar-web/.eslintrc-typescript +++ /dev/null @@ -1,54 +0,0 @@ -{ - "extends": [ - "plugin:@typescript-eslint/recommended", - "plugin:@typescript-eslint/recommended-requiring-type-checking", - "plugin:@typescript-eslint/strict" - ], - "parserOptions": { "project": "./tsconfig.json" }, - "rules": { - "@typescript-eslint/adjacent-overload-signatures": "warn", - "@typescript-eslint/array-type": ["warn", { "default": "array-simple" }], - "@typescript-eslint/await-thenable": "off", - "@typescript-eslint/ban-ts-comment": "warn", - "@typescript-eslint/ban-types": "warn", - "@typescript-eslint/consistent-indexed-object-style": "off", - "@typescript-eslint/default-param-last": "warn", - "@typescript-eslint/no-array-constructor": "warn", - "@typescript-eslint/no-confusing-non-null-assertion": "off", - "@typescript-eslint/no-confusing-void-expression": "warn", - "@typescript-eslint/no-empty-function": "warn", - "@typescript-eslint/no-empty-interface": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-extra-non-null-assertion": "off", - "@typescript-eslint/no-floating-promises": "warn", - "@typescript-eslint/no-for-in-array": "warn", - "@typescript-eslint/no-inferrable-types": "off", - "@typescript-eslint/no-invalid-this": "warn", - "@typescript-eslint/no-loss-of-precision": "warn", - "@typescript-eslint/no-misused-new": "warn", - "@typescript-eslint/no-misused-promises": "warn", - "@typescript-eslint/no-namespace": "warn", - "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "off", - "@typescript-eslint/no-non-null-asserted-optional-chain": "off", - "@typescript-eslint/no-redundant-type-constituents": "warn", - "@typescript-eslint/no-this-alias": "warn", - "@typescript-eslint/no-unnecessary-type-assertion": "off", - "@typescript-eslint/no-unnecessary-type-constraint": "warn", - "@typescript-eslint/no-unsafe-argument": "warn", - "@typescript-eslint/no-unsafe-assignment": "warn", - "@typescript-eslint/no-unsafe-call": "warn", - "@typescript-eslint/no-unsafe-member-access": "warn", - "@typescript-eslint/no-unsafe-return": "warn", - "@typescript-eslint/no-unused-vars": "off", - "@typescript-eslint/no-var-requires": "warn", - "@typescript-eslint/non-nullable-type-assertion-style": "off", - "@typescript-eslint/prefer-as-const": "warn", - "@typescript-eslint/prefer-namespace-keyword": "warn", - "@typescript-eslint/require-await": "warn", - "@typescript-eslint/restrict-plus-operands": "warn", - "@typescript-eslint/restrict-template-expressions": "warn", - "@typescript-eslint/switch-exhaustiveness-check": "warn", - "@typescript-eslint/triple-slash-reference": "warn", - "@typescript-eslint/unbound-method": "off" - } -} diff --git a/server/sonar-web/design-system/.eslintrc b/server/sonar-web/design-system/.eslintrc index a7266dd7eb6..3ba5bf477cf 100644 --- a/server/sonar-web/design-system/.eslintrc +++ b/server/sonar-web/design-system/.eslintrc @@ -1,5 +1,5 @@ { - "extends": ["sonarqube", "../.eslintrc-typescript"], + "extends": ["sonarqube", "./.eslintrc-typescript"], "plugins": ["header", "typescript-sort-keys", "eslint-plugin-local-rules"], "rules": { // Custom SonarCloud config that differs from eslint-config-sonarqube diff --git a/server/sonar-web/design-system/.eslintrc-typescript b/server/sonar-web/design-system/.eslintrc-typescript new file mode 100644 index 00000000000..22573c4bd22 --- /dev/null +++ b/server/sonar-web/design-system/.eslintrc-typescript @@ -0,0 +1,54 @@ +{ + "extends": [ + "plugin:@typescript-eslint/recommended", + "plugin:@typescript-eslint/recommended-requiring-type-checking", + "plugin:@typescript-eslint/strict" + ], + "parserOptions": { "project": "./tsconfig.json" }, + "rules": { + "@typescript-eslint/adjacent-overload-signatures": "warn", + "@typescript-eslint/array-type": ["warn", { "default": "array-simple" }], + "@typescript-eslint/await-thenable": "off", + "@typescript-eslint/ban-ts-comment": "warn", + "@typescript-eslint/ban-types": "warn", + "@typescript-eslint/consistent-indexed-object-style": "off", + "@typescript-eslint/default-param-last": "warn", + "@typescript-eslint/no-array-constructor": "warn", + "@typescript-eslint/no-confusing-non-null-assertion": "off", + "@typescript-eslint/no-confusing-void-expression": "warn", + "@typescript-eslint/no-empty-function": "warn", + "@typescript-eslint/no-empty-interface": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-extra-non-null-assertion": "off", + "@typescript-eslint/no-floating-promises": "warn", + "@typescript-eslint/no-for-in-array": "warn", + "@typescript-eslint/no-inferrable-types": "off", + "@typescript-eslint/no-invalid-this": "warn", + "@typescript-eslint/no-loss-of-precision": "warn", + "@typescript-eslint/no-misused-new": "warn", + "@typescript-eslint/no-misused-promises": "warn", + "@typescript-eslint/no-namespace": "warn", + "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "off", + "@typescript-eslint/no-non-null-asserted-optional-chain": "off", + "@typescript-eslint/no-redundant-type-constituents": "warn", + "@typescript-eslint/no-this-alias": "warn", + "@typescript-eslint/no-unnecessary-type-assertion": "off", + "@typescript-eslint/no-unnecessary-type-constraint": "warn", + "@typescript-eslint/no-unsafe-argument": "warn", + "@typescript-eslint/no-unsafe-assignment": "warn", + "@typescript-eslint/no-unsafe-call": "warn", + "@typescript-eslint/no-unsafe-member-access": "warn", + "@typescript-eslint/no-unsafe-return": "warn", + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-var-requires": "warn", + "@typescript-eslint/non-nullable-type-assertion-style": "off", + "@typescript-eslint/prefer-as-const": "warn", + "@typescript-eslint/prefer-namespace-keyword": "warn", + "@typescript-eslint/require-await": "warn", + "@typescript-eslint/restrict-plus-operands": "warn", + "@typescript-eslint/restrict-template-expressions": "warn", + "@typescript-eslint/switch-exhaustiveness-check": "warn", + "@typescript-eslint/triple-slash-reference": "warn", + "@typescript-eslint/unbound-method": "off" + } +}