]> source.dussan.org Git - sonarqube.git/commitdiff
Temporarily remove @typescript-eslint rules to reduce the # of code smells in overall...
authorDavid Cho-Lerat <david.cho-lerat@sonarsource.com>
Wed, 29 Mar 2023 14:27:33 +0000 (16:27 +0200)
committersonartech <sonartech@sonarsource.com>
Wed, 29 Mar 2023 20:03:02 +0000 (20:03 +0000)
server/sonar-web/.eslintrc
server/sonar-web/.eslintrc-typescript [deleted file]
server/sonar-web/design-system/.eslintrc
server/sonar-web/design-system/.eslintrc-typescript [new file with mode: 0644]

index 0c445a4a9507f4993317f159ccfa7cec188917af..fa19918907d7a43172fc3f75b6e1dc11260bf0ab 100644 (file)
@@ -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 (file)
index 22573c4..0000000
+++ /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"
-  }
-}
index a7266dd7eb6a6d1d94567d600a4e99e6eed10adc..3ba5bf477cf14f00a0a8c3fe7a221adf0eff801e 100644 (file)
@@ -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 (file)
index 0000000..22573c4
--- /dev/null
@@ -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"
+  }
+}